In [ ]:
. ./nbs_header.ps1
. ./core.ps1
In [ ]:
{ pwsh ../apps/builder/build.ps1 } | Invoke-Block
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # DibParser (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsec.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsecCS.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
── fsharp - import ─────────────────────────────────────────────────────────────
Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
TextWriter)->fprintfn writer "%120A" x)
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type core_ops_Try<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[[<Fable...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type core_ops_Try<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
#endif
type Mut<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Co...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
#endif
type async_std_task_JoinHandle<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
#endif
type std_future_Future<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
#endif
type rayon_vec_IntoIter<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
#endif
type rayon_iter_Map<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
#endif
type futures_lite_stream_StreamExt = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
#endif
type futures_future_TryJoinAll<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
#endif
type futures_future_Fuse<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
#endif
type futures_future_JoinAll<'T> = class end
let rec closure0 () (v0 : System.Threading.CancellationToken) :
Async<System.Threading.CancellationToken> =
let v1 : bool = true
let mutable _v1 : Async<System.Threading.CancellationToken> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v2 : Async<System.Threading.CancellationToken> = null |>
unbox<Async<System...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
#endif
type std_thread_JoinHandle<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
#endif
type std_sync_Arc<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
#endif
type std_sync_Mutex<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
#endif
type std_sync_MutexGuard<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
#endif
type std_sync_PoisonError<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
#endif
type std_sync_mpsc_Receiver<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
#endif
type std_sync_mpsc_SendError<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
#endif
type std_sync_mpsc_Sender<'T> = class end
type Disposable (f : unit -> unit) = interface System.IDisposable with member
_.Dispose () = f ()
type [[<Struct>]] US0 =
| US0_0 of f0_0 : System.Threading.CancellationToken
| US0_1
let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
let v1 : bool = true
let mutable _v1 : unit option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
#endif
type reqwest_Error = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
#endif
type reqwest_RequestBuilder = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
#endif
type reqwest_Response = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type core_ops_Try<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
#endif
type clap_Arg = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
#endif
type clap_ArgAction = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
#endif
type clap_Command = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
#endif
type clap_ArgMatches = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
#endif
type clap_builder_ValueRange = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
#endif
type clap_builder_ValueParser = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
#endif
type clap_builder_PossibleValue = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
#endif
type std_process_Child = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
#endif
type std_process_ChildStderr = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
#endif
type std_process_ChildStdout = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
#endif
type std_process_ChildStdin = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
#endif
type std_process_Command = class ...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
#endif
type std_fs_File = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
#endif
type std_fs_FileType = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
#endif
type std_path_Display = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
#endif
type std_path_Path = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
#endif
type std_path_PathBuf = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
#endif
type async_walkdir_DirEntry = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
#endif
type async_walkdir_Filtering = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
#endif
type async_walkdir_WalkDir = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type core_ops_Try<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = clas...
── fsharp - import ─────────────────────────────────────────────────────────────
module SpiralTrace =
let trace x =
#if !INTERACTIVE
Trace.trace x
#else
trace x
#endif
type TraceLevel =
#if !INTERACTIVE
Trace.US0
#else
US0
#endif
module SpiralCrypto =
let hash_text x =
#if !INTERACTIVE
Crypto.hash_text x
#else
hash_text x
#endif
#if !FABLE_COMPILER && !WASM && !CONTRACT
module SpiralAsync =
let merge_cancellation_token_with_default_async x =
#if !INTERACTIVE
Async_.merge_cancellation_token_with_default_async x
#else
merge_cancellation_token_with_default_async x
#endif
module SpiralThreading =
let new_disposable_token x =
#if !INTERACTIVE
Threading.new_disposable_token x
#else
new_disposable_token x
#endif
module SpiralNetworking =
let test_port_open x =
#if !INTERACTIVE
Networking.test_port_open x
#else
test_port_open x
#endif
let test_port_open_timeout x =
#if !INTERACTIVE
Networking.test_port_open_timeout x
#else
test_port_open_timeout x
#endif
let wait_for_port_access x =
#if !INTERACTIVE
Networking.wait_for_port_access x
#else
wait_for_port_access x
#endif
let get_available_port x =
#if !INTERACTIVE
Networking.get_available_port x
#else
get_available_port x
#endif
module SpiralRuntime =
let get_executable_suffix () =
#if !INTERACTIVE
Runtime.get_executable_suffix ()
#else
get_executable_suffix ()
#endif
let is_windows () =
#if !INTERACTIVE
...
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assertEqual expected actual = __assertEqual true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected actual
let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
let inline __isGreaterThanOrEqual log expected actual = __expect
Expecto.Expect.isGreaterThanOrEqual log expected actual
let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
expected actual
let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
log expected actual
let inline _isLessThan expected actual = __isLessThan true expected actual
let inline __isLessThanOrEqual log expected actual = __expect
Expecto.Expect.isLessThanOrEqual log expected actual
let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
expected actual
let inline __sequenceEqual log expected actual = __expe...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── pwsh ────────────────────────────────────────────────────────────────────────
ls ~/.nuget/packages/argu
╭─[ 492.63ms - stdout ]────────────────────────────────────────────────────────╮
│ │
│ Directory: C:\Users\i574n\.nuget\packages\argu │
│ │
│ Mode LastWriteTime Length[ │
│ 32;1m Name │
│ ---- ------------- ------ [ │
│ 32;1m---- │
│ d---- 2023-05-17 3:38 PM 6.1.1 │
│ d---- 2024-03-12 8:22 PM 6.1.4 │
│ d---- 2024-01-29 5:12 PM 6.1.5 │
│ d---- 2024-03-12 8:20 PM 6.2.0 │
│ d---- 2024-02-23 6:50 PM 6.2.1 │
│ d---- 2024-03-12 8:15 PM 6.2.2 │
│ d---- 2024-05-14 8:20 PM 6.2.3 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
#if !INTERACTIVE
open Lib
#endif
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
/// ## memoize
let inline memoize fn =
let result = lazy fn ()
fun () -> result.Value
/// ## TraceLevel
type TraceLevel =
| Verbose
| Debug
| Info
| Warning
| Critical
let inline _locals () = ""
/// ## trace
let to_trace_level = function
| Verbose -> SpiralTrace.TraceLevel.US0_0
| Debug -> SpiralTrace.TraceLevel.US0_1
| Info -> SpiralTrace.TraceLevel.US0_2
| Warning -> SpiralTrace.TraceLevel.US0_3
| Critical -> SpiralTrace.TraceLevel.US0_4
let trace level fn locals =
let level = level |> to_trace_level
SpiralTrace.trace level fn locals
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
|> map (function
| Choice1Of2 result -> Ok result
| Choice2Of2 ex -> Error ex
)
/// ## runWithTimeoutChoiceAsync
let inline runWithTimeoutChoiceAsync (timeout : int) fn =
let _locals () = $"timeout: {timeout} / {_locals ()}"
let timeoutTask = async {
do! Async.Sleep timeout
trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
return None
}
let task = async {
try
let! result = fn
return Some result
with
| :? System.AggregateException as ex when
ex.InnerExceptions
|> Seq.exists (function :? Sys...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
/// ## subscribeToken
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun () -> async {
do! tcs.Task |> Async.AwaitTask
return Some (System.DateTime.Now.Ticks - start, ())
})
()
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## parseArgs
let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
let assemblyName =
System.Reflection.Assembly.GetEntryAssembly().GetName().Name
let errorHandler : Argu.IExiter =
if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
List.contains assemblyName
then Argu.ExceptionExiter ()
else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
_ -> Some System.ConsoleColor.Red)
let parser =
Argu.ArgumentParser.Create<'T> (
programName =
$"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
errorHandler = errorHandler
)
parser.ParseCommandLine args
let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseArgs<'T>
|> fun results -> results.GetAllResults ()
let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseAllArgs<'T>
|> List.groupBy CommonFSharp.getUnionCaseName<'T>
|> Map.ofList
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
#if !INTERACTIVE
open Lib
#endif
open Common
open SpiralFileSystem.Operators
/// ## watchDirectory
[[<RequireQualifiedAccess>]]
type FileSystemChangeType =
| Failure
| Changed
| Created
| Deleted
| Renamed
[[<RequireQualifiedAccess>]]
type FileSystemChange =
| Failure of exn: exn
| Changed of path: string * content: string option
| Created of path: string * content: string option
| Deleted of path: string
| Renamed of oldPath: string * (string * string option)
let inline watchDirectoryWithFilter filter shouldReadContent path =
let fullPath = path |> System.IO.Path.GetFullPath
let _locals () = $"filter: {filter} / {_locals ()}"
let watcher =
new System.IO.FileSystemWatcher (
Path = fullPath,
NotifyFilter = filter,
EnableRaisingEvents = true,
IncludeSubdirectories = true
)
let inline getEventPath (path : string) =
path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
SpiralSm.trim_start [[| '/'; '\\' |]]
let inline ticks () =
System.DateTime.UtcNow.Ticks
let changedStream =
AsyncSeq.subscribeEvent
watcher.Changed
(fun event ->
ticks (),
[[ FileSystemChange...
── fsharp ──────────────────────────────────────────────────────────────────────
#if !INTERACTIVE
open Lib
#endif
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open FParsec
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## escapeCell (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline escapeCell input =
input
|> SpiralSm.split "\n"
|> Array.map (function
| line when line |> SpiralSm.starts_with "\\#!" || line |>
SpiralSm.starts_with "\\#r" ->
System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#")
| line -> line
)
|> SpiralSm.concat "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
$"a{nl}\\#!magic{nl}b{nl}"
|> escapeCell
|> _assertEqual (
$"a{nl}#!magic{nl}b{nl}"
)
╭─[ 65.45ms - stdout ]─────────────────────────────────────────────────────────╮
│ "a │
│ #!magic │
│ b │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicMarker │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicMarker : Parser<string, unit> = pstring "#!"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic"
|> run magicMarker
|> _assertEqual (
Success ("#!", (), Position ("", 2, 1, 3))
)
╭─[ 44.19ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: "#!" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"##!magic"
|> run magicMarker
|> _assertEqual (
Failure (
$"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 51.43ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure: │
│ Error in Ln: 1 Col: 1 │
│ ##!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicCommand │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicCommand =
magicMarker
>>. manyTill anyChar newline
|>> (System.String.Concat >> SpiralSm.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a"
|> run magicCommand
|> _assertEqual (
Success ("magic", (), Position ("", 8, 2, 1))
)
╭─[ 33.45ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: "magic" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
" #!magic
a"
|> run magicCommand
|> _assertEqual (
Failure (
$"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 40.28ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure: │
│ Error in Ln: 1 Col: 1 │
│ #!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## content │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let content =
(newline >>. magicMarker) <|> (eof >>. preturn "")
|> attempt
|> lookAhead
|> manyTill anyChar
|>> (System.String.Concat >> SpiralSm.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run content
|> _assertEqual (
Success ("#!magic
a", (), Position ("", 14, 7, 1))
)
╭─[ 44.53ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: "#!magic │
│ │
│ │
│ a" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Block =
{
magic : string
content : string
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let block =
pipe2
magicCommand
content
(fun magic content ->
{
magic = magic
content = content
})
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run block
|> _assertEqual (
Success (
{ magic = "magic"; content = "a" },
(),
Position ("", 14, 7, 1)
)
)
╭─[ 40.61ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: { magic = "magic" │
│ content = "a" } │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## blocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let blocks =
skipMany newline
>>. sepEndBy block (skipMany1 newline)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic1
a
\#!magic2
b
"
|> escapeCell
|> run blocks
|> _assertEqual (
Success (
[[
{ magic = "magic1"; content = "a" }
{ magic = "magic2"; content = "b" }
]],
(),
Position ("", 26, 9, 1)
)
)
╭─[ 47.13ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: [{ magic = "magic1" │
│ content = "a" }; { magic = "magic2" │
│ content = "b" }] │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Output │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Output =
| Fs
| Md
| Spi
| Spir
let inline kernelOutputs magic =
match magic with
| "fsharp" -> [[ Fs ]]
| "markdown" -> [[ Md ]]
| "spiral" -> [[ Spi; Spir ]]
| _ -> [[]]
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlock │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlock output (block : Block) =
match output, block with
| output, { magic = "markdown"; content = content } ->
let markdownComment =
match output with
| Spi | Spir -> "/// "
| Fs -> "/// "
| _ -> ""
content
|> SpiralSm.split "\n"
|> Array.map (SpiralSm.trim_end [[||]])
|> Array.filter (SpiralSm.ends_with " (test)" >> not)
|> Array.map (function
| "" -> markdownComment
| line -> System.Text.RegularExpressions.Regex.Replace (line,
"^\\s*", $"$&{markdownComment}")
)
|> SpiralSm.concat "\n"
| Fs, { magic = "fsharp"; content = content } ->
let trimmedContent = content |> SpiralSm.trim
if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent
|> SpiralSm.starts_with "//// ignore"
then ""
else
content
|> SpiralSm.split "\n"
|> Array.filter (SpiralSm.trim_start [[||]] >> SpiralSm.starts_with
"#r" >> not)
|> SpiralSm.concat "\n"
| (Spi | Spir), { magic = "spiral"; content = content } ->
let trimmedContent = content |> SpiralSm.trim
if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent
|> SpiralSm.starts_with "//// ignore"
then ""
else content
| _ -> ""
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
c
\#!markdown
c
\#!fsharp
let a = 1"
|> escapeCell
|> run block
|> function
| Success (block, _, _) -> formatBlock Fs block
| Failure (msg, _, _) -> failwith msg
|> _assertEqual "/// a
///
/// b
///
/// c"
╭─[ 57.01ms - stdout ]─────────────────────────────────────────────────────────╮
│ "/// a │
│ /// │
│ /// b │
│ /// │
│ /// c" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlocks output blocks =
blocks
|> List.map (fun block ->
block, formatBlock output block
)
|> List.filter (snd >> (<>) "")
|> fun list ->
(list, (None, [[]]))
||> List.foldBack (fun (block, content) (lastMagic, acc) ->
let lineBreak =
if block.magic = "markdown" && lastMagic <> Some "markdown" &&
lastMagic <> None
then ""
else "\n"
Some block.magic, $"{content}{lineBreak}" :: acc
)
|> snd
|> SpiralSm.concat "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
\#!markdown
c
\#!fsharp
let a = 1
\#!markdown
d (test)
\#!fsharp
//// test
let a = 2
\#!markdown
e
\#!fsharp
let a = 3"
|> escapeCell
|> run blocks
|> function
| Success (blocks, _, _) -> formatBlocks Fs blocks
| Failure (msg, _, _) -> failwith msg
|> _assertEqual "/// a
///
/// b
/// c
let a = 1
/// e
let a = 3
"
╭─[ 78.08ms - stdout ]─────────────────────────────────────────────────────────╮
│ "/// a │
│ /// │
│ /// b │
│ │
│ /// c │
│ let a = 1 │
│ │
│ /// e │
│ let a = 3 │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parse │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parse output input =
match run blocks input with
| Success (blocks, _, _) ->
let blocks =
blocks
|> List.filter (fun block ->
block.magic |> kernelOutputs |> List.contains output ||
block.magic = "markdown"
)
match blocks with
| { magic = "markdown"; content = content } :: _
when output = Fs
&& content |> SpiralSm.starts_with "# "
&& content |> SpiralSm.ends_with ")"
->
let inline indentBlock (block : Block) =
{ block with
content =
block.content
|> SpiralSm.split "\n"
|> Array.fold
(fun (lines, isMultiline) line ->
let trimmedLine = line |> SpiralSm.trim
if trimmedLine = ""
then "" :: lines, isMultiline
else
let inline singleQuoteLine () =
trimmedLine |> Seq.sumBy ((=) '"' >>
System.Convert.ToInt32) = 1
&& trimmedLine |> SpiralSm.contains
@"'""'" |> not
&& trimmedLine |> SpiralSm.ends_with "{"
|> not
&& trimmedLine |> SpiralSm.ends_with
"{|" |> not
&& trimmedLine |> SpiralSm.starts_with
"}" |> not
&& trimmedLine |> SpiralSm.starts_with
"|}" |> not
match isMultiline, trimmedLine |>
SpiralSm.split_string [[| $"{q}{q}{q}" |]] with
| false, [[| _; _ |]] ->
$" {line}" :: lines, true
| true, [[| _; _ |]] ->
line :: lines, false
| false, _ when singleQuoteLine () ->
$" {line}" :: lines, true
| false, _ when line |> SpiralSm.starts_with
"#" && block.magic = "fsharp" ->
line :: lines, false
| false, _ ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () && line |>
SpiralSm.starts_with " " ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () ->
line :: lines, false
| true, _ ->
line :: lines, true
)
([[]], false)
|> fst
|> List.rev
|> SpiralSm.concat "\n"
}
let moduleName, namespaceName =
System.Text.RegularExpressions.Regex.Match (content, @"# (.*)
\((.*)\)$")
|> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value
let moduleBlock =
{
magic = "fsharp"
content =
$"#if !INTERACTIVE
namespace {namespaceName}
#endif
module {moduleName} ="
}
blocks
|> List.indexed
|> List.fold
(fun blocks (index, block) ->
match index with
| 0 -> blocks
| 1 -> indentBlock block :: moduleBlock :: blocks
| _ -> indentBlock block :: blocks
)
[[]]
|> List.rev
| _ -> blocks
|> Result.Ok
| Failure (errorMsg, _, _) -> Result.Error errorMsg
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let example1 =
$"""#!meta
{{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name":
"fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}}
\#!markdown
# TestModule (TestNamespace)
\#!fsharp
\#!import file.dib
\#!fsharp
\#r "nuget:Expecto"
\#!markdown
## ParserLibrary
\#!fsharp
open System
\#!markdown
## x (test)
\#!fsharp
//// ignore
let x = 1
\#!spiral
//// test
inl x = 0i32
\#!spiral
inl x = 0i32
\#!markdown
### TextInput
\#!fsharp
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
\#!fsharp
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}"""
|> escapeCell
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Fs
|> Result.toOption
|> Option.get
|> (formatBlocks Fs)
|> _assertEqual $"""#if !INTERACTIVE
namespace TestNamespace
#endif
module TestModule =
/// ## ParserLibrary
open System
/// ### TextInput
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}
"""
╭─[ 214.08ms - stdout ]────────────────────────────────────────────────────────╮
│ "#if !INTERACTIVE │
│ namespace TestNamespace │
│ #endif │
│ │
│ module TestModule = │
│ │
│ /// ## ParserLibrary │
│ open System │
│ │
│ /// ### TextInput │
│ let str1 = "abc │
│ def" │
│ │
│ let str2 = │
│ "abc\ │
│ def" │
│ │
│ let str3 = │
│ $"1{ │
│ 1 │
│ }1" │
│ │
│ let str4 = │
│ $"1{({| │
│ a = 1 │
│ |}).a}1" │
│ │
│ let str5 = │
│ "abc \ │
│ def" │
│ │
│ let x = │
│ match '"' with │
│ | '"' -> true │
│ | _ -> false │
│ │
│ let long1 = """a""" │
│ │
│ let long2 = │
│ """ │
│ a │
│ """ │
│ │
│ type Position = │
│ { │
│ #if INTERACTIVE │
│ line : string │
│ #else │
│ line : int │
│ #endif │
│ column : int │
│ } │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Md
|> Result.toOption
|> Option.get
|> (formatBlocks Md)
|> _assertEqual "# TestModule (TestNamespace)
## ParserLibrary
### TextInput
"
╭─[ 180.53ms - stdout ]────────────────────────────────────────────────────────╮
│ "# TestModule (TestNamespace) │
│ │
│ ## ParserLibrary │
│ │
│ ### TextInput │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Spi
|> Result.toOption
|> Option.get
|> (formatBlocks Spi)
|> _assertEqual "/// # TestModule (TestNamespace)
/// ## ParserLibrary
inl x = 0i32
/// ### TextInput
"
╭─[ 185.32ms - stdout ]────────────────────────────────────────────────────────╮
│ "/// # TestModule (TestNamespace) │
│ │
│ /// ## ParserLibrary │
│ inl x = 0i32 │
│ │
│ /// ### TextInput │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parseDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parseDibCode output file = async {
trace Debug
(fun () -> "parseDibCode")
(fun () -> $"output: {output} / file: {file} / {_locals ()}")
let! input = file |> SpiralFileSystem.read_all_text_async
match parse output input with
| Result.Ok blocks -> return blocks |> formatBlocks output
| Result.Error msg -> return failwith msg
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## writeDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline writeDibCode output path = async {
trace Debug
(fun () -> "writeDibCode")
(fun () -> $"output: {output} / path: {path} / {_locals ()}")
let! result = parseDibCode output path
let outputPath = path |> SpiralSm.replace ".dib" $".{output |> string |>
SpiralSm.to_lower}"
do! result |> SpiralFileSystem.write_all_text_async outputPath
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]]
File of file : string * Output
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| File _ -> nameof File
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 94.52ms - return value ]───────────────────────────────────────────────────╮
│ "USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │
│ │
│ FILE: │
│ │
│ <file> <fs|md|spi|spir> │
│ File │
│ │
│ OPTIONS: │
│ │
│ --help display this list of options. │
│ " │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let files =
argsMap.[[nameof Arguments.File]]
|> List.map (function
| Arguments.File (path, output) -> path, output
)
files
|> List.map (fun (path, output) -> path |> writeDibCode output)
|> Async.Parallel
|> Async.Ignore
|> Async.runWithTimeout 30000
|> function
| Some () -> 0
| None -> 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> SpiralRuntime.split_args
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 171.71ms - return value ]──────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0 │
│ </pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 173.71ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:06 debug #1 writeDibCode / output: Fs / path: Builder.dib │
│ 00:00:06 debug #2 parseDibCode / output: Fs / file: Builder.dib │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Builder.dib"])
00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/builder/Builder.dib", "--output-path", "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/builder/Builder.dib" --output-path "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ # Builder (Polyglot) │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> #r
> @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
> dard2.1/FSharp.Control.AsyncSeq.dll"
> #r
> @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
> 0/System.Reactive.dll"
> #r
> @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
> netstandard2.0/System.Reactive.Linq.dll"
> #r
> @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #r
> "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
> spNetCore.Html.Abstractions.dll"
> #r
> "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
> otNet.Interactive.dll"
> #r
> "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
> otNet.Interactive.FSharp.dll"
> #r
> "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
> otNet.Interactive.Formatting.dll"
> open System
> open System.IO
> open System.Text
> open Microsoft.DotNet.Interactive.Formatting
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #r
> "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
> otNet.Interactive.FSharp.dll"
> open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
> #r
> "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
> otNet.Interactive.dll"
> open type Microsoft.DotNet.Interactive.Kernel
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
> TextWriter)->fprintfn writer "%120A" x)
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> #!import ../../lib/fsharp/Notebooks.dib
> #!import ../../lib/fsharp/Testing.dib
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> //// test
>
> Formatter.ListExpansionLimit <- 100
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
> #endif
> type std_env_VarError = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
> #endif
> type core_any_Any = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
> #endif
> type core_ops_Try<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
> #endif
> type Func0<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
> #endif
> type Func0<'T, 'U> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
> #endif
> type Box<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
> #endif
> type Dyn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
> #endif
> type Send<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
> #endif
> type Fn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
> #endif
> type FnUnit = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
> #endif
> type FnOnce<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
> #endif
> type ActionFn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
> #endif
> type ActionFn2<'T, 'U> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
> #endif
> type Impl<'T> = class end
> #if FABLE_COMPILER
> [[<Fable...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
> #endif
> type core_any_Any = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
> #endif
> type core_ops_Try<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
> #endif
> type Func0<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
> #endif
> type Func0<'T, 'U> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
> #endif
> type Box<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
> #endif
> type Dyn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
> #endif
> type Send<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
> #endif
> type Fn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
> #endif
> type FnUnit = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
> #endif
> type FnOnce<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
> #endif
> type ActionFn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
> #endif
> type ActionFn2<'T, 'U> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
> #endif
> type Impl<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
> #endif
> type Mut<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Co...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
> #endif
> type async_std_task_JoinHandle<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
> #endif
> type std_future_Future<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
> #endif
> type rayon_vec_IntoIter<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
> #endif
> type rayon_iter_Map<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
> #endif
> type futures_lite_stream_StreamExt = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
> #endif
> type futures_future_TryJoinAll<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
> #endif
> type futures_future_Fuse<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
> #endif
> type futures_future_JoinAll<'T> = class end
> let rec closure0 () (v0 : System.Threading.CancellationToken) :
> Async<System.Threading.CancellationToken> =
> let v1 : bool = true
> let mutable _v1 : Async<System.Threading.CancellationToken> option = None
>
> #if FABLE_COMPILER || WASM || CONTRACT
>
> #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
> let v2 : Async<System.Threading.CancellationToken> = null |>
> unbox<Async<System...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
> #endif
> type std_thread_JoinHandle<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
> #endif
> type std_sync_Arc<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
> #endif
> type std_sync_Mutex<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
> #endif
> type std_sync_MutexGuard<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
> #endif
> type std_sync_PoisonError<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
> #endif
> type std_sync_mpsc_Receiver<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
> #endif
> type std_sync_mpsc_SendError<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
> #endif
> type std_sync_mpsc_Sender<'T> = class end
> type Disposable (f : unit -> unit) = interface System.IDisposable with member
> _.Dispose () = f ()
> type [[<Struct>]] US0 =
> | US0_0 of f0_0 : System.Threading.CancellationToken
> | US0_1
> let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
> let v1 : bool = true
> let mutable _v1 : unit option = None
>
> #if FABLE_COMPILER || WASM || CONTRACT
>
> #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
> #endif
> type reqwest_Error = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
> #endif
> type reqwest_RequestBuilder = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
> #endif
> type reqwest_Response = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
> #endif
> type std_env_VarError = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
> #endif
> type core_any_Any = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
> #endif
> type core_ops_Try<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
> #endif
> type Func0<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
> #endif
> type Func0<'T, 'U> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
> #endif
> type Box<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
> #endif
> type Dyn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
> #endif
> type Send<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
> #endif
> type Fn<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
> #endif
> type FnUnit = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
> #...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
> #endif
> type clap_Arg = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
> #endif
> type clap_ArgAction = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
> #endif
> type clap_Command = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
> #endif
> type clap_ArgMatches = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
> #endif
> type clap_builder_ValueRange = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
> #endif
> type clap_builder_ValueParser = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
> #endif
> type clap_builder_PossibleValue = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
> #endif
> type std_process_Child = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
> #endif
> type std_process_ChildStderr = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
> #endif
> type std_process_ChildStdout = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
> #endif
> type std_process_ChildStdin = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
> #endif
> type std_process_Command = class ...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
> #endif
> type std_fs_File = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
> #endif
> type std_fs_FileType = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
> #endif
> type std_path_Display = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
> #endif
> type std_path_Path = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
> #endif
> type std_path_PathBuf = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
> #endif
> type async_walkdir_DirEntry = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
> #endif
> type async_walkdir_Filtering = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
> #endif
> type async_walkdir_WalkDir = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
> #endif
> type core_any_Any = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
> #endif
> type core_ops_Try<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
> #endif
> type Func0<'T> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
> #endif
> type Func0<'T, 'U> = class end
> #if FABLE_COMPILER
> [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
> #endif
> type Box<'T> = clas...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> module SpiralTrace =
> let trace x =
> #if !INTERACTIVE
> Trace.trace x
> #else
> trace x
> #endif
>
> type TraceLevel =
> #if !INTERACTIVE
> Trace.US0
> #else
> US0
> #endif
>
> module SpiralCrypto =
> let hash_text x =
> #if !INTERACTIVE
> Crypto.hash_text x
> #else
> hash_text x
> #endif
>
> #if !FABLE_COMPILER && !WASM && !CONTRACT
>
> module SpiralAsync =
> let merge_cancellation_token_with_default_async x =
> #if !INTERACTIVE
> Async_.merge_cancellation_token_with_default_async x
> #else
> merge_cancellation_token_with_default_async x
> #endif
>
> module SpiralThreading =
> let new_disposable_token x =
> #if !INTERACTIVE
> Threading.new_disposable_token x
> #else
> new_disposable_token x
> #endif
>
> module SpiralNetworking =
> let test_port_open x =
> #if !INTERACTIVE
> Networking.test_port_open x
> #else
> test_port_open x
> #endif
>
> let test_port_open_timeout x =
> #if !INTERACTIVE
> Networking.test_port_open_timeout x
> #else
> test_port_open_timeout x
> #endif
>
> let wait_for_port_access x =
> #if !INTERACTIVE
> Networking.wait_for_port_access x
> #else
> wait_for_port_access x
> #endif
>
> let get_available_port x =
> #if !INTERACTIVE
> Networking.get_available_port x
> #else
> get_available_port x
> #endif
>
> module SpiralRuntime =
> let get_executable_suffix () =
> #if !INTERACTIVE
> Runtime.get_executable_suffix ()
> #else
> get_executable_suffix ()
> #endif
>
> let is_windows () =
> #if !INTERACTIVE
> ...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> //// test
>
> type AssertExceptionFormatter (ex) =
> member _.Text =
> ex.ToString()
> .Replace("32m", "<span style=\"color: green;\">")
> .Replace("36m", "</span>")
> .Replace("31m", "<span style=\"color: red;\">")
> .Replace("\n", "<br/>\n")
>
>
> Formatter.Register<AssertExceptionFormatter> ((fun (x :
> AssertExceptionFormatter) -> x.Text), "text/html")
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> //// test
>
> let inline __expect fn log expected actual =
> if log then printfn $"{actual.ToDisplayString ()}"
> try
> "Testing.__expect" |> fn actual expected
> with :? Expecto.AssertException as ex ->
> AssertExceptionFormatter(ex).Display () |> ignore
> failwith (ex.GetType().FullName)
>
> let inline __contains log expected actual = __expect Expecto.Expect.contains log
> expected actual
> let inline _contains expected actual = __contains true expected actual
>
> let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
> expected actual
> let inline _assertEqual expected actual = __assertEqual true expected actual
>
> let inline __isGreaterThan log expected actual = __expect
> Expecto.Expect.isGreaterThan log expected actual
> let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
>
> let inline __isGreaterThanOrEqual log expected actual = __expect
> Expecto.Expect.isGreaterThanOrEqual log expected actual
> let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
> expected actual
>
> let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
> log expected actual
> let inline _isLessThan expected actual = __isLessThan true expected actual
>
> let inline __isLessThanOrEqual log expected actual = __expect
> Expecto.Expect.isLessThanOrEqual log expected actual
> let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
> expected actual
>
> let inline __sequenceEqual log expected actual = __expe...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> //// test
>
> let inline __isBetween log a b actual =
> let inline isBetween actual (a, b) _ =
> __isGreaterThanOrEqual log a actual
> __isLessThanOrEqual log b actual
> __expect isBetween log (a, b) actual
> let inline _isBetween a b actual = __isBetween true a b actual
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> #!import ../../lib/fsharp/Common.fs
> #!import ../../lib/fsharp/CommonFSharp.fs
> #!import ../../lib/fsharp/Async.fs
> #!import ../../lib/fsharp/AsyncSeq.fs
> #!import ../../lib/fsharp/Runtime.fs
> #!import ../../lib/fsharp/FileSystem.fs
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if !INTERACTIVE
> namespace Polyglot
> #endif
>
> module Common =
>
> #if !INTERACTIVE
> open Lib
> #endif
>
> let nl = System.Environment.NewLine
> let q = @""""
>
> let inline cons head tail = head :: tail
>
> /// ## memoize
> let inline memoize fn =
> let result = lazy fn ()
> fun () -> result.Value
>
> /// ## TraceLevel
> type TraceLevel =
> | Verbose
> | Debug
> | Info
> | Warning
> | Critical
>
> let inline _locals () = ""
>
> /// ## trace
> let to_trace_level = function
> | Verbose -> SpiralTrace.TraceLevel.US0_0
> | Debug -> SpiralTrace.TraceLevel.US0_1
> | Info -> SpiralTrace.TraceLevel.US0_2
> | Warning -> SpiralTrace.TraceLevel.US0_3
> | Critical -> SpiralTrace.TraceLevel.US0_4
>
> let trace level fn locals =
> let level = level |> to_trace_level
> SpiralTrace.trace level fn locals
>
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if !INTERACTIVE
> namespace Polyglot
> #endif
>
> module CommonFSharp =
>
> open Common
>
> /// ## getUnionCaseName
> let inline getUnionCaseName<'T> (x: 'T) =
> match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
> | case, _ -> case.Name
>
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if !INTERACTIVE
> namespace Polyglot
> #endif
>
> module Async =
>
> #if !INTERACTIVE
> open Lib
> #endif
>
> open Common
>
> /// ## choice
> let inline choice asyncs = async {
> let e = Event<_> ()
> use cts = new System.Threading.CancellationTokenSource ()
> let fn =
> asyncs
> |> Seq.map (fun a -> async {
> let! x = a
> e.Trigger x
> })
> |> Async.Parallel
> |> Async.Ignore
> Async.Start (fn, cts.Token)
> let! result = Async.AwaitEvent e.Publish
> cts.Cancel ()
> return result
> }
>
> /// ## map
> let inline map fn a = async {
> let! x = a
> return fn x
> }
>
> /// ## catch
> let inline catch a =
> a
> |> Async.Catch
> |> map (function
> | Choice1Of2 result -> Ok result
> | Choice2Of2 ex -> Error ex
> )
>
> /// ## runWithTimeoutChoiceAsync
> let inline runWithTimeoutChoiceAsync (timeout : int) fn =
> let _locals () = $"timeout: {timeout} / {_locals ()}"
>
> let timeoutTask = async {
> do! Async.Sleep timeout
> trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
> return None
> }
>
> let task = async {
> try
> let! result = fn
> return Some result
> with
> | :? System.AggregateException as ex when
> ex.InnerExceptions
> |> Seq.exists (function :? Sys...
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if !INTERACTIVE
> namespace Polyglot
> #endif
>
> module AsyncSeq =
>
> #if !INTERACTIVE
> open Lib
> #endif
>
> open Common
>
> /// ## subscribeEvent
> let inline subscribeEvent (event: IEvent<'H, 'A>) map =
> let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
> 'A>(event.AddHandler, event.RemoveHandler)
> System.Reactive.Linq.Observable.Select (observable, fun event -> map
> event.EventArgs)
> |> FSharp.Control.AsyncSeq.ofObservableBuffered
>
> /// ## subscribeToken
> let subscribeToken (token : System.Threading.CancellationToken) =
> let tcs = new System.Threading.Tasks.TaskCompletionSource ()
> System.Action tcs.SetResult |> token.Register |> ignore
> let start = System.DateTime.Now.Ticks
> FSharp.Control.AsyncSeq.unfoldAsync
> (fun () -> async {
> do! tcs.Task |> Async.AwaitTask
> return Some (System.DateTime.Now.Ticks - start, ())
> })
> ()
>
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if !INTERACTIVE
> namespace Polyglot
> #endif
>
> module Runtime =
>
> #if !INTERACTIVE
> open Lib
> #endif
>
> open Common
>
> /// ## parseArgs
> let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
> let assemblyName =
> System.Reflection.Assembly.GetEntryAssembly().GetName().Name
> let errorHandler : Argu.IExiter =
> if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
> List.contains assemblyName
> then Argu.ExceptionExiter ()
> else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
> _ -> Some System.ConsoleColor.Red)
>
> let parser =
> Argu.ArgumentParser.Create<'T> (
> programName =
> $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
> errorHandler = errorHandler
> )
>
> parser.ParseCommandLine args
>
> let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
> args
> |> parseArgs<'T>
> |> fun results -> results.GetAllResults ()
>
> let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
> args
> |> parseAllArgs<'T>
> |> List.groupBy CommonFSharp.getUnionCaseName<'T>
> |> Map.ofList
>
>
> ── fsharp - import ─────────────────────────────────────────────────────────────
> #if !INTERACTIVE
> namespace Polyglot
> #endif
>
> module FileSystem =
>
> #if !INTERACTIVE
> open Lib
> #endif
>
> open Common
> open SpiralFileSystem.Operators
>
> /// ## watchDirectory
> [[<RequireQualifiedAccess>]]
> type FileSystemChangeType =
> | Failure
> | Changed
> | Created
> | Deleted
> | Renamed
>
> [[<RequireQualifiedAccess>]]
> type FileSystemChange =
> | Failure of exn: exn
> | Changed of path: string * content: string option
> | Created of path: string * content: string option
> | Deleted of path: string
> | Renamed of oldPath: string * (string * string option)
>
>
> let inline watchDirectoryWithFilter filter shouldReadContent path =
> let fullPath = path |> System.IO.Path.GetFullPath
> let _locals () = $"filter: {filter} / {_locals ()}"
>
> let watcher =
> new System.IO.FileSystemWatcher (
> Path = fullPath,
> NotifyFilter = filter,
> EnableRaisingEvents = true,
> IncludeSubdirectories = true
> )
>
> let inline getEventPath (path : string) =
> path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
> SpiralSm.trim_start [[| '/'; '\\' |]]
>
> let inline ticks () =
> System.DateTime.UtcNow.Ticks
>
> let changedStream =
> AsyncSeq.subscribeEvent
> watcher.Changed
> (fun event ->
> ticks (),
> [[ FileSystemChange...
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> #if !INTERACTIVE
> open Lib
> #endif
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> open Common
> open SpiralFileSystem.Operators
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## buildProject │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let inline buildProject runtime outputDir path = async {
> let fullPath = path |> System.IO.Path.GetFullPath
> let fileDir = fullPath |> System.IO.Path.GetDirectoryName
> let extension = fullPath |> System.IO.Path.GetExtension
>
> trace Debug
> (fun () -> "buildProject")
> (fun () -> $"fullPath: {fullPath} / {_locals ()}")
>
> match extension with
> | ".fsproj" -> ()
> | _ -> failwith "Invalid project file"
>
> let runtimes =
> runtime
> |> Option.map List.singleton
> |> Option.defaultValue [[ "linux-x64"; "win-x64" ]]
>
> let outputDir = outputDir |> Option.defaultValue "dist"
>
> return!
> runtimes
> |> List.map (fun runtime -> async {
> let command = $@"dotnet publish ""{path}"" --configuration Release
> --output ""{outputDir}"" --runtime {runtime}"
> let! exitCode, _result =
> SpiralRuntime.execution_options (fun x ->
> { x with
> l1 = command
> l6 = Some fileDir
> }
> )
> |> SpiralRuntime.execute_with_options_async
> return exitCode
> })
> |> Async.Sequential
> |> Async.map Array.sum
> }
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## persistCodeProject │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let inline persistCodeProject packages modules name hash code = async {
> trace Debug
> (fun () -> "persistCodeProject")
> (fun () -> $"packages: {packages} / modules: {modules} / name: {name} /
> hash: {hash} / code.Length: {code |> String.length} / {_locals ()}")
>
> let workspaceRoot = SpiralFileSystem.get_workspace_root ()
>
> let targetDir =
> let targetDir = workspaceRoot </> "target/polyglot/builder" </> name
> match hash with
> | Some hash -> targetDir </> "packages" </> hash
> | None -> targetDir
> System.IO.Directory.CreateDirectory targetDir |> ignore
>
> let filePath = targetDir </> $"{name}.fs" |> System.IO.Path.GetFullPath
> do! code |> SpiralFileSystem.write_all_text_exists filePath
>
> let modulesCode =
> modules
> |> List.map (fun path -> $"""<Compile Include="{workspaceRoot </> path}"
> />""")
> |> SpiralSm.concat "\n "
>
> let fsprojPath = targetDir </> $"{name}.fsproj"
> let fsprojCode = $"""<Project Sdk="Microsoft.NET.Sdk">
> <PropertyGroup>
> <TargetFramework>net9.0</TargetFramework>
> <LangVersion>preview</LangVersion>
> <RollForward>Major</RollForward>
> <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
> <PublishAot>false</PublishAot>
> <PublishTrimmed>false</PublishTrimmed>
> <PublishSingleFile>true</PublishSingleFile>
> <SelfContained>true</SelfContained>
> <Version>0.0.1-alpha.1</Version>
> <OutputType>Exe</OutputType>
> </PropertyGroup>
>
> <ItemGroup>
> {modulesCode}
> <Compile Include="{filePath}" />
> </ItemGroup>
>
> <Import Project="{workspaceRoot}/.paket/Paket.Restore.targets" />
> </Project>
> """
> do! fsprojCode |> SpiralFileSystem.write_all_text_exists fsprojPath
>
> let paketReferencesPath = targetDir </> "paket.references"
> let paketReferencesCode =
> "FSharp.Core" :: packages
> |> SpiralSm.concat "\n"
> do! paketReferencesCode |> SpiralFileSystem.write_all_text_exists
> paketReferencesPath
>
> return fsprojPath
> }
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## buildCode │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let inline buildCode runtime packages modules outputDir name code = async {
> let! fsprojPath = code |> persistCodeProject packages modules name None
> let! exitCode = fsprojPath |> buildProject runtime outputDir
> if exitCode > 0 then
> let! fsprojText = fsprojPath |> SpiralFileSystem.read_all_text_async
> trace Critical
> (fun () -> "buildCode")
> (fun () -> $"code: {code |> SpiralSm.ellipsis_end 400} / fsprojText:
> {fsprojText} / {_locals ()}")
> return exitCode
> }
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> //// test
>
> "1 + 1 |> ignore"
> |> buildCode None [[]] [[]] None "test1"
> |> Async.runWithTimeout 180000
> |> _assertEqual (Some 0)
>
> ╭─[ 10.27s - stdout ]──────────────────────────────────────────────────────────╮
> │ 00:00:02 debug #1 persistCodeProject / packages: [] / modules: [] / name: │
> │ test1 / hash: / code.Length: 15 │
> │ 00:00:03 debug #2 buildProject / fullPath: │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj │
> │ 00:00:05 debug #1 execute_with_options_async / options: struct (None, │
> │ "dotnet publish │
> │ "C:\home\git\polyglot\target/polyglot/builder\test1\test1.fsproj" │
> │ --configuration Release --output "dist" --runtime linux-x64", │
> │ [||], None, None, true, │
> │ Some "C:\home\git\polyglot\target\polyglot\builder\test1") │
> │ 00:00:05 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for │
> │ .NET │
> │ 00:00:06 verbose #3 > Determining projects to restore... │
> │ 00:00:07 verbose #4 > Restored │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj (in 382 ms). │
> │ 00:00:07 verbose #5 > │
> │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
> │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
> │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
> │ .NET. See: https://aka.ms/dotnet-support-policy [ │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
> │ 00:00:08 verbose #6 > test1 -> │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\bin\Release\net9.0\linux- │
> │ x64\test1.dll │
> │ 00:00:09 verbose #7 > test1 -> │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\dist\ │
> │ 00:00:09 debug #8 execute_with_options_async / exit_code: 0 / │
> │ output.Length: 693 │
> │ 00:00:09 debug #9 execute_with_options_async / options: struct (None, │
> │ "dotnet publish │
> │ "C:\home\git\polyglot\target/polyglot/builder\test1\test1.fsproj" │
> │ --configuration Release --output "dist" --runtime win-x64", │
> │ [||], None, None, true, │
> │ Some "C:\home\git\polyglot\target\polyglot\builder\test1") │
> │ 00:00:10 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
> │ for .NET │
> │ 00:00:10 verbose #11 > Determining projects to restore... │
> │ 00:00:11 verbose #12 > Restored │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj (in 323 ms). │
> │ 00:00:11 verbose #13 > │
> │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
> │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
> │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
> │ .NET. See: https://aka.ms/dotnet-support-policy [ │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
> │ 00:00:12 verbose #14 > test1 -> │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\bin\Release\net9.0\win-x6 │
> │ 4\test1.dll │
> │ 00:00:15 verbose #15 > test1 -> │
> │ C:\home\git\polyglot\target\polyglot\builder\test1\dist\ │
> │ 00:00:15 debug #16 execute_with_options_async / exit_code: 0 / │
> │ output.Length: 691 │
> │ Some 0 │
> │ │
> │ │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> //// test
>
> "1 + a |> ignore"
> |> buildCode None [[]] [[]] None "test2"
> |> Async.runWithTimeout 180000
> |> _assertEqual (Some 2)
>
> ╭─[ 7.04s - stdout ]───────────────────────────────────────────────────────────╮
> │ 00:00:13 debug #3 persistCodeProject / packages: [] / modules: [] / name: │
> │ test2 / hash: / code.Length: 15 │
> │ 00:00:13 debug #4 buildProject / fullPath: │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj │
> │ 00:00:15 debug #17 execute_with_options_async / options: struct (None, │
> │ "dotnet publish │
> │ "C:\home\git\polyglot\target/polyglot/builder\test2\test2.fsproj" │
> │ --configuration Release --output "dist" --runtime linux-x64", │
> │ [||], None, None, true, │
> │ Some "C:\home\git\polyglot\target\polyglot\builder\test2") │
> │ 00:00:16 verbose #18 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
> │ for .NET │
> │ 00:00:16 verbose #19 > Determining projects to restore... │
> │ 00:00:17 verbose #20 > Restored │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj (in 355 ms). │
> │ 00:00:17 verbose #21 > │
> │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
> │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
> │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
> │ .NET. See: https://aka.ms/dotnet-support-policy [ │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
> │ 00:00:19 verbose #22 > │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs(1,5): error │
> │ FS0039: The value or constructor 'a' is not defined. [ │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
> │ 00:00:19 debug #23 execute_with_options_async / exit_code: 1 / │
> │ output.Length: 715 │
> │ 00:00:19 debug #24 execute_with_options_async / options: struct (None, │
> │ "dotnet publish │
> │ "C:\home\git\polyglot\target/polyglot/builder\test2\test2.fsproj" │
> │ --configuration Release --output "dist" --runtime win-x64", │
> │ [||], None, None, true, │
> │ Some "C:\home\git\polyglot\target\polyglot\builder\test2") │
> │ 00:00:19 verbose #25 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
> │ for .NET │
> │ 00:00:19 verbose #26 > Determining projects to restore... │
> │ 00:00:20 verbose #27 > Restored │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj (in 349 ms). │
> │ 00:00:20 verbose #28 > │
> │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
> │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
> │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
> │ .NET. See: https://aka.ms/dotnet-support-policy [ │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
> │ 00:00:22 verbose #29 > │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs(1,5): error │
> │ FS0039: The value or constructor 'a' is not defined. [ │
> │ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
> │ 00:00:22 debug #30 execute_with_options_async / exit_code: 1 / │
> │ output.Length: 715 │
> │ 00:00:20 critical #5 buildCode / code: 1 + a |> ignore / fsprojText: │
> │ <Project Sdk="Microsoft.NET.Sdk"> │
> │ <PropertyGroup> │
> │ <TargetFramework>net9.0</TargetFramework> │
> │ <LangVersion>preview</LangVersion> │
> │ <RollForward>Major</RollForward> │
> │ <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> │
> │ <PublishAot>false</PublishAot> │
> │ <PublishTrimmed>false</PublishTrimmed> │
> │ <PublishSingleFile>true</PublishSingleFile> │
> │ <SelfContained>true</SelfContained> │
> │ <Version>0.0.1-alpha.1</Version> │
> │ <OutputType>Exe</OutputType> │
> │ </PropertyGroup> │
> │ │
> │ <ItemGroup> │
> │ │
> │ <Compile │
> │ Include="C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs" /> │
> │ </ItemGroup> │
> │ │
> │ <Import Project="C:\home\git\polyglot/.paket/Paket.Restore.targets" /> │
> │ </Project> │
> │ │
> │ Some 2 │
> │ │
> │ │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## readFile │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let inline readFile path = async {
> let! code = path |> SpiralFileSystem.read_all_text_async
>
> let code = System.Text.RegularExpressions.Regex.Replace (
> code,
> @"( *)(let\s+main\s+.*?\s*=)",
> fun m -> m.Groups.[[1]].Value + "[[<EntryPoint>]]\n" +
> m.Groups.[[1]].Value + m.Groups.[[2]].Value
> )
>
> let codeTrim = code |> SpiralSm.trim_end [[||]]
> return
> if codeTrim |> SpiralSm.ends_with "\n()"
> then codeTrim |> SpiralSm.slice 0 ((codeTrim |> String.length) - 3)
> else code
> }
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## buildFile │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let inline buildFile runtime packages modules path = async {
> let fullPath = path |> System.IO.Path.GetFullPath
> let dir = fullPath |> System.IO.Path.GetDirectoryName
> let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension
> let! code = fullPath |> readFile
> return! code |> buildCode runtime packages modules (dir </> "dist" |> Some)
> name
> }
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## persistFile │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let inline persistFile packages modules path = async {
> let fullPath = path |> System.IO.Path.GetFullPath
> let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension
> let! code = fullPath |> readFile
> return! code |> persistCodeProject packages modules name None
> }
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## Arguments │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> [[<RequireQualifiedAccess>]]
> type Arguments =
> | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce>]]
> Path of path : string
> | [[<Argu.ArguAttributes.Unique>]] Packages of packages : string list
> | [[<Argu.ArguAttributes.Unique>]] Modules of modules : string list
> | [[<Argu.ArguAttributes.Unique>]] Runtime of runtime : string
> | [[<Argu.ArguAttributes.Unique>]] Persist_Only
>
> interface Argu.IArgParserTemplate with
> member s.Usage =
> match s with
> | Path _ -> nameof Path
> | Packages _ -> nameof Packages
> | Modules _ -> nameof Modules
> | Runtime _ -> nameof Runtime
> | Persist_Only -> nameof Persist_Only
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> //// test
>
> Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
>
> ╭─[ 115.28ms - return value ]──────────────────────────────────────────────────╮
> │ "USAGE: dotnet-repl [--help] [--packages [<packages>...]] │
> │ [--modules [<modules>...]] [--runtime <runtime>] │
> │ [--persist-only] <path> │
> │ │
> │ PATH: │
> │ │
> │ <path> Path │
> │ │
> │ OPTIONS: │
> │ │
> │ --packages [<packages>...] │
> │ Packages │
> │ --modules [<modules>...] │
> │ Modules │
> │ --runtime <runtime> Runtime │
> │ --persist-only Persist_Only │
> │ --help display this list of options. │
> │ " │
> │ │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── markdown ────────────────────────────────────────────────────────────────────
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ ## main │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let main args =
> let argsMap = args |> Runtime.parseArgsMap<Arguments>
>
> let path =
> match argsMap.[[nameof Arguments.Path]] with
> | [[ Arguments.Path path ]] -> Some path
> | _ -> None
> |> Option.get
>
> let packages =
> match argsMap |> Map.tryFind (nameof Arguments.Packages) with
> | Some [[ Arguments.Packages packages ]] -> packages
> | _ -> [[]]
>
> let modules =
> match argsMap |> Map.tryFind (nameof Arguments.Modules) with
> | Some [[ Arguments.Modules modules ]] -> modules
> | _ -> [[]]
>
> let runtime =
> match argsMap |> Map.tryFind (nameof Arguments.Runtime) with
> | Some [[ Arguments.Runtime runtime ]] -> Some runtime
> | _ -> None
>
> let persistOnly = argsMap |> Map.containsKey (nameof Arguments.Persist_Only)
>
> if persistOnly
> then path |> persistFile packages modules |> Async.map (fun _ -> 0)
> else path |> buildFile runtime packages modules
> |> Async.runWithTimeout (60000 * 60)
> |> function
> | Some exitCode -> exitCode
> | None -> 1
>
> ── fsharp ──────────────────────────────────────────────────────────────────────
> //// test
>
> let args =
> System.Environment.GetEnvironmentVariable "ARGS"
> |> SpiralRuntime.split_args
> |> Seq.toArray
>
> match args with
> | [[||]] -> 0
> | args -> if main args = 0 then 0 else failwith "main failed"
>
> ╭─[ 27.19s - return value ]────────────────────────────────────────────────────╮
> │ <div class="dni-plaintext"><pre>0 │
> │ </pre></div><style> │
> │ .dni-code-hint { │
> │ font-style: italic; │
> │ overflow: hidden; │
> │ white-space: nowrap; │
> │ } │
> │ .dni-treeview { │
> │ white-space: nowrap; │
> │ } │
> │ .dni-treeview td { │
> │ vertical-align: top; │
> │ text-align: start; │
> │ } │
> │ details.dni-treeview { │
> │ padding-left: 1em; │
> │ } │
> │ table td { │
> │ text-align: start; │
> │ } │
> │ table tr { │
> │ vertical-align: top; │
> │ margin: 0em 0px; │
> │ } │
> │ table tr td pre │
> │ { │
> │ vertical-align: top !important; │
> │ margin: 0em 0px !important; │
> │ } │
> │ table th { │
> │ text-align: start; │
> │ } │
> │ </style> │
> ╰──────────────────────────────────────────────────────────────────────────────╯
>
> ╭─[ 27.19s - stdout ]──────────────────────────────────────────────────────────╮
> │ 00:00:21 debug #6 persistCodeProject / packages: [Argu; │
> │ FSharp.Control.AsyncSeq; System.Reactive.Linq] / modules: [ │
> │ lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / │
> │ name: Builder / hash: / code.Length: 7651 │
> │ 00:00:21 debug #7 buildProject / fullPath: │
> │ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj │
> │ 00:00:23 debug #31 execute_with_options_async / options: struct (None, │
> │ "dotnet publish │
> │ "C:\home\git\polyglot\target/polyglot/builder\Builder\Builder.fsproj" │
> │ --configuration Release --output "C:\home\git\polyglot\apps\builder\dist" │
> │ --runtime linux-x64", │
> │ [||], None, None, true, │
> │ Some "C:\home\git\polyglot\target\polyglot\builder\Builder") │
> │ 00:00:23 verbose #32 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
> │ for .NET │
> │ 00:00:24 verbose #33 > Determining projects to restore... │
> │ 00:00:25 verbose #34 > Restored │
> │ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj (in 395 │
> │ ms). │
> │ 00:00:25 verbose #35 > │
> │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
> │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
> │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
> │ .NET. See: https://aka.ms/dotnet-support-policy [ │
> │ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj] │
> │ 00:00:34 verbose #36 > Builder -> │
> │ C:\home\git\polyglot\target\polyglot\builder\Builder\bin\Release\net9.0\linu │
> │ x-x64\Builder.dll │
> │ 00:00:35 verbose #37 > Builder -> C:\home\git\polyglot\apps\builder\dist\ │
> │ 00:00:35 debug #38 execute_with_options_async / exit_code: 0 / │
> │ output.Length: 692 │
> │ 00:00:35 debug #39 execute_with_options_async / options: struct (None, │
> │ "dotnet publish │
> │ "C:\home\git\polyglot\target/polyglot/builder\Builder\Builder.fsproj" │
> │ --configuration Release --output "C:\home\git\polyglot\apps\builder\dist" │
> │ --runtime win-x64", │
> │ [||], None, None, true, │
> │ Some "C:\home\git\polyglot\target\polyglot\builder\Builder") │
> │ 00:00:36 verbose #40 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
> │ for .NET │
> │ 00:00:36 verbose #41 > Determining projects to restore... │
> │ 00:00:37 verbose #42 > Restored │
> │ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj (in 370 │
> │ ms). │
> │ 00:00:37 verbose #43 > │
> │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
> │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
> │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
> │ .NET. See: https://aka.ms/dotnet-support-policy [ │
> │ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj] │
> │ 00:00:46 verbose #44 > Builder -> │
> │ C:\home\git\polyglot\target\polyglot\builder\Builder\bin\Release\net9.0\win- │
> │ x64\Builder.dll │
> │ 00:00:50 verbose #45 > Builder -> C:\home\git\polyglot\apps\builder\dist\ │
> │ 00:00:50 debug #46 execute_with_options_async / exit_code: 0 / │
> │ output.Length: 690 │
> │ │
> ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:03 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 56649
00:01:03 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:06 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/builder/Builder.dib.ipynb to html
00:01:06 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:06 verbose #7 ! validate(nb)
00:01:08 verbose #8 ! [NbConvertApp] Writing 330861 bytes to c:\home\git\polyglot\apps\builder\Builder.dib.html
00:01:08 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649
00:01:08 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649
00:01:08 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/builder/Builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/builder/Builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:09 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:09 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:09 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 57357
In [ ]:
{ pwsh ../apps/parser/build.ps1 } | Invoke-Block
00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "DibParser.dib"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/DibParser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/DibParser.dib" --output-path "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # DibParser (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" > #r > @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP > arsec.dll" > #r > @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP > arsecCS.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A > spNetCore.Html.Abstractions.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.Formatting.dll" > open System > open System.IO > open System.Text > open Microsoft.DotNet.Interactive.Formatting > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > open type Microsoft.DotNet.Interactive.Kernel > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: > TextWriter)->fprintfn writer "%120A" x) > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Notebooks.dib > #!import ../../lib/fsharp/Testing.dib > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > Formatter.ListExpansionLimit <- 100 > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] > #endif > type Mut<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Co... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] > #endif > type async_std_task_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] > #endif > type std_future_Future<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] > #endif > type rayon_vec_IntoIter<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] > #endif > type rayon_iter_Map<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] > #endif > type futures_lite_stream_StreamExt = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] > #endif > type futures_future_TryJoinAll<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] > #endif > type futures_future_Fuse<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] > #endif > type futures_future_JoinAll<'T> = class end > let rec closure0 () (v0 : System.Threading.CancellationToken) : > Async<System.Threading.CancellationToken> = > let v1 : bool = true > let mutable _v1 : Async<System.Threading.CancellationToken> option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT > let v2 : Async<System.Threading.CancellationToken> = null |> > unbox<Async<System... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] > #endif > type std_thread_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] > #endif > type std_sync_Arc<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] > #endif > type std_sync_Mutex<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] > #endif > type std_sync_MutexGuard<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] > #endif > type std_sync_PoisonError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] > #endif > type std_sync_mpsc_Receiver<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] > #endif > type std_sync_mpsc_SendError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] > #endif > type std_sync_mpsc_Sender<'T> = class end > type Disposable (f : unit -> unit) = interface System.IDisposable with member > _.Dispose () = f () > type [[<Struct>]] US0 = > | US0_0 of f0_0 : System.Threading.CancellationToken > | US0_1 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = > let v1 : bool = true > let mutable _v1 : unit option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] > #endif > type reqwest_Error = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] > #endif > type reqwest_RequestBuilder = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] > #endif > type reqwest_Response = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] > #endif > type clap_Arg = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] > #endif > type clap_ArgAction = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] > #endif > type clap_Command = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] > #endif > type clap_ArgMatches = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] > #endif > type clap_builder_ValueRange = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] > #endif > type clap_builder_ValueParser = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] > #endif > type clap_builder_PossibleValue = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] > #endif > type std_process_Child = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] > #endif > type std_process_ChildStderr = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] > #endif > type std_process_ChildStdout = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] > #endif > type std_process_ChildStdin = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] > #endif > type std_process_Command = class ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] > #endif > type std_fs_File = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] > #endif > type std_fs_FileType = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] > #endif > type std_path_Display = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] > #endif > type std_path_Path = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] > #endif > type std_path_PathBuf = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] > #endif > type async_walkdir_DirEntry = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] > #endif > type async_walkdir_Filtering = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] > #endif > type async_walkdir_WalkDir = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = clas... > > ── fsharp - import ───────────────────────────────────────────────────────────── > module SpiralTrace = > let trace x = > #if !INTERACTIVE > Trace.trace x > #else > trace x > #endif > > type TraceLevel = > #if !INTERACTIVE > Trace.US0 > #else > US0 > #endif > > module SpiralCrypto = > let hash_text x = > #if !INTERACTIVE > Crypto.hash_text x > #else > hash_text x > #endif > > #if !FABLE_COMPILER && !WASM && !CONTRACT > > module SpiralAsync = > let merge_cancellation_token_with_default_async x = > #if !INTERACTIVE > Async_.merge_cancellation_token_with_default_async x > #else > merge_cancellation_token_with_default_async x > #endif > > module SpiralThreading = > let new_disposable_token x = > #if !INTERACTIVE > Threading.new_disposable_token x > #else > new_disposable_token x > #endif > > module SpiralNetworking = > let test_port_open x = > #if !INTERACTIVE > Networking.test_port_open x > #else > test_port_open x > #endif > > let test_port_open_timeout x = > #if !INTERACTIVE > Networking.test_port_open_timeout x > #else > test_port_open_timeout x > #endif > > let wait_for_port_access x = > #if !INTERACTIVE > Networking.wait_for_port_access x > #else > wait_for_port_access x > #endif > > let get_available_port x = > #if !INTERACTIVE > Networking.get_available_port x > #else > get_available_port x > #endif > > module SpiralRuntime = > let get_executable_suffix () = > #if !INTERACTIVE > Runtime.get_executable_suffix () > #else > get_executable_suffix () > #endif > > let is_windows () = > #if !INTERACTIVE > ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > type AssertExceptionFormatter (ex) = > member _.Text = > ex.ToString() > .Replace("32m", "<span style=\"color: green;\">") > .Replace("36m", "</span>") > .Replace("31m", "<span style=\"color: red;\">") > .Replace("\n", "<br/>\n") > > > Formatter.Register<AssertExceptionFormatter> ((fun (x : > AssertExceptionFormatter) -> x.Text), "text/html") > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __expect fn log expected actual = > if log then printfn $"{actual.ToDisplayString ()}" > try > "Testing.__expect" |> fn actual expected > with :? Expecto.AssertException as ex -> > AssertExceptionFormatter(ex).Display () |> ignore > failwith (ex.GetType().FullName) > > let inline __contains log expected actual = __expect Expecto.Expect.contains log > expected actual > let inline _contains expected actual = __contains true expected actual > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log > expected actual > let inline _assertEqual expected actual = __assertEqual true expected actual > > let inline __isGreaterThan log expected actual = __expect > Expecto.Expect.isGreaterThan log expected actual > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual > > let inline __isGreaterThanOrEqual log expected actual = __expect > Expecto.Expect.isGreaterThanOrEqual log expected actual > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true > expected actual > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan > log expected actual > let inline _isLessThan expected actual = __isLessThan true expected actual > > let inline __isLessThanOrEqual log expected actual = __expect > Expecto.Expect.isLessThanOrEqual log expected actual > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true > expected actual > > let inline __sequenceEqual log expected actual = __expe... > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __isBetween log a b actual = > let inline isBetween actual (a, b) _ = > __isGreaterThanOrEqual log a actual > __isLessThanOrEqual log b actual > __expect isBetween log (a, b) actual > let inline _isBetween a b actual = __isBetween true a b actual > > ── pwsh ──────────────────────────────────────────────────────────────────────── > ls ~/.nuget/packages/argu > > ╭─[ 617.17ms - stdout ]────────────────────────────────────────────────────────╮ > │ │ > │ Directory: C:\Users\i574n\.nuget\packages\argu │ > │ │ > │ Mode LastWriteTime Length[ │ > │ 32;1m Name │ > │ ---- ------------- ------ [ │ > │ 32;1m---- │ > │ d---- 2023-05-17 3:38 PM 6.1.1 │ > │ d---- 2024-03-12 8:22 PM 6.1.4 │ > │ d---- 2024-01-29 5:12 PM 6.1.5 │ > │ d---- 2024-03-12 8:20 PM 6.2.0 │ > │ d---- 2024-02-23 6:50 PM 6.2.1 │ > │ d---- 2024-03-12 8:15 PM 6.2.2 │ > │ d---- 2024-05-14 8:20 PM 6.2.3 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Common.fs > #!import ../../lib/fsharp/CommonFSharp.fs > #!import ../../lib/fsharp/Async.fs > #!import ../../lib/fsharp/AsyncSeq.fs > #!import ../../lib/fsharp/Runtime.fs > #!import ../../lib/fsharp/FileSystem.fs > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Common = > > #if !INTERACTIVE > open Lib > #endif > > let nl = System.Environment.NewLine > let q = @"""" > > let inline cons head tail = head :: tail > > /// ## memoize > let inline memoize fn = > let result = lazy fn () > fun () -> result.Value > > /// ## TraceLevel > type TraceLevel = > | Verbose > | Debug > | Info > | Warning > | Critical > > let inline _locals () = "" > > /// ## trace > let to_trace_level = function > | Verbose -> SpiralTrace.TraceLevel.US0_0 > | Debug -> SpiralTrace.TraceLevel.US0_1 > | Info -> SpiralTrace.TraceLevel.US0_2 > | Warning -> SpiralTrace.TraceLevel.US0_3 > | Critical -> SpiralTrace.TraceLevel.US0_4 > > let trace level fn locals = > let level = level |> to_trace_level > SpiralTrace.trace level fn locals > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module CommonFSharp = > > open Common > > /// ## getUnionCaseName > let inline getUnionCaseName<'T> (x: 'T) = > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with > | case, _ -> case.Name > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Async = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## choice > let inline choice asyncs = async { > let e = Event<_> () > use cts = new System.Threading.CancellationTokenSource () > let fn = > asyncs > |> Seq.map (fun a -> async { > let! x = a > e.Trigger x > }) > |> Async.Parallel > |> Async.Ignore > Async.Start (fn, cts.Token) > let! result = Async.AwaitEvent e.Publish > cts.Cancel () > return result > } > > /// ## map > let inline map fn a = async { > let! x = a > return fn x > } > > /// ## catch > let inline catch a = > a > |> Async.Catch > |> map (function > | Choice1Of2 result -> Ok result > | Choice2Of2 ex -> Error ex > ) > > /// ## runWithTimeoutChoiceAsync > let inline runWithTimeoutChoiceAsync (timeout : int) fn = > let _locals () = $"timeout: {timeout} / {_locals ()}" > > let timeoutTask = async { > do! Async.Sleep timeout > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals > return None > } > > let task = async { > try > let! result = fn > return Some result > with > | :? System.AggregateException as ex when > ex.InnerExceptions > |> Seq.exists (function :? Sys... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module AsyncSeq = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## subscribeEvent > let inline subscribeEvent (event: IEvent<'H, 'A>) map = > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, > 'A>(event.AddHandler, event.RemoveHandler) > System.Reactive.Linq.Observable.Select (observable, fun event -> map > event.EventArgs) > |> FSharp.Control.AsyncSeq.ofObservableBuffered > > /// ## subscribeToken > let subscribeToken (token : System.Threading.CancellationToken) = > let tcs = new System.Threading.Tasks.TaskCompletionSource () > System.Action tcs.SetResult |> token.Register |> ignore > let start = System.DateTime.Now.Ticks > FSharp.Control.AsyncSeq.unfoldAsync > (fun () -> async { > do! tcs.Task |> Async.AwaitTask > return Some (System.DateTime.Now.Ticks - start, ()) > }) > () > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Runtime = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## parseArgs > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = > let assemblyName = > System.Reflection.Assembly.GetEntryAssembly().GetName().Name > let errorHandler : Argu.IExiter = > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> > List.contains assemblyName > then Argu.ExceptionExiter () > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | > _ -> Some System.ConsoleColor.Red) > > let parser = > Argu.ArgumentParser.Create<'T> ( > programName = > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", > errorHandler = errorHandler > ) > > parser.ParseCommandLine args > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseArgs<'T> > |> fun results -> results.GetAllResults () > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseAllArgs<'T> > |> List.groupBy CommonFSharp.getUnionCaseName<'T> > |> Map.ofList > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module FileSystem = > > #if !INTERACTIVE > open Lib > #endif > > open Common > open SpiralFileSystem.Operators > > /// ## watchDirectory > [[<RequireQualifiedAccess>]] > type FileSystemChangeType = > | Failure > | Changed > | Created > | Deleted > | Renamed > > [[<RequireQualifiedAccess>]] > type FileSystemChange = > | Failure of exn: exn > | Changed of path: string * content: string option > | Created of path: string * content: string option > | Deleted of path: string > | Renamed of oldPath: string * (string * string option) > > > let inline watchDirectoryWithFilter filter shouldReadContent path = > let fullPath = path |> System.IO.Path.GetFullPath > let _locals () = $"filter: {filter} / {_locals ()}" > > let watcher = > new System.IO.FileSystemWatcher ( > Path = fullPath, > NotifyFilter = filter, > EnableRaisingEvents = true, > IncludeSubdirectories = true > ) > > let inline getEventPath (path : string) = > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> > SpiralSm.trim_start [[| '/'; '\\' |]] > > let inline ticks () = > System.DateTime.UtcNow.Ticks > > let changedStream = > AsyncSeq.subscribeEvent > watcher.Changed > (fun event -> > ticks (), > [[ FileSystemChange... > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open FParsec > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## escapeCell (test) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let inline escapeCell input = > input > |> SpiralSm.split "\n" > |> Array.map (function > | line when line |> SpiralSm.starts_with "\\#!" || line |> > SpiralSm.starts_with "\\#r" -> > System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#") > | line -> line > ) > |> SpiralSm.concat "\n" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > $"a{nl}\\#!magic{nl}b{nl}" > |> escapeCell > |> _assertEqual ( > $"a{nl}#!magic{nl}b{nl}" > ) > > ╭─[ 71.73ms - stdout ]─────────────────────────────────────────────────────────╮ > │ "a │ > │ #!magic │ > │ b │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## magicMarker │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let magicMarker : Parser<string, unit> = pstring "#!" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic" > |> run magicMarker > |> _assertEqual ( > Success ("#!", (), Position ("", 2, 1, 3)) > ) > > ╭─[ 48.72ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: "#!" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "##!magic" > |> run magicMarker > |> _assertEqual ( > Failure ( > $"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}", > ParserError ( > Position ("", 0, 1, 1), > (), > ErrorMessageList (ExpectedString "#!") > ), > () > ) > ) > > ╭─[ 74.51ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure: │ > │ Error in Ln: 1 Col: 1 │ > │ ##!magic │ > │ ^ │ > │ Expecting: '#!' │ > │ │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## magicCommand │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let magicCommand = > magicMarker > >>. manyTill anyChar newline > |>> (System.String.Concat >> SpiralSm.trim) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic > > a" > |> run magicCommand > |> _assertEqual ( > Success ("magic", (), Position ("", 8, 2, 1)) > ) > > ╭─[ 39.01ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: "magic" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > " #!magic > > a" > |> run magicCommand > |> _assertEqual ( > Failure ( > $"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}", > ParserError ( > Position ("", 0, 1, 1), > (), > ErrorMessageList (ExpectedString "#!") > ), > () > ) > ) > > ╭─[ 40.05ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure: │ > │ Error in Ln: 1 Col: 1 │ > │ #!magic │ > │ ^ │ > │ Expecting: '#!' │ > │ │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## content │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let content = > (newline >>. magicMarker) <|> (eof >>. preturn "") > |> attempt > |> lookAhead > |> manyTill anyChar > |>> (System.String.Concat >> SpiralSm.trim) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic > > > a > > > " > |> run content > |> _assertEqual ( > Success ("#!magic > > > a", (), Position ("", 14, 7, 1)) > ) > > ╭─[ 43.31ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: "#!magic │ > │ │ > │ │ > │ a" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Block │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Block = > { > magic : string > content : string > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## block │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let block = > pipe2 > magicCommand > content > (fun magic content -> > { > magic = magic > content = content > }) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic > > > a > > > " > |> run block > |> _assertEqual ( > Success ( > { magic = "magic"; content = "a" }, > (), > Position ("", 14, 7, 1) > ) > ) > > ╭─[ 54.68ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: { magic = "magic" │ > │ content = "a" } │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## blocks │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let blocks = > skipMany newline > >>. sepEndBy block (skipMany1 newline) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > > "#!magic1 > > a > > \#!magic2 > > b > > " > |> escapeCell > |> run blocks > |> _assertEqual ( > Success ( > [[ > { magic = "magic1"; content = "a" } > { magic = "magic2"; content = "b" } > ]], > (), > Position ("", 26, 9, 1) > ) > ) > > ╭─[ 51.20ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: [{ magic = "magic1" │ > │ content = "a" }; { magic = "magic2" │ > │ content = "b" }] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Output │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Output = > | Fs > | Md > | Spi > | Spir > > let inline kernelOutputs magic = > match magic with > | "fsharp" -> [[ Fs ]] > | "markdown" -> [[ Md ]] > | "spiral" -> [[ Spi; Spir ]] > | _ -> [[]] > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## formatBlock │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline formatBlock output (block : Block) = > match output, block with > | output, { magic = "markdown"; content = content } -> > let markdownComment = > match output with > | Spi | Spir -> "/// " > | Fs -> "/// " > | _ -> "" > content > |> SpiralSm.split "\n" > |> Array.map (SpiralSm.trim_end [[||]]) > |> Array.filter (SpiralSm.ends_with " (test)" >> not) > |> Array.map (function > | "" -> markdownComment > | line -> System.Text.RegularExpressions.Regex.Replace (line, > "^\\s*", $"$&{markdownComment}") > ) > |> SpiralSm.concat "\n" > | Fs, { magic = "fsharp"; content = content } -> > let trimmedContent = content |> SpiralSm.trim > if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent > |> SpiralSm.starts_with "//// ignore" > then "" > else > content > |> SpiralSm.split "\n" > |> Array.filter (SpiralSm.trim_start [[||]] >> SpiralSm.starts_with > "#r" >> not) > |> SpiralSm.concat "\n" > | (Spi | Spir), { magic = "spiral"; content = content } -> > let trimmedContent = content |> SpiralSm.trim > if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent > |> SpiralSm.starts_with "//// ignore" > then "" > else content > | _ -> "" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!markdown > > > a > > b > > c > > > \#!markdown > > > c > > > \#!fsharp > > > let a = 1" > |> escapeCell > |> run block > |> function > | Success (block, _, _) -> formatBlock Fs block > | Failure (msg, _, _) -> failwith msg > |> _assertEqual "/// a > /// > /// b > /// > /// c" > > ╭─[ 64.87ms - stdout ]─────────────────────────────────────────────────────────╮ > │ "/// a │ > │ /// │ > │ /// b │ > │ /// │ > │ /// c" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## formatBlocks │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline formatBlocks output blocks = > blocks > |> List.map (fun block -> > block, formatBlock output block > ) > |> List.filter (snd >> (<>) "") > |> fun list -> > (list, (None, [[]])) > ||> List.foldBack (fun (block, content) (lastMagic, acc) -> > let lineBreak = > if block.magic = "markdown" && lastMagic <> Some "markdown" && > lastMagic <> None > then "" > else "\n" > Some block.magic, $"{content}{lineBreak}" :: acc > ) > |> snd > |> SpiralSm.concat "\n" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!markdown > > > a > > b > > > \#!markdown > > > c > > > \#!fsharp > > > let a = 1 > > \#!markdown > > d (test) > > \#!fsharp > > //// test > > let a = 2 > > \#!markdown > > e > > \#!fsharp > > let a = 3" > |> escapeCell > |> run blocks > |> function > | Success (blocks, _, _) -> formatBlocks Fs blocks > | Failure (msg, _, _) -> failwith msg > |> _assertEqual "/// a > /// > /// b > > /// c > let a = 1 > > /// e > let a = 3 > " > > ╭─[ 85.51ms - stdout ]─────────────────────────────────────────────────────────╮ > │ "/// a │ > │ /// │ > │ /// b │ > │ │ > │ /// c │ > │ let a = 1 │ > │ │ > │ /// e │ > │ let a = 3 │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## parse │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline parse output input = > match run blocks input with > | Success (blocks, _, _) -> > let blocks = > blocks > |> List.filter (fun block -> > block.magic |> kernelOutputs |> List.contains output || > block.magic = "markdown" > ) > > match blocks with > | { magic = "markdown"; content = content } :: _ > when output = Fs > && content |> SpiralSm.starts_with "# " > && content |> SpiralSm.ends_with ")" > -> > let inline indentBlock (block : Block) = > { block with > content = > block.content > |> SpiralSm.split "\n" > |> Array.fold > (fun (lines, isMultiline) line -> > let trimmedLine = line |> SpiralSm.trim > if trimmedLine = "" > then "" :: lines, isMultiline > else > let inline singleQuoteLine () = > trimmedLine |> Seq.sumBy ((=) '"' >> > System.Convert.ToInt32) = 1 > && trimmedLine |> SpiralSm.contains > @"'""'" |> not > && trimmedLine |> SpiralSm.ends_with "{" > |> not > && trimmedLine |> SpiralSm.ends_with > "{|" |> not > && trimmedLine |> SpiralSm.starts_with > "}" |> not > && trimmedLine |> SpiralSm.starts_with > "|}" |> not > > match isMultiline, trimmedLine |> > SpiralSm.split_string [[| $"{q}{q}{q}" |]] with > | false, [[| _; _ |]] -> > $" {line}" :: lines, true > > | true, [[| _; _ |]] -> > line :: lines, false > > | false, _ when singleQuoteLine () -> > $" {line}" :: lines, true > > | false, _ when line |> SpiralSm.starts_with > "#" && block.magic = "fsharp" -> > line :: lines, false > > | false, _ -> > $" {line}" :: lines, false > > | true, _ when singleQuoteLine () && line |> > SpiralSm.starts_with " " -> > $" {line}" :: lines, false > > | true, _ when singleQuoteLine () -> > line :: lines, false > > | true, _ -> > line :: lines, true > ) > ([[]], false) > |> fst > |> List.rev > |> SpiralSm.concat "\n" > } > > let moduleName, namespaceName = > System.Text.RegularExpressions.Regex.Match (content, @"# (.*) > \((.*)\)$") > |> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value > > let moduleBlock = > { > magic = "fsharp" > content = > $"#if !INTERACTIVE > namespace {namespaceName} > #endif > > module {moduleName} =" > } > > blocks > |> List.indexed > |> List.fold > (fun blocks (index, block) -> > match index with > | 0 -> blocks > | 1 -> indentBlock block :: moduleBlock :: blocks > | _ -> indentBlock block :: blocks > ) > [[]] > |> List.rev > | _ -> blocks > |> Result.Ok > | Failure (errorMsg, _, _) -> Result.Error errorMsg > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example1 = > $"""#!meta > > {{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name": > "fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}} > > \#!markdown > > # TestModule (TestNamespace) > > \#!fsharp > > \#!import file.dib > > \#!fsharp > > \#r "nuget:Expecto" > > \#!markdown > > ## ParserLibrary > > \#!fsharp > > open System > > \#!markdown > > ## x (test) > > \#!fsharp > > //// ignore > > let x = 1 > > \#!spiral > > //// test > > inl x = 0i32 > > \#!spiral > > inl x = 0i32 > > \#!markdown > > ### TextInput > > \#!fsharp > > let str1 = "abc > def" > > let str2 = > "abc\ > def" > > let str3 = > $"1{{ > 1 > }}1" > > let str4 = > $"1{{({{| > a = 1 > |}}).a}}1" > > let str5 = > "abc \ > def" > > let x = > match '"' with > | '"' -> true > | _ -> false > > let long1 = {q}{q}{q}a{q}{q}{q} > > let long2 = > {q}{q}{q} > a > {q}{q}{q} > > \#!fsharp > > type Position = > {{ > #if INTERACTIVE > line : string > #else > line : int > #endif > column : int > }}""" > |> escapeCell > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > example1 > |> parse Fs > |> Result.toOption > |> Option.get > |> (formatBlocks Fs) > |> _assertEqual $"""#if !INTERACTIVE > namespace TestNamespace > #endif > > module TestModule = > > /// ## ParserLibrary > open System > > /// ### TextInput > let str1 = "abc > def" > > let str2 = > "abc\ > def" > > let str3 = > $"1{{ > 1 > }}1" > > let str4 = > $"1{{({{| > a = 1 > |}}).a}}1" > > let str5 = > "abc \ > def" > > let x = > match '"' with > | '"' -> true > | _ -> false > > let long1 = {q}{q}{q}a{q}{q}{q} > > let long2 = > {q}{q}{q} > a > {q}{q}{q} > > type Position = > {{ > #if INTERACTIVE > line : string > #else > line : int > #endif > column : int > }} > """ > > ╭─[ 234.33ms - stdout ]────────────────────────────────────────────────────────╮ > │ "#if !INTERACTIVE │ > │ namespace TestNamespace │ > │ #endif │ > │ │ > │ module TestModule = │ > │ │ > │ /// ## ParserLibrary │ > │ open System │ > │ │ > │ /// ### TextInput │ > │ let str1 = "abc │ > │ def" │ > │ │ > │ let str2 = │ > │ "abc\ │ > │ def" │ > │ │ > │ let str3 = │ > │ $"1{ │ > │ 1 │ > │ }1" │ > │ │ > │ let str4 = │ > │ $"1{({| │ > │ a = 1 │ > │ |}).a}1" │ > │ │ > │ let str5 = │ > │ "abc \ │ > │ def" │ > │ │ > │ let x = │ > │ match '"' with │ > │ | '"' -> true │ > │ | _ -> false │ > │ │ > │ let long1 = """a""" │ > │ │ > │ let long2 = │ > │ """ │ > │ a │ > │ """ │ > │ │ > │ type Position = │ > │ { │ > │ #if INTERACTIVE │ > │ line : string │ > │ #else │ > │ line : int │ > │ #endif │ > │ column : int │ > │ } │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > example1 > |> parse Md > |> Result.toOption > |> Option.get > |> (formatBlocks Md) > |> _assertEqual "# TestModule (TestNamespace) > > ## ParserLibrary > > ### TextInput > " > > ╭─[ 217.76ms - stdout ]────────────────────────────────────────────────────────╮ > │ "# TestModule (TestNamespace) │ > │ │ > │ ## ParserLibrary │ > │ │ > │ ### TextInput │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > example1 > |> parse Spi > |> Result.toOption > |> Option.get > |> (formatBlocks Spi) > |> _assertEqual "/// # TestModule (TestNamespace) > > /// ## ParserLibrary > inl x = 0i32 > > /// ### TextInput > " > > ╭─[ 198.48ms - stdout ]────────────────────────────────────────────────────────╮ > │ "/// # TestModule (TestNamespace) │ > │ │ > │ /// ## ParserLibrary │ > │ inl x = 0i32 │ > │ │ > │ /// ### TextInput │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## parseDibCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline parseDibCode output file = async { > trace Debug > (fun () -> "parseDibCode") > (fun () -> $"output: {output} / file: {file} / {_locals ()}") > let! input = file |> SpiralFileSystem.read_all_text_async > match parse output input with > | Result.Ok blocks -> return blocks |> formatBlocks output > | Result.Error msg -> return failwith msg > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## writeDibCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline writeDibCode output path = async { > trace Debug > (fun () -> "writeDibCode") > (fun () -> $"output: {output} / path: {path} / {_locals ()}") > let! result = parseDibCode output path > let outputPath = path |> SpiralSm.replace ".dib" $".{output |> string |> > SpiralSm.to_lower}" > do! result |> SpiralFileSystem.write_all_text_async outputPath > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Arguments │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > [[<RequireQualifiedAccess>]] > type Arguments = > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]] > File of file : string * Output > > interface Argu.IArgParserTemplate with > member s.Usage = > match s with > | File _ -> nameof File > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () > > ╭─[ 123.53ms - return value ]──────────────────────────────────────────────────╮ > │ "USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │ > │ │ > │ FILE: │ > │ │ > │ <file> <fs|md|spi|spir> │ > │ File │ > │ │ > │ OPTIONS: │ > │ │ > │ --help display this list of options. │ > │ " │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## main │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let main args = > let argsMap = args |> Runtime.parseArgsMap<Arguments> > > let files = > argsMap.[[nameof Arguments.File]] > |> List.map (function > | Arguments.File (path, output) -> path, output > ) > > files > |> List.map (fun (path, output) -> path |> writeDibCode output) > |> Async.Parallel > |> Async.Ignore > |> Async.runWithTimeout 30000 > |> function > | Some () -> 0 > | None -> 1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let args = > System.Environment.GetEnvironmentVariable "ARGS" > |> SpiralRuntime.split_args > |> Seq.toArray > > match args with > | [[||]] -> 0 > | args -> if main args = 0 then 0 else failwith "main failed" > > ╭─[ 214.71ms - return value ]──────────────────────────────────────────────────╮ > │ <div class="dni-plaintext"><pre>0 │ > │ </pre></div><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 216.89ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:07 debug #1 writeDibCode / output: Fs / path: DibParser.dib │ > │ 00:00:07 debug #2 parseDibCode / output: Fs / file: DibParser.dib │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:26 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 65192 00:00:26 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:28 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb to html 00:00:28 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:28 verbose #7 ! validate(nb) 00:00:30 verbose #8 ! [NbConvertApp] Writing 369754 bytes to c:\home\git\polyglot\apps\parser\DibParser.dib.html 00:00:30 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 651 00:00:30 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 651 00:00:30 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/DibParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/DibParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:32 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:32 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:32 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 65902 00:00:00 debug #1 persistCodeProject / packages: [Argu; FParsec; FSharp.Control.AsyncSeq; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: DibParser / hash: / code.Length: 9581 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj 00:00:00 debug #1 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime linux-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\DibParser") 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:03 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj (in 729 ms). 00:00:03 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj] 00:00:16 verbose #6 > DibParser -> C:\home\git\polyglot\target\polyglot\builder\DibParser\bin\Release\net9.0\linux-x64\DibParser.dll 00:00:18 verbose #7 > DibParser -> C:\home\git\polyglot\apps\parser\dist\ 00:00:18 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 707 00:00:18 debug #9 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime win-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\DibParser") 00:00:19 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:19 verbose #11 > Determining projects to restore... 00:00:20 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj (in 451 ms). 00:00:20 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj] 00:00:34 verbose #14 > DibParser -> C:\home\git\polyglot\target\polyglot\builder\DibParser\bin\Release\net9.0\win-x64\DibParser.dll 00:00:39 verbose #15 > DibParser -> C:\home\git\polyglot\apps\parser\dist\ 00:00:39 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 705 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "JsonParser.dib"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/JsonParser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/JsonParser.dib" --output-path "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # JsonParser (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Notebooks.dib > #!import ../../lib/fsharp/Testing.dib > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A > spNetCore.Html.Abstractions.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.Formatting.dll" > open System > open System.IO > open System.Text > open Microsoft.DotNet.Interactive.Formatting > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > open type Microsoft.DotNet.Interactive.Kernel > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: > TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > Formatter.ListExpansionLimit <- 100 > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] > #endif > type Mut<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Co... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] > #endif > type async_std_task_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] > #endif > type std_future_Future<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] > #endif > type rayon_vec_IntoIter<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] > #endif > type rayon_iter_Map<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] > #endif > type futures_lite_stream_StreamExt = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] > #endif > type futures_future_TryJoinAll<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] > #endif > type futures_future_Fuse<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] > #endif > type futures_future_JoinAll<'T> = class end > let rec closure0 () (v0 : System.Threading.CancellationToken) : > Async<System.Threading.CancellationToken> = > let v1 : bool = true > let mutable _v1 : Async<System.Threading.CancellationToken> option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT > let v2 : Async<System.Threading.CancellationToken> = null |> > unbox<Async<System... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] > #endif > type std_thread_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] > #endif > type std_sync_Arc<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] > #endif > type std_sync_Mutex<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] > #endif > type std_sync_MutexGuard<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] > #endif > type std_sync_PoisonError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] > #endif > type std_sync_mpsc_Receiver<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] > #endif > type std_sync_mpsc_SendError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] > #endif > type std_sync_mpsc_Sender<'T> = class end > type Disposable (f : unit -> unit) = interface System.IDisposable with member > _.Dispose () = f () > type [[<Struct>]] US0 = > | US0_0 of f0_0 : System.Threading.CancellationToken > | US0_1 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = > let v1 : bool = true > let mutable _v1 : unit option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] > #endif > type reqwest_Error = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] > #endif > type reqwest_RequestBuilder = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] > #endif > type reqwest_Response = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] > #endif > type clap_Arg = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] > #endif > type clap_ArgAction = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] > #endif > type clap_Command = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] > #endif > type clap_ArgMatches = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] > #endif > type clap_builder_ValueRange = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] > #endif > type clap_builder_ValueParser = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] > #endif > type clap_builder_PossibleValue = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] > #endif > type std_process_Child = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] > #endif > type std_process_ChildStderr = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] > #endif > type std_process_ChildStdout = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] > #endif > type std_process_ChildStdin = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] > #endif > type std_process_Command = class ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] > #endif > type std_fs_File = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] > #endif > type std_fs_FileType = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] > #endif > type std_path_Display = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] > #endif > type std_path_Path = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] > #endif > type std_path_PathBuf = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] > #endif > type async_walkdir_DirEntry = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] > #endif > type async_walkdir_Filtering = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] > #endif > type async_walkdir_WalkDir = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = clas... > > ── fsharp - import ───────────────────────────────────────────────────────────── > module SpiralTrace = > let trace x = > #if !INTERACTIVE > Trace.trace x > #else > trace x > #endif > > type TraceLevel = > #if !INTERACTIVE > Trace.US0 > #else > US0 > #endif > > module SpiralCrypto = > let hash_text x = > #if !INTERACTIVE > Crypto.hash_text x > #else > hash_text x > #endif > > #if !FABLE_COMPILER && !WASM && !CONTRACT > > module SpiralAsync = > let merge_cancellation_token_with_default_async x = > #if !INTERACTIVE > Async_.merge_cancellation_token_with_default_async x > #else > merge_cancellation_token_with_default_async x > #endif > > module SpiralThreading = > let new_disposable_token x = > #if !INTERACTIVE > Threading.new_disposable_token x > #else > new_disposable_token x > #endif > > module SpiralNetworking = > let test_port_open x = > #if !INTERACTIVE > Networking.test_port_open x > #else > test_port_open x > #endif > > let test_port_open_timeout x = > #if !INTERACTIVE > Networking.test_port_open_timeout x > #else > test_port_open_timeout x > #endif > > let wait_for_port_access x = > #if !INTERACTIVE > Networking.wait_for_port_access x > #else > wait_for_port_access x > #endif > > let get_available_port x = > #if !INTERACTIVE > Networking.get_available_port x > #else > get_available_port x > #endif > > module SpiralRuntime = > let get_executable_suffix () = > #if !INTERACTIVE > Runtime.get_executable_suffix () > #else > get_executable_suffix () > #endif > > let is_windows () = > #if !INTERACTIVE > ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > type AssertExceptionFormatter (ex) = > member _.Text = > ex.ToString() > .Replace("32m", "<span style=\"color: green;\">") > .Replace("36m", "</span>") > .Replace("31m", "<span style=\"color: red;\">") > .Replace("\n", "<br/>\n") > > > Formatter.Register<AssertExceptionFormatter> ((fun (x : > AssertExceptionFormatter) -> x.Text), "text/html") > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __expect fn log expected actual = > if log then printfn $"{actual.ToDisplayString ()}" > try > "Testing.__expect" |> fn actual expected > with :? Expecto.AssertException as ex -> > AssertExceptionFormatter(ex).Display () |> ignore > failwith (ex.GetType().FullName) > > let inline __contains log expected actual = __expect Expecto.Expect.contains log > expected actual > let inline _contains expected actual = __contains true expected actual > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log > expected actual > let inline _assertEqual expected actual = __assertEqual true expected actual > > let inline __isGreaterThan log expected actual = __expect > Expecto.Expect.isGreaterThan log expected actual > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual > > let inline __isGreaterThanOrEqual log expected actual = __expect > Expecto.Expect.isGreaterThanOrEqual log expected actual > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true > expected actual > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan > log expected actual > let inline _isLessThan expected actual = __isLessThan true expected actual > > let inline __isLessThanOrEqual log expected actual = __expect > Expecto.Expect.isLessThanOrEqual log expected actual > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true > expected actual > > let inline __sequenceEqual log expected actual = __expe... > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __isBetween log a b actual = > let inline isBetween actual (a, b) _ = > __isGreaterThanOrEqual log a actual > __isLessThanOrEqual log b actual > __expect isBetween log (a, b) actual > let inline _isBetween a b actual = __isBetween true a b actual > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Common.fs > #!import Parser.fs > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Common = > > #if !INTERACTIVE > open Lib > #endif > > let nl = System.Environment.NewLine > let q = @"""" > > let inline cons head tail = head :: tail > > /// ## memoize > let inline memoize fn = > let result = lazy fn () > fun () -> result.Value > > /// ## TraceLevel > type TraceLevel = > | Verbose > | Debug > | Info > | Warning > | Critical > > let inline _locals () = "" > > /// ## trace > let to_trace_level = function > | Verbose -> SpiralTrace.TraceLevel.US0_0 > | Debug -> SpiralTrace.TraceLevel.US0_1 > | Info -> SpiralTrace.TraceLevel.US0_2 > | Warning -> SpiralTrace.TraceLevel.US0_3 > | Critical -> SpiralTrace.TraceLevel.US0_4 > > let trace level fn locals = > let level = level |> to_trace_level > SpiralTrace.trace level fn locals > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Parser = > > open Common > > /// ### TextInput > type Position = > { > line : int > column : int > } > > let initialPos = { line = 0; column = 0 } > > let inline incrCol (pos : Position) = > { pos with column = pos.column + 1 } > > let inline incrLine pos = > { line = pos.line + 1; column = 0 } > > type InputState = > { > lines : string[[]] > position : Position > } > > let inline fromStr str = > { > lines = > if str |> String.IsNullOrEmpty > then [[||]] > else str |> SpiralSm.split_string [[| "\r\n"; "\n" |]] > position = initialPos > } > > let inline currentLine inputState = > let linePos = inputState.position.line > if linePos < inputState.lines.Length > then inputState.lines.[[linePos]] > else "end of file" > > let inline nextChar input = > let linePos = input.position.line > let colPos = input.position.column > > if linePos >= input.lines.Length > then input, None > else > let currentLine = currentLine input > if colPos < currentLine.Length then > let char = currentLine.[[colPos]] > let newPos = incrCol input.position > let newState = { input with position = newPos } > newState, Some char > else > let char = '\n' > ... > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open Parser > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## JsonParser │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > (* > // -------------------------------- > JSON spec from http://www.json.org/ > // -------------------------------- > > The JSON spec is available at [[json.org]](http://www.json.org/). I'll paraphase > it here: > > * A `value` can be a `string` or a `number` or a `bool` or `null` or an `object` > or an `array`. > * These structures can be nested. > * A `string` is a sequence of zero or more Unicode characters, wrapped in double > quotes, using backslash escapes. > * A `number` is very much like a C or Java number, except that the octal and > hexadecimal formats are not used. > * A `boolean` is the literal `true` or `false` > * A `null` is the literal `null` > * An `object` is an unordered set of name/value pairs. > * An object begins with { (left brace) and ends with } (right brace). > * Each name is followed by : (colon) and the name/value pairs are separated by > , (comma). > * An `array` is an ordered collection of values. > * An array begins with [[ (left bracket) and ends with ]] (right bracket). > * Values are separated by , (comma). > * Whitespace can be inserted between any pair of tokens. > > *) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let inline parserEqual (expected : ParseResult<'a>) (actual : ParseResult<'a * > Input>) = > match actual, expected with > | Success (_actual, _), Success _expected -> > printResult actual > _actual |> _assertEqual _expected > | Failure (l1, e1, p1), Failure (l2, e2, p2) when l1 = l2 && e1 = e2 && p1 = > p2 -> > printResult actual > | _ -> > printfn $"Actual: {actual}" > printfn $"Expected: {expected}" > failwith "Parse failed" > actual > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### JValue │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type JValue = > | JString of string > | JNumber of float > | JBool of bool > | JNull > | JObject of Map<string, JValue> > | JArray of JValue list > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jValue, jValueRef = createParserForwardedToRef<JValue> () > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jNull │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jNull = > pstring "null" > >>% JNull > <?> "null" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jValue "null" > |> parserEqual (Success JNull) > > ╭─[ 279.76ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNull, { lines = [ │ > │ |"null"|]<br /> position = { line = 0<br /> │ > │ column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNull, { lines = [|"null"|]<br /> │ > │ position = { line = 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNull</code></span></summary><div><table><thead> │ > │ <tr></tr></thead><tbody><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"null"|]<br /> position = │ > │ { line = 0<br /> column = 4 } }</code></span></summary><di... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 287.06ms - stdout ]────────────────────────────────────────────────────────╮ > │ JNull │ > │ JNull │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNull "nulp" > |> parserEqual ( > Failure ( > "null", > "Unexpected 'p'", > { currentLine = "nulp"; line = 0; column = 3 } > ) > ) > > ╭─[ 67.49ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("null", "Unexpected │ > │ 'p'", { currentLine = "nulp"<br /> │ > │ line = 0<br /> column = 3 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"null" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected 'p'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "nulp"<br /> line = 0<br /> column = 3 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"nulp" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>3 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 71.30ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:3 Error parsing null │ > │ nulp │ > │ ^Unexpected 'p' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jBool │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jBool = > let jtrue = > pstring "true" > >>% JBool true > let jfalse = > pstring "false" > >>% JBool false > > jtrue <|> jfalse > <?> "bool" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jBool "true" > |> parserEqual (Success (JBool true)) > > ╭─[ 64.58ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JBool true, { lines = [ │ > │ |"true"|]<br /> position = { line = 0<br /> │ > │ column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JBool true, { lines = [|"true"|]<br │ > │ /> position = { line = 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JBool │ > │ true</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ > │ td>Item</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|&qu... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 70.36ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JBool true │ > │ JBool true │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jBool "false" > |> parserEqual (Success (JBool false)) > > ╭─[ 51.29ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JBool false, { lines = [ │ > │ |"false"|]<br /> position = { line = 0<br │ > │ /> column = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JBool false, { lines = [|"false"|]<br │ > │ /> position = { line = 0<br /> column = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JBool │ > │ false</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 56.94ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JBool false │ > │ JBool false │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jBool "truX" > |> parserEqual ( > Failure ( > "bool", > "Unexpected 't'", > { currentLine = "truX"; line = 0; column = 0 } > ) > ) > > ╭─[ 63.07ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("bool", "Unexpected │ > │ 't'", { currentLine = "truX"<br /> │ > │ line = 0<br /> column = 0 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"bool" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected 't'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "truX"<br /> line = 0<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"truX" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 67.94ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:0 Error parsing bool │ > │ truX │ > │ ^Unexpected 't' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jUnescapedChar │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jUnescapedChar = > satisfy (fun ch -> ch <> '\\' && ch <> '\"') "char" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jUnescapedChar "a" > |> parserEqual (Success 'a') > > ╭─[ 85.80ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('a', { lines = [ │ > │ |"a"|]<br /> position = { line = 0<br /> │ > │ column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(a, { lines = [|"a"|]<br /> position │ > │ = { line = 0<br /> column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'a' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"a"|]<br /> position = { line = 0<br /> column = 1 │ > │ } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ a │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 1 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plain... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 89.97ms - stdout ]─────────────────────────────────────────────────────────╮ > │ 'a' │ > │ 'a' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jUnescapedChar "\\" > |> parserEqual ( > Failure ( > "char", > "Unexpected '\\'", > { currentLine = "\\"; line = 0; column = 0 } > ) > ) > > ╭─[ 60.01ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("char", "Unexpected │ > │ '\'", { currentLine = "\"<br /> │ > │ line = 0<br /> column = 0 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"char" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected '\'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "\"<br /> line = 0<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"\" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: st... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 66.92ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:0 Error parsing char │ > │ \ │ > │ ^Unexpected '\' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jEscapedChar │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jEscapedChar = > [[ > ("\\\"",'\"') > ("\\\\",'\\') > ("\\/",'/') > ("\\b",'\b') > ("\\f",'\f') > ("\\n",'\n') > ("\\r",'\r') > ("\\t",'\t') > ]] > |> List.map (fun (toMatch, result) -> > pstring toMatch >>% result > ) > |> choice > <?> "escaped char" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar "\\\\" > |> parserEqual (Success '\\') > > ╭─[ 50.31ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\\', { lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br /> position │ > │ = { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\\' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> column = │ > │ 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \\ │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="d... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 54.96ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\\' │ > │ '\\' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar "\\t" > |> parserEqual (Success '\t') > > ╭─[ 41.32ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\009', { lines = [ │ > │ |"\t"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>( , { lines = [|"\t"|]<br /> position = │ > │ { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\009' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\t"|]<br /> position = { line = 0<br /> column = │ > │ 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \t │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div ... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 47.09ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\009' │ > │ '\009' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar @"\\" > |> parserEqual (Success '\\') > > ╭─[ 56.01ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\\', { lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br /> position │ > │ = { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\\' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> column = │ > │ 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \\ │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="d... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 60.00ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\\' │ > │ '\\' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar @"\n" > |> parserEqual (Success '\n') > > ╭─[ 35.38ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\010', { lines = [|"<br │ > │ />"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(<br />, { lines = [|"<br />"|]<br /> │ > │ position = { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\010' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"<br />"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ <br /> │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>Is... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 43.95ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\010' │ > │ '\010' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar "a" > |> parserEqual ( > Failure ( > "escaped char", > "Unexpected 'a'", > { currentLine = "a"; line = 0; column = 0 } > ) > ) > > ╭─[ 36.18ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("escaped char", │ > │ "Unexpected 'a'", { currentLine = "a"<br /> │ > │ line = 0<br /> column = 0 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"escaped char" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected 'a'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "a"<br /> line = 0<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"a" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 40.53ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:0 Error parsing escaped char │ > │ a │ > │ ^Unexpected 'a' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jUnicodeChar │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jUnicodeChar = > let backslash = pchar '\\' > let uChar = pchar 'u' > let hexdigit = anyOf ([[ '0' .. '9' ]] @ [[ 'A' .. 'F' ]] @ [[ 'a' .. 'f' > ]]) > let fourHexDigits = hexdigit .>>. hexdigit .>>. hexdigit .>>. hexdigit > > let inline convertToChar (((h1, h2), h3), h4) = > let str = $"%c{h1}%c{h2}%c{h3}%c{h4}" > Int32.Parse (str, Globalization.NumberStyles.HexNumber) |> char > > backslash >>. uChar >>. fourHexDigits > |>> convertToChar > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jUnicodeChar "\\u263A" > |> parserEqual (Success '☺') > > ╭─[ 62.61ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('☺', { lines = [ │ > │ |"\u263A"|]<br /> position = { line = 0<br /> │ > │ column = 6 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(☺, { lines = [|"\u263A"|]<br /> │ > │ position = { line = 0<br /> column = 6 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'☺' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\u263A"|]<br /> position = { line = 0<br /> │ > │ column = 6 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \u263A │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 6 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>6 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 66.65ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '☺' │ > │ '☺' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jString │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let quotedString = > let quote = pchar '\"' <?> "quote" > let jchar = jUnescapedChar <|> jEscapedChar <|> jUnicodeChar > > quote >>. manyChars jchar .>> quote > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jString = > quotedString > |>> JString > <?> "quoted string" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > jString > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"\"" > |> parserEqual (Success (JString "")) > > ╭─[ 62.62ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "", { lines = [ │ > │ |""""|]<br /> position = { line = │ > │ 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "", { lines = [ │ > │ |""""|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ ""</code></span></summary><div><table><thead><tr></tr></thead><tbo │ > │ dy><tr><td>Item</td><td><div class="dni-plaintext"><pre>"" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><sum... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 66.83ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "" │ > │ JString "" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"a\"" > |> parserEqual (Success (JString "a")) > > ╭─[ 42.55ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "a", { lines = [ │ > │ |""a""|]<br /> position = { line │ > │ = 0<br /> column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "a", { lines = [ │ > │ |""a""|]<br /> position = { line = 0<br /> │ > │ column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ "a"</code></span></summary><div><table><thead><tr></tr></thead><tb │ > │ ody><tr><td>Item</td><td><div class="dni-plaintext"><pre>"a" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treevi... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 50.10ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "a" │ > │ JString "a" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"ab\"" > |> parserEqual (Success (JString "ab")) > > ╭─[ 57.36ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "ab", { lines = [ │ > │ |""ab""|]<br /> position = { │ > │ line = 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "ab", { lines = [ │ > │ |""ab""|]<br /> position = { line = 0<br /> │ > │ column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ "ab"</code></span></summary><div><table><thead><tr></tr></thead><t │ > │ body><tr><td>Item</td><td><div class="dni-plaintext"><pre>"ab" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dn... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 62.50ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "ab" │ > │ JString "ab" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"ab\\tde\"" > |> parserEqual (Success (JString "ab\tde")) > > ╭─[ 52.77ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "ab de", { lines = [ │ > │ |""ab\tde""|]<br /> position │ > │ = { line = 0<br /> column = 8 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "ab de", { lines = [ │ > │ |""ab\tde""|]<br /> position = { line = 0<br /> │ > │ column = 8 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString "ab │ > │ de"</code></span></summary><div><table><thead><tr></tr></thead><tbody>< │ > │ tr><td>Item</td><td><div class="dni-plaintext"><pre>"ab de" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2<... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 58.05ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "ab de" │ > │ JString "ab de" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"ab\\u263Ade\"" > |> parserEqual (Success (JString "ab☺de")) > > ╭─[ 56.35ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "ab☺de", { lines = [ │ > │ |""ab\u263Ade""|]<br /> │ > │ position = { line = 0<br /> column = │ > │ 12 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "ab☺de", { lines = [ │ > │ |""ab\u263Ade""|]<br /> position = { line = 0<br /> │ > │ column = 12 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ "ab☺de"</code></span></summary><div><table><thead><tr></tr></thead │ > │ ><tbody><tr><td>Item</td><td><div │ > │ class="dni-plaintext"><pre>"ab☺de" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr>... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 60.83ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "ab☺de" │ > │ JString "ab☺de" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jNumber │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jNumber = > let optSign = opt (pchar '-') > > let zero = pstring "0" > > let digitOneNine = > satisfy (fun ch -> Char.IsDigit ch && ch <> '0') "1-9" > > let digit = > satisfy Char.IsDigit "digit" > > let point = pchar '.' > > let e = pchar 'e' <|> pchar 'E' > > let optPlusMinus = opt (pchar '-' <|> pchar '+') > > let nonZeroInt = > digitOneNine .>>. manyChars digit > |>> fun (first, rest) -> string first + rest > > let intPart = zero <|> nonZeroInt > > let fractionPart = point >>. manyChars1 digit > > let exponentPart = e >>. optPlusMinus .>>. manyChars1 digit > > let inline (|>?) opt f = > match opt with > | None -> "" > | Some x -> f x > > let inline convertToJNumber (((optSign, intPart), fractionPart), expPart) = > let signStr = > optSign > |>? string > > let fractionPartStr = > fractionPart > |>? (fun digits -> "." + digits) > > let expPartStr = > expPart > |>? fun (optSign, digits) -> > let sign = optSign |>? string > "e" + sign + digits > > (signStr + intPart + fractionPartStr + expPartStr) > |> float > |> JNumber > > optSign .>>. intPart .>>. opt fractionPart .>>. opt exponentPart > |>> convertToJNumber > <?> "number" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > jString > jNumber > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "123" > |> parserEqual (Success (JNumber 123.0)) > > ╭─[ 65.38ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │ > │ |"123"|]<br /> position = { line = 0<br │ > │ /> column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.0, { lines = [|"123"|]<br │ > │ /> position = { line = 0<br /> column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 68.22ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 123.0 │ > │ JNumber 123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "-123" > |> parserEqual (Success (JNumber -123.0)) > > ╭─[ 47.99ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 0<br │ > │ /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 0<br /> column │ > │ = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 50.67ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber -123.0 │ > │ JNumber -123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "123.4" > |> parserEqual (Success (JNumber 123.4)) > > ╭─[ 45.48ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 0<br │ > │ /> column = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 0<br /> column │ > │ = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.4</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.4 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><co... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 49.71ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 123.4 │ > │ JNumber 123.4 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "-123." > |> parserEqual (Success (JNumber -123.0)) > > ╭─[ 56.91ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ > │ |"-123."|]<br /> position = { line = │ > │ 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ > │ |"-123."|]<br /> position = { line = 0<br /> column │ > │ = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hin... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 60.91ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber -123.0 │ > │ JNumber -123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "00.1" > |> parserEqual (Success (JNumber 0.0)) > > ╭─[ 45.16ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 0.0, { lines = [ │ > │ |"00.1"|]<br /> position = { line = 0<br /> │ > │ column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 0.0, { lines = [|"00.1"|]<br │ > │ /> position = { line = 0<br /> column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 0.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><div class="dni-plaintext"><pre>0.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 48.32ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 0.0 │ > │ JNumber 0.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let jNumber_ = jNumber .>> spaces1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123" > |> parserEqual (Success (JNumber 123.0)) > > ╭─[ 49.42ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │ > │ |"123"|]<br /> position = { line = 1<br │ > │ /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.0, { lines = [|"123"|]<br │ > │ /> position = { line = 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 53.50ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 123.0 │ > │ JNumber 123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "-123" > |> parserEqual (Success (JNumber -123.0)) > > ╭─[ 49.60ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 1<br │ > │ /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 1<br /> column │ > │ = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 53.13ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber -123.0 │ > │ JNumber -123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "-123." > |> parserEqual ( > Failure ( > "number andThen many1 whitespace", > "Unexpected '.'", > { currentLine = "-123."; line = 0; column = 4 } > ) > ) > > ╭─[ 50.97ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure<br /> ("number andThen many1 │ > │ whitespace", "Unexpected '.'", { currentLine = │ > │ "-123."<br /> │ > │ line = 0<br /> │ > │ column = 4 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"number andThen many1 │ > │ whitespace" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected '.'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "-123."<br /> line = 0<br /> column = 4 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"-123." │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>4 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap;... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 55.11ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:4 Error parsing number andThen many1 whitespace │ > │ -123. │ > │ ^Unexpected '.' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123.4" > |> parserEqual (Success (JNumber 123.4)) > > ╭─[ 45.58ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 1<br │ > │ /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 1<br /> column │ > │ = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.4</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.4 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><co... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 49.05ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 123.4 │ > │ JNumber 123.4 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "00.4" > |> parserEqual ( > Failure ( > "number andThen many1 whitespace", > "Unexpected '0'", > { currentLine = "00.4"; line = 0; column = 1 } > ) > ) > > ╭─[ 38.02ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure<br /> ("number andThen many1 │ > │ whitespace", "Unexpected '0'", { currentLine = │ > │ "00.4"<br /> │ > │ line = 0<br /> │ > │ column = 1 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"number andThen many1 │ > │ whitespace" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected '0'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "00.4"<br /> line = 0<br /> column = 1 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"00.4" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ }... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 41.24ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:1 Error parsing number andThen many1 whitespace │ > │ 00.4 │ > │ ^Unexpected '0' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123e4" > |> parserEqual (Success (JNumber 1230000.0)) > > ╭─[ 60.44ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 1230000.0, { lines = [ │ > │ |"123e4"|]<br /> position = { line = │ > │ 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 1230000.0, { lines = [ │ > │ |"123e4"|]<br /> position = { line = 1<br /> column │ > │ = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 1230000.0</code></span></summary><div><table><thead><tr></tr></thead><tbody> │ > │ <tr><td>Item</td><td><div class="dni-plaintext"><pre>1230000.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span c... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 64.33ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 1230000.0 │ > │ JNumber 1230000.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123.4e5" > |> parserEqual (Success (JNumber 12340000.0)) > > ╭─[ 43.71ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 12340000.0, { lines = [ │ > │ |"123.4e5"|]<br /> position = { line │ > │ = 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 12340000.0, { lines = [ │ > │ |"123.4e5"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 12340000.0</code></span></summary><div><table><thead><tr></tr></thead><tbody │ > │ ><tr><td>Item</td><td><div class="dni-plaintext"><pre>12340000.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summa... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 47.29ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 12340000.0 │ > │ JNumber 12340000.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123.4e-5" > |> parserEqual (Success (JNumber 0.001234)) > > ╭─[ 48.62ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 0.001234, { lines = [ │ > │ |"123.4e-5"|]<br /> position = { line │ > │ = 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 0.001234, { lines = [ │ > │ |"123.4e-5"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 0.001234</code></span></summary><div><table><thead><tr></tr></thead><tbody>< │ > │ tr><td>Item</td><td><div class="dni-plaintext"><pre>0.001234 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span c... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 51.91ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 0.001234 │ > │ JNumber 0.001234 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jArray │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jArray = > let left = pchar '[[' .>> spaces > let right = pchar ']]' .>> spaces > let comma = pchar ',' .>> spaces > let value = jValue .>> spaces > > let values = sepBy value comma > > between left values right > |>> JArray > <?> "array" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > jString > jNumber > jArray > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jArray "[[ 1, 2 ]]" > |> parserEqual (Success (JArray [[ JNumber 1.0; JNumber 2.0 ]])) > > ╭─[ 160.30ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JArray [JNumber 1.0; JNumber 2.0], { │ > │ lines = [|"[ 1, 2 ]"|]<br /> │ > │ position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JArray [JNumber 1.0; JNumber 2.0], { lines = [ │ > │ |"[ 1, 2 ]"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JArray [JNumber 1.0; JNumber │ > │ 2.0]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ > │ td>Item</td><td><table><thead><tr><th><i>index</i></th><th>value</th></tr></ │ > │ thead><tbody><tr><td>0</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 1.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><div class="dni-plaintext"><pre>1.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 164.07ms - stdout ]────────────────────────────────────────────────────────╮ > │ JArray [JNumber 1.0; JNumber 2.0] │ > │ JArray [JNumber 1.0; JNumber 2.0] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jArray "[[ 1, 2, ]]" > |> parserEqual ( > Failure ( > "array", > "Unexpected ','", > { currentLine = "[[ 1, 2, ]]"; line = 0; column = 6 } > ) > ) > > ╭─[ 100.03ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("array", "Unexpected │ > │ ','", { currentLine = "[ 1, 2, ]"<br /> │ > │ line = 0<br /> column = 6 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"array" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected ','" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "[ 1, 2, ]"<br /> line = 0<br /> column = 6 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"[ 1, 2, ]" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>6 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-ali... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 104.80ms - stdout ]────────────────────────────────────────────────────────╮ > │ Line:0 Col:6 Error parsing array │ > │ [ 1, 2, ] │ > │ ^Unexpected ',' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jObject │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jObject = > let left = spaces >>. pchar '{' .>> spaces > let right = pchar '}' .>> spaces > let colon = pchar ':' .>> spaces > let comma = pchar ',' .>> spaces > let key = quotedString .>> spaces > let value = jValue .>> spaces > > let keyValue = (key .>> colon) .>>. value > let keyValues = sepBy keyValue comma > > between left keyValues right > |>> Map.ofList > |>> JObject > <?> "object" > > ── fsharp ────────────────────────────────────────────────────────────────────── > jValueRef <| > choice > [[ > jNull > jBool > jString > jNumber > jArray > jObject > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jObject """{ "a":1, "b" : 2 }""" > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "a", JNumber 1.0 > "b", JNumber 2.0 > ]] > ) > ) > ) > > ╭─[ 158.36ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject (map [("a", │ > │ JNumber 1.0); ("b", JNumber 2.0)]),<br /> { lines = [|"{ │ > │ "a":1, "b" : 2 }"|]<br /> position = { line = │ > │ 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JObject (map [("a", JNumber 1.0); │ > │ ("b", JNumber 2.0)]), { lines = [|"{ "a":1, │ > │ "b" : 2 }"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject (map [("a", JNumber 1.0); │ > │ ("b", JNumber │ > │ 2.0)])</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><table><thead><tr><th><i>key</i></th><th>value</th></tr></ │ > │ thead><tbody><tr><td><div class="dni-plaintext"><pre>"a" │ > │ </pre></div></td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 1.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><div class="dni-plaintext"><pre>1.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</t... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 163.23ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject (map [("a", JNumber 1.0); ("b", JNumber 2.0)]) │ > │ JObject (map [("a", JNumber 1.0); ("b", JNumber 2.0)]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jObject """{ "a":1, "b" : 2, }""" > |> parserEqual ( > Failure ( > "object", > "Unexpected ','", > { currentLine = """{ "a":1, "b" : 2, }"""; line = 0; column = 18 } > ) > ) > > ╭─[ 47.70ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("object", "Unexpected │ > │ ','", { currentLine = "{ "a":1, "b" : │ > │ 2, }"<br /> line = 0<br /> │ > │ column = 18 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"object" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected ','" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "{ "a":1, "b" : 2, }"<br /> │ > │ line = 0<br /> column = 18 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"{ "a":1, │ > │ "b" : 2, }" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>18 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ whit... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 51.68ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:18 Error parsing object │ > │ { "a":1, "b" : 2, } │ > │ ^Unexpected ',' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jValue │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example1 = """{ > "name" : "Scott", > "isMale" : true, > "bday" : {"year":2001, "month":12, "day":25 }, > "favouriteColors" : [["blue", "green"]], > "emptyArray" : [[]], > "emptyObject" : {} > }""" > run jValue example1 > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "name", JString "Scott" > "isMale", JBool true > "bday", JObject ( > Map.ofList [[ > "year", JNumber 2001.0 > "month", JNumber 12.0 > "day", JNumber 25.0 > ]] > ) > "favouriteColors", JArray [[ JString "blue"; JString "green" ]] > "emptyArray", JArray [[]] > "emptyObject", JObject Map.empty > ]] > ) > ) > ) > > ╭─[ 233.59ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ > │ [("bday",<br /> JObject<br /> (map<br /> │ > │ [("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArray [ │ > │ ]);<br /> ("emptyObject", JObject (map []));<br /> │ > │ ("favouriteColors", │ > │ ...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JObject<br /> (map<br /> [ │ > │ ("bday",<br /> JObject<br /> (map<br /> [ │ > │ ("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArray [ │ > │ ]);<br /> ("emptyObject", JObject (map []));<br /> │ > │ ("favouriteColors", JArray [JString "blue"; JString │ > │ "gr...</code></span></summary><div><table><thead><tr></tr></thead><tbod │ > │ y><tr><td>Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ > │ ("bday",<br /> JObject<br /> (map<br /> [ │ > │ ("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArray... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 239.24ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject │ > │ (map │ > │ [("bday", │ > │ JObject │ > │ (map │ > │ [("day", JNumber 25.0); ("month", JNumber 12.0); │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArray []); │ > │ ("emptyObject", JObject (map [])); │ > │ ("favouriteColors", JArray [JString "blue"; JString "green"]); │ > │ ("isMale", JBool true); ("name", JString "Scott")]) │ > │ JObject │ > │ (map │ > │ [("bday", JObject (map [("day", JNumber 25.0); ("month", JNumber 12.0); │ > │ ("year", JNumber 2001.0)])); │ > │ ("emptyArray", JArray []); ("emptyObject", JObject (map [])); │ > │ ("favouriteColors", JArray [JString "blue"; JString "green"]); │ > │ ("isMale", JBool true); ("name", JString "Scott")]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example2 = """{"widget": { > "debug": "on", > "window": { > "title": "Sample Konfabulator Widget", > "name": "main_window", > "width": 500, > "height": 500 > }, > "image": { > "src": "Images/Sun.png", > "name": "sun1", > "hOffset": 250, > "vOffset": 250, > "alignment": "center" > }, > "text": { > "data": "Click Here", > "size": 36, > "style": "bold", > "name": "text1", > "hOffset": 250, > "vOffset": 100, > "alignment": "center", > "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" > } > }}""" > > run jValue example2 > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "widget", JObject ( > Map.ofList [[ > "debug", JString "on" > "window", JObject ( > Map.ofList [[ > "title", JString "Sample Konfabulator Widget" > "name", JString "main_window" > "width", JNumber 500.0 > "height", JNumber 500.0 > ]] > ) > "image", JObject ( > Map.ofList [[ > "src", JString "Images/Sun.png" > "name", JString "sun1" > "hOffset", JNumber 250.0 > "vOffset", JNumber 250.0 > "alignment", JString "center" > ]] > ) > "text", JObject ( > Map.ofList [[ > "data", JString "Click Here" > "size", JNumber 36.0 > "style", JString "bold" > "name", JString "text1" > "hOffset", JNumber 250.0 > "vOffset", JNumber 100.0 > "alignment", JString "center" > "onMouseUp", JString "sun1.opacity = > (sun1.opacity / 100) * 90;" > ]] > ) > ]] > ) > ]] > ) > ) > ) > > ╭─[ 432.94ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ > │ [("widget",<br /> JObject<br /> (map<br /> │ > │ [("debug", JString "on");<br /> │ > │ ("image",<br /> JObject<br /> │ > │ (map<br /> [("alignment", JString │ > │ "center");<br /> │ > │ ("hOffset"...</code></span></summary><div><table><thead><tr></tr>< │ > │ /thead><tbody><tr><td>Item</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>(JObject<br │ > │ /> (map<br /> [("widget",<br /> JObject<br /> │ > │ (map<br /> [("debug", JString "on");<br /> │ > │ ("image",<br /> JObject<br /> (map<br │ > │ /> [("alignment", JString "center"); │ > │ ("hOffset", JNumber 250.0);<br /> │ > │ ("name", JString │ > │ "sun1"...</code></span></summary><div><table><thead><tr></tr></the │ > │ ad><tbody><tr><td>Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ > │ ("widget",<br /> JObject<br /> (map<br /> │ > │ [("debug", JString "on");<br /> │ > │ ("image",<br /> JObject<br /> (m... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 436.56ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject │ > │ (map │ > │ [("widget", │ > │ JObject │ > │ (map │ > │ [("debug", JString "on"); │ > │ ("image", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); ("hOffset", JNumber │ > │ 250.0); │ > │ ("name", JString "sun1"); ("src", JString │ > │ "Images/Sun.png"); │ > │ ("vOffset", JNumber 250.0)])); │ > │ ("text", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); │ > │ ("data", JString "Click Here"); ("hOffset", JNumber │ > │ 250.0); │ > │ ("name", JString "text1"); │ > │ ("onMouseUp", │ > │ JString "sun1.opacity = (sun1.opacity / 100) * 90;"); │ > │ ("size", JNumber 36.0); ("style", JString "bold"); │ > │ ("vOffset", JNumber 100.0)])); │ > │ ("window", │ > │ JObject │ > │ (map │ > │ [("height", JNumber 500.0); ("name", JString │ > │ "main_window"); │ > │ ("title", JString "Sample Konfabulator Widget"); │ > │ ("width", JNumber 500.0)]))]))]) │ > │ JObject │ > │ (map │ > │ [("widget", │ > │ JObject │ > │ (map │ > │ [("debug", JString "on"); │ > │ ("image", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); ("hOffset", JNumber │ > │ 250.0); ("name", JString "sun1"); │ > │ ("src", JString "Images/Sun.png"); ("vOffset", JNumber │ > │ 250.0)])); │ > │ ("text", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); ("data", JString "Click │ > │ Here"); ("hOffset", JNumber 250.0); │ > │ ("name", JString "text1"); ("onMouseUp", JString │ > │ "sun1.opacity = (sun1.opacity / 100) * 90;"); │ > │ ("size", JNumber 36.0); ("style", JString "bold"); │ > │ ("vOffset", JNumber 100.0)])); │ > │ ("window", │ > │ JObject │ > │ (map │ > │ [("height", JNumber 500.0); ("name", JString │ > │ "main_window"); │ > │ ("title", JString "Sample Konfabulator Widget"); │ > │ ("width", JNumber 500.0)]))]))]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example3 = """{ > "string": "Hello, \"World\"!", > "escapedString": "This string contains \\/\\\\\\b\\f\\n\\r\\t\\\"\\'", > "number": 42, > "scientificNumber": 3.14e-10, > "boolean": true, > "nullValue": null, > "array": [[1, 2, 3, 4, 5]], > "unicodeString1": "프리마", > "unicodeString2": "\u0048\u0065\u006C\u006C\u006F, > \u0022\u0057\u006F\u0072\u006C\u0064\u0022!", > "specialCharacters": "!@#$%^&*()", > "emptyArray": [[]], > "emptyObject": {}, > "nestedArrays": [[[[1, 2, 3]], [[4, 5, 6]]]], > "object": { > "nestedString": "Nested Value", > "nestedNumber": 3.14, > "nestedBoolean": false, > "nestedNull": null, > "nestedArray": [["a", "b", "c"]], > "nestedObject": { > "nestedProperty": "Nested Object Value" > } > }, > "nestedObjects": [[ > {"name": "Alice", "age": 25}, > {"name": "Bob", "age": 30} > ]] > }""" > run jValue example3 > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "string", JString @"Hello, ""World""!" > "escapedString", JString @"This string contains > \/\\\b\f\n\r\t\""\'" > "number", JNumber 42.0 > "scientificNumber", JNumber 3.14e-10 > "boolean", JBool true > "nullValue", JNull > "array", JArray [[ > JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber > 5.0 > ]] > "unicodeString1", JString "프리마" > "unicodeString2", JString @"Hello, ""World""!" > "specialCharacters", JString "!@#$%^&*()" > "emptyArray", JArray [[]] > "emptyObject", JObject Map.empty > "nestedArrays", JArray [[ > JArray [[ JNumber 1.0; JNumber 2.0; JNumber 3.0 ]] > JArray [[ JNumber 4.0; JNumber 5.0; JNumber 6.0 ]] > ]] > "object", JObject ( > Map.ofList [[ > "nestedString", JString "Nested Value" > "nestedNumber", JNumber 3.14 > "nestedBoolean", JBool false > "nestedNull", JNull > "nestedArray", JArray [[JString "a"; JString "b"; > JString "c"]] > "nestedObject", JObject ( > Map.ofList [[ > "nestedProperty", JString "Nested Object Value" > ]] > ) > ]] > ) > "nestedObjects", JArray [[ > JObject (Map.ofList [[ "name", JString "Alice"; "age", JNumber > 25.0 ]]) > JObject (Map.ofList [[ "name", JString "Bob"; "age", JNumber > 30.0 ]]) > ]] > ]] > ) > ) > ) > > ╭─[ 671.25ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ > │ [("array",<br /> JArray<br /> [JNumber 1.0; │ > │ JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber 5.0]);<br /> │ > │ ("boolean", JBool true); ("emptyArray", JArray []);<br │ > │ /> ("emptyObject", JObject (map []));<br /> │ > │ ("escapedString", JString "This │ > │ s...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ > │ td>Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JObject<br /> (map<br /> [ │ > │ ("array",<br /> JArray [JNumber 1.0; JNumber 2.0; JNumber │ > │ 3.0; JNumber 4.0; JNumber 5.0]);<br /> ("boolean", JBool │ > │ true); ("emptyArray", JArray []);<br /> │ > │ ("emptyObject", JObject (map []));<br /> │ > │ ("escapedString", JString "This string contains \/\\\b\f<br │ > │ />\r\t\"\'");<br /> │ > │ ...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ > │ ("array",<br /> JArray [JNumber 1.0; JNumber 2.0; JNumber │ > │ 3.0; JNumber 4.0; JNumber 5.0]);<br /> ("boolean", JBool │ > │ true); ("emptyArray", JArray []);<br /> │ > │ ("emptyObject", JObject (map []));<br /> ("esc... │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 676.37ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject │ > │ (map │ > │ [("array", │ > │ JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber │ > │ 5.0]); │ > │ ("boolean", JBool true); ("emptyArray", JArray []); │ > │ ("emptyObject", JObject (map [])); │ > │ ("escapedString", JString "This string contains \/\\\b\f\n\r\t\"\'"); │ > │ ("nestedArrays", │ > │ JArray │ > │ [JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0]; │ > │ JArray [JNumber 4.0; JNumber 5.0; JNumber 6.0]]); │ > │ ("nestedObjects", │ > │ JArray │ > │ [JObject (map [("age", JNumber 25.0); ("name", JString "Alice")]); │ > │ JObject (map [("age", JNumber 30.0); ("name", JString "Bob")])]); │ > │ ("nullValue", JNull); ("number", JNumber 42.0); ...]) │ > │ JObject │ > │ (map │ > │ [("array", JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; │ > │ JNumber 5.0]); ("boolean", JBool true); │ > │ ("emptyArray", JArray []); ("emptyObject", JObject (map [])); │ > │ ("escapedString", JString "This string contains \/\\\b\f\n\r\t\"\'"); │ > │ ("nestedArrays", │ > │ JArray [JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0]; JArray [ │ > │ JNumber 4.0; JNumber 5.0; JNumber 6.0]]); │ > │ ("nestedObjects", │ > │ JArray │ > │ [JObject (map [("age", JNumber 25.0); ("name", JString "Alice")]); │ > │ JObject (map [("age", JNumber 30.0); ("name", JString "Bob")])]); │ > │ ("nullValue", JNull); │ > │ ("number", JNumber 42.0); ...]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 162930 00:00:28 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:31 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb to html 00:00:31 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:31 verbose #7 ! validate(nb) 00:00:34 verbose #8 ! [NbConvertApp] Writing 534280 bytes to c:\home\git\polyglot\apps\parser\JsonParser.dib.html 00:00:34 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 653 00:00:34 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 653 00:00:34 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/JsonParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/JsonParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:35 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:35 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:35 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 163642 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Parser.dib"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/Parser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/Parser.dib" --output-path "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Parser (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Notebooks.dib > #!import ../../lib/fsharp/Testing.dib > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A > spNetCore.Html.Abstractions.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.Formatting.dll" > open System > open System.IO > open System.Text > open Microsoft.DotNet.Interactive.Formatting > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > open type Microsoft.DotNet.Interactive.Kernel > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: > TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > Formatter.ListExpansionLimit <- 100 > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] > #endif > type Mut<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Co... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] > #endif > type async_std_task_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] > #endif > type std_future_Future<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] > #endif > type rayon_vec_IntoIter<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] > #endif > type rayon_iter_Map<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] > #endif > type futures_lite_stream_StreamExt = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] > #endif > type futures_future_TryJoinAll<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] > #endif > type futures_future_Fuse<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] > #endif > type futures_future_JoinAll<'T> = class end > let rec closure0 () (v0 : System.Threading.CancellationToken) : > Async<System.Threading.CancellationToken> = > let v1 : bool = true > let mutable _v1 : Async<System.Threading.CancellationToken> option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT > let v2 : Async<System.Threading.CancellationToken> = null |> > unbox<Async<System... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] > #endif > type std_thread_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] > #endif > type std_sync_Arc<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] > #endif > type std_sync_Mutex<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] > #endif > type std_sync_MutexGuard<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] > #endif > type std_sync_PoisonError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] > #endif > type std_sync_mpsc_Receiver<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] > #endif > type std_sync_mpsc_SendError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] > #endif > type std_sync_mpsc_Sender<'T> = class end > type Disposable (f : unit -> unit) = interface System.IDisposable with member > _.Dispose () = f () > type [[<Struct>]] US0 = > | US0_0 of f0_0 : System.Threading.CancellationToken > | US0_1 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = > let v1 : bool = true > let mutable _v1 : unit option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] > #endif > type reqwest_Error = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] > #endif > type reqwest_RequestBuilder = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] > #endif > type reqwest_Response = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] > #endif > type clap_Arg = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] > #endif > type clap_ArgAction = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] > #endif > type clap_Command = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] > #endif > type clap_ArgMatches = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] > #endif > type clap_builder_ValueRange = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] > #endif > type clap_builder_ValueParser = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] > #endif > type clap_builder_PossibleValue = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] > #endif > type std_process_Child = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] > #endif > type std_process_ChildStderr = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] > #endif > type std_process_ChildStdout = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] > #endif > type std_process_ChildStdin = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] > #endif > type std_process_Command = class ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] > #endif > type std_fs_File = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] > #endif > type std_fs_FileType = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] > #endif > type std_path_Display = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] > #endif > type std_path_Path = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] > #endif > type std_path_PathBuf = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] > #endif > type async_walkdir_DirEntry = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] > #endif > type async_walkdir_Filtering = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] > #endif > type async_walkdir_WalkDir = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = clas... > > ── fsharp - import ───────────────────────────────────────────────────────────── > module SpiralTrace = > let trace x = > #if !INTERACTIVE > Trace.trace x > #else > trace x > #endif > > type TraceLevel = > #if !INTERACTIVE > Trace.US0 > #else > US0 > #endif > > module SpiralCrypto = > let hash_text x = > #if !INTERACTIVE > Crypto.hash_text x > #else > hash_text x > #endif > > #if !FABLE_COMPILER && !WASM && !CONTRACT > > module SpiralAsync = > let merge_cancellation_token_with_default_async x = > #if !INTERACTIVE > Async_.merge_cancellation_token_with_default_async x > #else > merge_cancellation_token_with_default_async x > #endif > > module SpiralThreading = > let new_disposable_token x = > #if !INTERACTIVE > Threading.new_disposable_token x > #else > new_disposable_token x > #endif > > module SpiralNetworking = > let test_port_open x = > #if !INTERACTIVE > Networking.test_port_open x > #else > test_port_open x > #endif > > let test_port_open_timeout x = > #if !INTERACTIVE > Networking.test_port_open_timeout x > #else > test_port_open_timeout x > #endif > > let wait_for_port_access x = > #if !INTERACTIVE > Networking.wait_for_port_access x > #else > wait_for_port_access x > #endif > > let get_available_port x = > #if !INTERACTIVE > Networking.get_available_port x > #else > get_available_port x > #endif > > module SpiralRuntime = > let get_executable_suffix () = > #if !INTERACTIVE > Runtime.get_executable_suffix () > #else > get_executable_suffix () > #endif > > let is_windows () = > #if !INTERACTIVE > ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > type AssertExceptionFormatter (ex) = > member _.Text = > ex.ToString() > .Replace("32m", "<span style=\"color: green;\">") > .Replace("36m", "</span>") > .Replace("31m", "<span style=\"color: red;\">") > .Replace("\n", "<br/>\n") > > > Formatter.Register<AssertExceptionFormatter> ((fun (x : > AssertExceptionFormatter) -> x.Text), "text/html") > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __expect fn log expected actual = > if log then printfn $"{actual.ToDisplayString ()}" > try > "Testing.__expect" |> fn actual expected > with :? Expecto.AssertException as ex -> > AssertExceptionFormatter(ex).Display () |> ignore > failwith (ex.GetType().FullName) > > let inline __contains log expected actual = __expect Expecto.Expect.contains log > expected actual > let inline _contains expected actual = __contains true expected actual > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log > expected actual > let inline _assertEqual expected actual = __assertEqual true expected actual > > let inline __isGreaterThan log expected actual = __expect > Expecto.Expect.isGreaterThan log expected actual > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual > > let inline __isGreaterThanOrEqual log expected actual = __expect > Expecto.Expect.isGreaterThanOrEqual log expected actual > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true > expected actual > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan > log expected actual > let inline _isLessThan expected actual = __isLessThan true expected actual > > let inline __isLessThanOrEqual log expected actual = __expect > Expecto.Expect.isLessThanOrEqual log expected actual > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true > expected actual > > let inline __sequenceEqual log expected actual = __expe... > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __isBetween log a b actual = > let inline isBetween actual (a, b) _ = > __isGreaterThanOrEqual log a actual > __isLessThanOrEqual log b actual > __expect isBetween log (a, b) actual > let inline _isBetween a b actual = __isBetween true a b actual > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Common.fs > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Common = > > #if !INTERACTIVE > open Lib > #endif > > let nl = System.Environment.NewLine > let q = @"""" > > let inline cons head tail = head :: tail > > /// ## memoize > let inline memoize fn = > let result = lazy fn () > fun () -> result.Value > > /// ## TraceLevel > type TraceLevel = > | Verbose > | Debug > | Info > | Warning > | Critical > > let inline _locals () = "" > > /// ## trace > let to_trace_level = function > | Verbose -> SpiralTrace.TraceLevel.US0_0 > | Debug -> SpiralTrace.TraceLevel.US0_1 > | Info -> SpiralTrace.TraceLevel.US0_2 > | Warning -> SpiralTrace.TraceLevel.US0_3 > | Critical -> SpiralTrace.TraceLevel.US0_4 > > let trace level fn locals = > let level = level |> to_trace_level > SpiralTrace.trace level fn locals > > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### TextInput │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Position = > { > line : int > column : int > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let initialPos = { line = 0; column = 0 } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline incrCol (pos : Position) = > { pos with column = pos.column + 1 } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline incrLine pos = > { line = pos.line + 1; column = 0 } > > ── fsharp ────────────────────────────────────────────────────────────────────── > type InputState = > { > lines : string[[]] > position : Position > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline fromStr str = > { > lines = > if str |> String.IsNullOrEmpty > then [[||]] > else str |> SpiralSm.split_string [[| "\r\n"; "\n" |]] > position = initialPos > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > fromStr "" |> _assertEqual { > lines = [[||]] > position = { line = 0; column = 0 } > } > > ╭─[ 72.51ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [||] │ > │ position = { line = 0 │ > │ column = 0 } } │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > fromStr "Hello \n World" |> _assertEqual { > lines = [[| "Hello "; " World" |]] > position = { line = 0; column = 0 } > } > > ╭─[ 26.07ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [|"Hello "; " World"|] │ > │ position = { line = 0 │ > │ column = 0 } } │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline currentLine inputState = > let linePos = inputState.position.line > if linePos < inputState.lines.Length > then inputState.lines.[[linePos]] > else "end of file" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline nextChar input = > let linePos = input.position.line > let colPos = input.position.column > > if linePos >= input.lines.Length > then input, None > else > let currentLine = currentLine input > if colPos < currentLine.Length then > let char = currentLine.[[colPos]] > let newPos = incrCol input.position > let newState = { input with position = newPos } > newState, Some char > else > let char = '\n' > let newPos = incrLine input.position > let newState = { input with position = newPos } > newState, Some char > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let newInput, charOpt = fromStr "Hello World" |> nextChar > > newInput |> _assertEqual { > lines = [[| "Hello World" |]] > position = { line = 0; column = 1 } > } > charOpt |> _assertEqual (Some 'H') > > ╭─[ 52.72ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [|"Hello World"|] │ > │ position = { line = 0 │ > │ column = 1 } } │ > │ │ > │ Some 'H' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let newInput, charOpt = fromStr "Hello\n\nWorld" |> nextChar > > newInput |> _assertEqual { > lines = [[| "Hello"; ""; "World" |]] > position = { line = 0; column = 1 } > } > charOpt |> _assertEqual (Some 'H') > > ╭─[ 45.06ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [|"Hello"; ""; "World"|] │ > │ position = { line = 0 │ > │ column = 1 } } │ > │ │ > │ Some 'H' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### Parser │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Input = InputState > type ParserLabel = string > type ParserError = string > > type ParserPosition = > { > currentLine : string > line : int > column : int > } > > type ParseResult<'a> = > | Success of 'a > | Failure of ParserLabel * ParserError * ParserPosition > > type Parser<'a> = > { > label : ParserLabel > parseFn : Input -> ParseResult<'a * Input> > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline printResult result = > match result with > | Success (value, input) -> > printfn $"%A{value}" > | Failure (label, error, parserPos) -> > let errorLine = parserPos.currentLine > let colPos = parserPos.column > let linePos = parserPos.line > let failureCaret = $"{' ' |> string |> String.replicate colPos}^{error}" > printfn $"Line:%i{linePos} Col:%i{colPos} Error parsing > %s{label}\n%s{errorLine}\n%s{failureCaret}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline runOnInput parser input = > parser.parseFn input > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline run parser inputStr = > runOnInput parser (fromStr inputStr) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline parserPositionFromInputState (inputState : Input) = > { > currentLine = currentLine inputState > line = inputState.position.line > column = inputState.position.column > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getLabel parser = > parser.label > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline setLabel parser newLabel = > { > label = newLabel > parseFn = fun input -> > match parser.parseFn input with > | Success s -> Success s > | Failure (oldLabel, err, pos) -> Failure (newLabel, err, pos) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<?>) = setLabel > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline satisfy predicate label = > { > label = label > parseFn = fun input -> > let remainingInput, charOpt = nextChar input > match charOpt with > | None -> > let err = "No more input" > let pos = parserPositionFromInputState input > Failure (label, err, pos) > | Some first -> > if predicate first > then Success (first, remainingInput) > else > let err = $"Unexpected '%c{first}'" > let pos = parserPositionFromInputState input > Failure (label, err, pos) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > runOnInput parser input |> _assertEqual ( > Success ( > 'H', > { > lines = [[| "Hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 88.75ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ('H', { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "World" > let parser = satisfy (fun c -> c = 'H') "H" > runOnInput parser input |> _assertEqual ( > Failure ( > "H", > "Unexpected 'W'", > { > currentLine = "World" > line = 0 > column = 0 > } > ) > ) > > ╭─[ 87.77ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure ("H", "Unexpected 'W'", { currentLine = "World" │ > │ line = 0 │ > │ column = 0 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline bindP f p = > { > label = "unknown" > parseFn = fun input -> > match runOnInput p input with > | Failure (label, err, pos) -> Failure (label, err, pos) > | Success (value1, remainingInput) -> runOnInput (f value1) > remainingInput > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (>>=) p f = bindP f p > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e" > runOnInput parser2 input |> _assertEqual ( > Success ( > 'e', > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 107.46ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success ('e', { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "World" > let parser = satisfy (fun c -> c = 'W') "W" > let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e" > runOnInput parser2 input |> _assertEqual ( > Failure ( > "e", > "Unexpected 'o'", > { > currentLine = "World" > line = 0 > column = 1 > } > ) > ) > > ╭─[ 94.41ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure ("e", "Unexpected 'o'", { currentLine = "World" │ > │ line = 0 │ > │ column = 1 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline returnP x = > { > label = $"%A{x}" > parseFn = fun input -> Success (x, input) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = returnP "Hello" > runOnInput parser input |> _assertEqual ( > Success ( > "Hello", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 0 } > } > ) > ) > > ╭─[ 59.83ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ("Hello", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline mapP f = > bindP (f >> returnP) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<!>) = mapP > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (|>>) x f = f <!> x > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = parser |>> string > runOnInput parser2 input |> _assertEqual ( > Success ( > "H", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 61.64ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ("H", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline applyP fP xP = > fP >>= > fun f -> > xP >>= > fun x -> > returnP (f x) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<*>) = applyP > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline lift2 f xP yP = > returnP f <*> xP <*> yP > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'e') "e" > let parser3 = lift2 (fun c1 c2 -> string c1 + string c2) parser parser2 > runOnInput parser3 input |> _assertEqual ( > Success ( > "He", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 93.06ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ("He", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline andThen p1 p2 = > p1 >>= > fun p1Result -> > p2 >>= > fun p2Result -> > returnP (p1Result, p2Result) > <?> $"{getLabel p1} andThen {getLabel p2}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (.>>.) = andThen > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'e') "e" > let parser3 = parser .>>. parser2 > runOnInput parser3 input |> _assertEqual ( > Success ( > ('H', 'e'), > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 75.34ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (('H', 'e'), { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline orElse p1 p2 = > { > label = $"{getLabel p1} orElse {getLabel p2}" > parseFn = fun input -> > match runOnInput p1 input with > | Success _ as result -> result > | Failure _ -> runOnInput p2 input > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<|>) = orElse > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'h') "h" > let parser3 = parser <|> parser2 > runOnInput parser3 input |> _assertEqual ( > Success ( > 'h', > { > lines = [[| "hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 84.28ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ('h', { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline choice listOfParsers = > listOfParsers |> List.reduce (<|>) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'h') "h" > let parser3 = choice [[ parser; parser2 ]] > runOnInput parser3 input |> _assertEqual ( > Success ( > 'h', > { > lines = [[| "hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 85.01ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ('h', { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let rec sequence parserList = > match parserList with > | [[]] -> returnP [[]] > | head :: tail -> (lift2 cons) head (sequence tail) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'e') "e" > let parser3 = sequence [[ parser; parser2 ]] > runOnInput parser3 input |> _assertEqual ( > Success ( > [[ 'H'; 'e' ]], > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 124.70ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success (['H'; 'e'], { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let rec parseZeroOrMore parser input = > match runOnInput parser input with > | Failure (_, _, _) -> > [[]], input > | Success (firstValue, inputAfterFirstParse) -> > let subsequentValues, remainingInput = parseZeroOrMore parser > inputAfterFirstParse > firstValue :: subsequentValues, remainingInput > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline many parser = > { > label = $"many {getLabel parser}" > parseFn = fun input -> Success (parseZeroOrMore parser input) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = many parser > runOnInput parser2 input |> _assertEqual ( > Success ( > [[]], > { > lines = [[| "hello" |]] > position = { line = 0; column = 0 } > } > ) > ) > > ╭─[ 75.15ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ([], { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline many1 p = > p >>= > fun head -> > many p >>= > fun tail -> > returnP (head :: tail) > <?> $"many1 {getLabel p}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = many1 parser > runOnInput parser2 input |> _assertEqual ( > Failure ( > "many1 H", > "Unexpected 'h'", > { > currentLine = "hello" > line = 0 > column = 0 > } > ) > ) > > ╭─[ 119.77ms - stdout ]────────────────────────────────────────────────────────╮ > │ Failure ("many1 H", "Unexpected 'h'", { currentLine = "hello" │ > │ line = 0 │ > │ column = 0 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline opt p = > let some = p |>> Some > let none = returnP None > (some <|> none) > <?> $"opt {getLabel p}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = opt parser > runOnInput parser2 input |> _assertEqual ( > Success ( > None, > { > lines = [[| "hello" |]] > position = { line = 0; column = 0 } > } > ) > ) > > ╭─[ 89.85ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (None, { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (.>>) p1 p2 = > p1 .>>. p2 > |> mapP fst > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (>>.) p1 p2 = > p1 .>>. p2 > |> mapP snd > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline between p1 p2 p3 = > p1 >>. p2 .>> p3 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "[[Hello]]" > let parser = > between > (satisfy (fun c -> c = '[[') "[[") > (many (satisfy (fun c -> [[ 'a' .. 'z' ]] @ [[ 'A' .. 'Z' ]] |> > List.contains c) "letter")) > (satisfy (fun c -> c = ']]') "]]") > runOnInput parser input |> _assertEqual ( > Success ( > [[ 'H'; 'e'; 'l'; 'l'; 'o' ]], > { > lines = [[| "[[Hello]]" |]] > position = { line = 0; column = 7 } > } > ) > ) > > ╭─[ 266.54ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success (['H'; 'e'; 'l'; 'l'; 'o'], { lines = [|"[Hello]"|] │ > │ position = { line = 0 │ > │ column = 7 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sepBy1 p sep = > let sepThenP = sep >>. p > p .>>. many sepThenP > |>> fun (p, pList) -> p :: pList > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sepBy p sep = > sepBy1 p sep <|> returnP [[]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello,World" > let parser = sepBy (many (satisfy (fun c -> c <> ',') "not comma")) (satisfy > (fun c -> c = ',') "comma") > runOnInput parser input |> _assertEqual ( > Success ( > [[ [[ 'H'; 'e'; 'l'; 'l'; 'o' ]]; [[ 'W'; 'o'; 'r'; 'l'; 'd'; '\n' ]] > ]], > { > lines = [[| "Hello,World" |]] > position = { line = 1; column = 0 } > } > ) > ) > > ╭─[ 123.00ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success ([['H'; 'e'; 'l'; 'l'; 'o']; ['W'; 'o'; 'r'; 'l'; 'd'; '\010']], { │ > │ lines = [|"Hello,World"|] │ > │ │ > │ position = { line = 1 │ > │ │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline pchar charToMatch = > satisfy ((=) charToMatch) $"%c{charToMatch}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline anyOf listOfChars = > listOfChars > |> List.map pchar > |> choice > <?> $"anyOf %A{listOfChars}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = anyOf [[ 'H'; 'e'; 'l'; 'o' ]] |> many > runOnInput parser input |> _assertEqual ( > Success ( > [[ 'H'; 'e'; 'l'; 'l'; 'o' ]], > { > lines = [[| "Hello" |]] > position = { line = 0; column = 5 } > } > ) > ) > > ╭─[ 101.46ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success (['H'; 'e'; 'l'; 'l'; 'o'], { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 5 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline charListToStr charList = > charList |> List.toArray |> String > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline manyChars cp = > many cp > |>> charListToStr > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline manyChars1 cp = > many1 cp > |>> charListToStr > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = manyChars1 (anyOf [[ 'H'; 'e'; 'l'; 'o' ]]) > runOnInput parser input |> _assertEqual ( > Success ( > "Hello", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 5 } > } > ) > ) > > ╭─[ 133.66ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success ("Hello", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 5 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline pstring str = > str > |> List.ofSeq > |> List.map pchar > |> sequence > |> mapP charListToStr > <?> str > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = pstring "Hello" > runOnInput parser input |> _assertEqual ( > Success ( > "Hello", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 5 } > } > ) > ) > > ╭─[ 118.06ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success ("Hello", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 5 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let whitespaceChar = > satisfy Char.IsWhiteSpace "whitespace" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let spaces = many whitespaceChar > > ── fsharp ────────────────────────────────────────────────────────────────────── > let spaces1 = many1 whitespaceChar > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr " Hello" > let parser = spaces1 .>>. pstring "Hello" > runOnInput parser input |> _assertEqual ( > Success ( > ([[ ' '; ' ' ]], "Hello"), > { > lines = [[| " Hello" |]] > position = { line = 0; column = 7 } > } > ) > ) > > ╭─[ 179.30ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success (([' '; ' '], "Hello"), { lines = [|" Hello"|] │ > │ position = { line = 0 │ > │ column = 7 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let digitChar = > satisfy Char.IsDigit "digit" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = digitChar > runOnInput parser input |> _assertEqual ( > Failure ( > "digit", > "Unexpected 'H'", > { > currentLine = "Hello" > line = 0 > column = 0 > } > ) > ) > > ╭─[ 50.53ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure ("digit", "Unexpected 'H'", { currentLine = "Hello" │ > │ line = 0 │ > │ column = 0 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let pint = > let inline resultToInt (sign, digits) = > let i = int digits > match sign with > | Some ch -> -i > | None -> i > > let digits = manyChars1 digitChar > > opt (pchar '-') .>>. digits > |> mapP resultToInt > <?> "integer" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run pint "-123" > |> _assertEqual ( > Success ( > -123, > { > lines = [[| "-123" |]] > position = { line = 0; column = 4 } > } > ) > ) > > ╭─[ 52.54ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (-123, { lines = [|"-123"|] │ > │ position = { line = 0 │ > │ column = 4 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let pfloat = > let inline resultToFloat (((sign, digits1), point), digits2) = > let fl = float $"{digits1}.{digits2}" > match sign with > | Some ch -> -fl > | None -> fl > > let digits = manyChars1 digitChar > > opt (pchar '-') .>>. digits .>>. pchar '.' .>>. digits > |> mapP resultToFloat > <?> "float" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run pfloat "-123.45" > |> _assertEqual ( > Success ( > -123.45, > { > lines = [[| "-123.45" |]] > position = { line = 0; column = 7 } > } > ) > ) > > ╭─[ 33.11ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (-123.45, { lines = [|"-123.45"|] │ > │ position = { line = 0 │ > │ column = 7 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline createParserForwardedToRef<'a> () = > let mutable parserRef : Parser<'a> = > { > label = "unknown" > parseFn = fun _ -> failwith "unfixed forwarded parser" > } > > let wrapperParser = > { parserRef with > parseFn = fun input -> runOnInput parserRef input > } > > wrapperParser, (fun v -> parserRef <- v) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (>>%) p x = > p > |>> fun _ -> x 00:00:28 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 57561 00:00:28 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:30 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/Parser.dib.ipynb to html 00:00:30 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:30 verbose #7 ! validate(nb) 00:00:33 verbose #8 ! [NbConvertApp] Writing 413674 bytes to c:\home\git\polyglot\apps\parser\Parser.dib.html 00:00:33 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645 00:00:33 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645 00:00:33 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/Parser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/Parser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:35 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:35 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:35 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 58265 00:00:00 debug #1 writeDibCode / output: Fs / path: Parser.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: JsonParser.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Parser.dib 00:00:00 debug #3 parseDibCode / output: Fs / file: JsonParser.dib
In [ ]:
{ pwsh ../apps/spiral/build.ps1 } | Invoke-Block
00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Supervisor.dib", "--retries", "3"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/Supervisor.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/Supervisor.dib" --output-path "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Supervisor (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com > mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli > ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ > 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" > #r > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha > rp.Json.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A > spNetCore.Html.Abstractions.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.Formatting.dll" > open System > open System.IO > open System.Text > open Microsoft.DotNet.Interactive.Formatting > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > open type Microsoft.DotNet.Interactive.Kernel > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: > TextWriter)->fprintfn writer "%120A" x) > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Notebooks.dib > #!import ../../lib/fsharp/Testing.dib > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > Formatter.ListExpansionLimit <- 100 > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] > #endif > type Mut<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Co... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] > #endif > type async_std_task_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] > #endif > type std_future_Future<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] > #endif > type rayon_vec_IntoIter<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] > #endif > type rayon_iter_Map<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] > #endif > type futures_lite_stream_StreamExt = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] > #endif > type futures_future_TryJoinAll<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] > #endif > type futures_future_Fuse<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] > #endif > type futures_future_JoinAll<'T> = class end > let rec closure0 () (v0 : System.Threading.CancellationToken) : > Async<System.Threading.CancellationToken> = > let v1 : bool = true > let mutable _v1 : Async<System.Threading.CancellationToken> option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT > let v2 : Async<System.Threading.CancellationToken> = null |> > unbox<Async<System... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] > #endif > type std_thread_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] > #endif > type std_sync_Arc<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] > #endif > type std_sync_Mutex<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] > #endif > type std_sync_MutexGuard<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] > #endif > type std_sync_PoisonError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] > #endif > type std_sync_mpsc_Receiver<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] > #endif > type std_sync_mpsc_SendError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] > #endif > type std_sync_mpsc_Sender<'T> = class end > type Disposable (f : unit -> unit) = interface System.IDisposable with member > _.Dispose () = f () > type [[<Struct>]] US0 = > | US0_0 of f0_0 : System.Threading.CancellationToken > | US0_1 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = > let v1 : bool = true > let mutable _v1 : unit option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] > #endif > type reqwest_Error = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] > #endif > type reqwest_RequestBuilder = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] > #endif > type reqwest_Response = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] > #endif > type clap_Arg = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] > #endif > type clap_ArgAction = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] > #endif > type clap_Command = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] > #endif > type clap_ArgMatches = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] > #endif > type clap_builder_ValueRange = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] > #endif > type clap_builder_ValueParser = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] > #endif > type clap_builder_PossibleValue = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] > #endif > type std_process_Child = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] > #endif > type std_process_ChildStderr = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] > #endif > type std_process_ChildStdout = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] > #endif > type std_process_ChildStdin = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] > #endif > type std_process_Command = class ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] > #endif > type std_fs_File = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] > #endif > type std_fs_FileType = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] > #endif > type std_path_Display = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] > #endif > type std_path_Path = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] > #endif > type std_path_PathBuf = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] > #endif > type async_walkdir_DirEntry = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] > #endif > type async_walkdir_Filtering = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] > #endif > type async_walkdir_WalkDir = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = clas... > > ── fsharp - import ───────────────────────────────────────────────────────────── > module SpiralTrace = > let trace x = > #if !INTERACTIVE > Trace.trace x > #else > trace x > #endif > > type TraceLevel = > #if !INTERACTIVE > Trace.US0 > #else > US0 > #endif > > module SpiralCrypto = > let hash_text x = > #if !INTERACTIVE > Crypto.hash_text x > #else > hash_text x > #endif > > #if !FABLE_COMPILER && !WASM && !CONTRACT > > module SpiralAsync = > let merge_cancellation_token_with_default_async x = > #if !INTERACTIVE > Async_.merge_cancellation_token_with_default_async x > #else > merge_cancellation_token_with_default_async x > #endif > > module SpiralThreading = > let new_disposable_token x = > #if !INTERACTIVE > Threading.new_disposable_token x > #else > new_disposable_token x > #endif > > module SpiralNetworking = > let test_port_open x = > #if !INTERACTIVE > Networking.test_port_open x > #else > test_port_open x > #endif > > let test_port_open_timeout x = > #if !INTERACTIVE > Networking.test_port_open_timeout x > #else > test_port_open_timeout x > #endif > > let wait_for_port_access x = > #if !INTERACTIVE > Networking.wait_for_port_access x > #else > wait_for_port_access x > #endif > > let get_available_port x = > #if !INTERACTIVE > Networking.get_available_port x > #else > get_available_port x > #endif > > module SpiralRuntime = > let get_executable_suffix () = > #if !INTERACTIVE > Runtime.get_executable_suffix () > #else > get_executable_suffix () > #endif > > let is_windows () = > #if !INTERACTIVE > ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > type AssertExceptionFormatter (ex) = > member _.Text = > ex.ToString() > .Replace("32m", "<span style=\"color: green;\">") > .Replace("36m", "</span>") > .Replace("31m", "<span style=\"color: red;\">") > .Replace("\n", "<br/>\n") > > > Formatter.Register<AssertExceptionFormatter> ((fun (x : > AssertExceptionFormatter) -> x.Text), "text/html") > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __expect fn log expected actual = > if log then printfn $"{actual.ToDisplayString ()}" > try > "Testing.__expect" |> fn actual expected > with :? Expecto.AssertException as ex -> > AssertExceptionFormatter(ex).Display () |> ignore > failwith (ex.GetType().FullName) > > let inline __contains log expected actual = __expect Expecto.Expect.contains log > expected actual > let inline _contains expected actual = __contains true expected actual > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log > expected actual > let inline _assertEqual expected actual = __assertEqual true expected actual > > let inline __isGreaterThan log expected actual = __expect > Expecto.Expect.isGreaterThan log expected actual > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual > > let inline __isGreaterThanOrEqual log expected actual = __expect > Expecto.Expect.isGreaterThanOrEqual log expected actual > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true > expected actual > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan > log expected actual > let inline _isLessThan expected actual = __isLessThan true expected actual > > let inline __isLessThanOrEqual log expected actual = __expect > Expecto.Expect.isLessThanOrEqual log expected actual > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true > expected actual > > let inline __sequenceEqual log expected actual = __expe... > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __isBetween log a b actual = > let inline isBetween actual (a, b) _ = > __isGreaterThanOrEqual log a actual > __isLessThanOrEqual log b actual > __expect isBetween log (a, b) actual > let inline _isBetween a b actual = __isBetween true a b actual > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Common.fs > #!import ../../lib/fsharp/CommonFSharp.fs > #!import ../../lib/fsharp/Async.fs > #!import ../../lib/fsharp/AsyncSeq.fs > #!import ../../lib/fsharp/Runtime.fs > #!import ../../lib/fsharp/FileSystem.fs > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Common = > > #if !INTERACTIVE > open Lib > #endif > > let nl = System.Environment.NewLine > let q = @"""" > > let inline cons head tail = head :: tail > > /// ## memoize > let inline memoize fn = > let result = lazy fn () > fun () -> result.Value > > /// ## TraceLevel > type TraceLevel = > | Verbose > | Debug > | Info > | Warning > | Critical > > let inline _locals () = "" > > /// ## trace > let to_trace_level = function > | Verbose -> SpiralTrace.TraceLevel.US0_0 > | Debug -> SpiralTrace.TraceLevel.US0_1 > | Info -> SpiralTrace.TraceLevel.US0_2 > | Warning -> SpiralTrace.TraceLevel.US0_3 > | Critical -> SpiralTrace.TraceLevel.US0_4 > > let trace level fn locals = > let level = level |> to_trace_level > SpiralTrace.trace level fn locals > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module CommonFSharp = > > open Common > > /// ## getUnionCaseName > let inline getUnionCaseName<'T> (x: 'T) = > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with > | case, _ -> case.Name > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Async = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## choice > let inline choice asyncs = async { > let e = Event<_> () > use cts = new System.Threading.CancellationTokenSource () > let fn = > asyncs > |> Seq.map (fun a -> async { > let! x = a > e.Trigger x > }) > |> Async.Parallel > |> Async.Ignore > Async.Start (fn, cts.Token) > let! result = Async.AwaitEvent e.Publish > cts.Cancel () > return result > } > > /// ## map > let inline map fn a = async { > let! x = a > return fn x > } > > /// ## catch > let inline catch a = > a > |> Async.Catch > |> map (function > | Choice1Of2 result -> Ok result > | Choice2Of2 ex -> Error ex > ) > > /// ## runWithTimeoutChoiceAsync > let inline runWithTimeoutChoiceAsync (timeout : int) fn = > let _locals () = $"timeout: {timeout} / {_locals ()}" > > let timeoutTask = async { > do! Async.Sleep timeout > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals > return None > } > > let task = async { > try > let! result = fn > return Some result > with > | :? System.AggregateException as ex when > ex.InnerExceptions > |> Seq.exists (function :? Sys... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module AsyncSeq = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## subscribeEvent > let inline subscribeEvent (event: IEvent<'H, 'A>) map = > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, > 'A>(event.AddHandler, event.RemoveHandler) > System.Reactive.Linq.Observable.Select (observable, fun event -> map > event.EventArgs) > |> FSharp.Control.AsyncSeq.ofObservableBuffered > > /// ## subscribeToken > let subscribeToken (token : System.Threading.CancellationToken) = > let tcs = new System.Threading.Tasks.TaskCompletionSource () > System.Action tcs.SetResult |> token.Register |> ignore > let start = System.DateTime.Now.Ticks > FSharp.Control.AsyncSeq.unfoldAsync > (fun () -> async { > do! tcs.Task |> Async.AwaitTask > return Some (System.DateTime.Now.Ticks - start, ()) > }) > () > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Runtime = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## parseArgs > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = > let assemblyName = > System.Reflection.Assembly.GetEntryAssembly().GetName().Name > let errorHandler : Argu.IExiter = > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> > List.contains assemblyName > then Argu.ExceptionExiter () > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | > _ -> Some System.ConsoleColor.Red) > > let parser = > Argu.ArgumentParser.Create<'T> ( > programName = > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", > errorHandler = errorHandler > ) > > parser.ParseCommandLine args > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseArgs<'T> > |> fun results -> results.GetAllResults () > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseAllArgs<'T> > |> List.groupBy CommonFSharp.getUnionCaseName<'T> > |> Map.ofList > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module FileSystem = > > #if !INTERACTIVE > open Lib > #endif > > open Common > open SpiralFileSystem.Operators > > /// ## watchDirectory > [[<RequireQualifiedAccess>]] > type FileSystemChangeType = > | Failure > | Changed > | Created > | Deleted > | Renamed > > [[<RequireQualifiedAccess>]] > type FileSystemChange = > | Failure of exn: exn > | Changed of path: string * content: string option > | Created of path: string * content: string option > | Deleted of path: string > | Renamed of oldPath: string * (string * string option) > > > let inline watchDirectoryWithFilter filter shouldReadContent path = > let fullPath = path |> System.IO.Path.GetFullPath > let _locals () = $"filter: {filter} / {_locals ()}" > > let watcher = > new System.IO.FileSystemWatcher ( > Path = fullPath, > NotifyFilter = filter, > EnableRaisingEvents = true, > IncludeSubdirectories = true > ) > > let inline getEventPath (path : string) = > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> > SpiralSm.trim_start [[| '/'; '\\' |]] > > let inline ticks () = > System.DateTime.UtcNow.Ticks > > let changedStream = > AsyncSeq.subscribeEvent > watcher.Changed > (fun event -> > ticks (), > [[ FileSystemChange... > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open SpiralFileSystem.Operators > open Microsoft.AspNetCore.SignalR.Client > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## sendJson │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sendJson (port : int) (json : string) = async { > let host = "127.0.0.1" > let! portOpen = SpiralNetworking.test_port_open host port > if portOpen then > try > let connection = > HubConnectionBuilder().WithUrl($"http://{host}:{port}").Build() > do! connection.StartAsync () |> Async.AwaitTask > let! result = connection.InvokeAsync<string>("ClientToServerMsg", > json) |> Async.AwaitTask > do! connection.StopAsync () |> Async.AwaitTask > trace Verbose (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / result: {result |> Option.ofObj |> > Option.map (SpiralSm.ellipsis_end 200)}") _locals > return Some result > with ex -> > trace Critical (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / ex: {ex |> > SpiralSm.format_exception}") _locals > return None > else > trace Debug (fun () -> "Supervisor.sendJson / port: {port} / error: port > not open") _locals > return None > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## sendObj │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sendObj port obj = > obj > |> System.Text.Json.JsonSerializer.Serialize > |> sendJson port > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## awaitCompiler │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type VSCPos = {| line : int; character : int |} > type VSCRange = VSCPos * VSCPos > type RString = VSCRange * string > type TracedError = {| trace : string list; message : string |} > type ClientErrorsRes = > | FatalError of string > | TracedError of TracedError > | PackageErrors of {| uri : string; errors : RString list |} > | TokenizerErrors of {| uri : string; errors : RString list |} > | ParserErrors of {| uri : string; errors : RString list |} > | TypeErrors of {| uri : string; errors : RString list |} > > ── fsharp ────────────────────────────────────────────────────────────────────── > let workspaceRoot = SpiralFileSystem.get_workspace_root () > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline awaitCompiler port cancellationToken = async { > let host = "127.0.0.1" > let struct (ct, disposable) = cancellationToken |> > SpiralThreading.new_disposable_token > let! ct = ct |> SpiralAsync.merge_cancellation_token_with_default_async > > let compiler = MailboxProcessor.Start (fun inbox -> async { > let! availablePort = SpiralNetworking.get_available_port (Some 500) host > port > if availablePort <> port then > inbox.Post (port, false) > else > let compilerPath = > workspaceRoot </> "deps/The-Spiral-Language/The Spiral Language > 2/artifacts/bin/The Spiral Language 2/release" > |> System.IO.Path.GetFullPath > > let dllPath = compilerPath </> "Spiral.dll" > > let! exitCode, result = > SpiralRuntime.execution_options (fun x -> > { x with > l0 = Some ct > l1 = $@"dotnet ""{dllPath}"" --port {availablePort} > --default-int i32 --default-float f64" > l3 = Some (fun struct (_, line, _) -> async { > if line |> SpiralSm.contains > $"System.IO.IOException: Failed to bind to address http://{host}:{port}: address > already in use." then > inbox.Post (port, false) > > if line |> SpiralSm.contains $"Server bound to: > http://localhost:{availablePort}" then > let rec loop retry = async { > do! > SpiralNetworking.wait_for_port_access > (Some 100) true host availablePort > |> Async.runWithTimeoutAsync 2000 > |> Async.Ignore > > let _locals () = $"port: {availablePort} / > retry: {retry} / {_locals ()}" > try > let pingObj = {| Ping = true |} > let! pingResult = pingObj |> sendObj > availablePort > trace Verbose (fun () -> $"awaitCompiler > / Ping / result: '{pingResult}'") _locals > > inbox.Post (availablePort, true) > with ex -> > trace Verbose (fun () -> $"awaitCompiler > / Ping / ex: {ex |> SpiralSm.format_exception}") _locals > do! Async.Sleep 10 > do! loop (retry + 1) > } > do! loop 0 > }) > l6 = Some workspaceRoot > } > ) > |> SpiralRuntime.execute_with_options_async > > trace Debug (fun () -> $"awaitCompiler / exitCode: {exitCode} / > result: {result}") _locals > disposable.Dispose () > }, ct) > > let! serverPort, managed = compiler.Receive () > > let connection = > HubConnectionBuilder().WithUrl($"http://{host}:{serverPort}").Build () > do! connection.StartAsync () |> Async.AwaitTask > > let event = Event<_> () > let disposable' = connection.On<string> ("ServerToClientMsg", event.Trigger) > let stream = > FSharp.Control.AsyncSeq.unfoldAsync > (fun () -> async { > let! msg = event.Publish |> Async.AwaitEvent > return Some (msg |> > FSharp.Json.Json.deserialize<ClientErrorsRes>, ()) > }) > () > > let disposable' = > new_disposable (fun () -> > async { > disposable'.Dispose () > do! connection.StopAsync () |> Async.AwaitTask > disposable.Dispose () > if managed > then do! > SpiralNetworking.wait_for_port_access (Some 100) false host > serverPort > |> Async.runWithTimeoutAsync 2000 > |> Async.Ignore > } > |> Async.RunSynchronously > ) > > return > serverPort, > stream, > ct, > disposable' > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getFilePathFromUri │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getFilePathFromUri uri = > match System.Uri.TryCreate (uri, System.UriKind.Absolute) with > | true, uri -> uri.AbsolutePath |> System.IO.Path.GetFullPath > | _ -> failwith "invalid uri" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getCompilerPort │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getCompilerPort () = > 13805 > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## serialize_obj │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let serializeObj obj = > obj > |> FSharp.Json.Json.serialize > |> SpiralSm.replace "\\\\" "\\" > |> SpiralSm.replace "\\r\\n" "\n" > |> SpiralSm.replace "\\n" "\n" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## buildFile │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildFile timeout port cancellationToken path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let fileDir = fullPath |> System.IO.Path.GetDirectoryName > let fileName = fullPath |> System.IO.Path.GetFileNameWithoutExtension > let! code = fullPath |> SpiralFileSystem.read_all_text_async > > let stream, disposable = fileDir |> FileSystem.watchDirectory (fun _ -> > false) > use _ = disposable > > let struct (token, disposable) = SpiralThreading.new_disposable_token > cancellationToken > use _ = disposable > > let! serverPort, errors, ct, disposable = awaitCompiler port (Some token) > use _ = disposable > > let fsxContentSeq = > stream > |> FSharp.Control.AsyncSeq.chooseAsync (function > | _, (FileSystem.FileSystemChange.Changed (path, _)) > when (path |> System.IO.Path.GetFileName) = $"{fileName}.fsx" > -> > fileDir </> path |> > SpiralFileSystem.read_all_text_retry_async > | _ -> None |> Async.init > ) > |> FSharp.Control.AsyncSeq.map (fun content -> > Some (content |> SpiralSm.replace "\r\n" "\n"), None > ) > > let inline printErrorData (data : {| uri : string; errors : RString list |}) > = > let fileName = data.uri |> System.IO.Path.GetFileName > let errors = > data.errors > |> List.map snd > |> SpiralSm.concat "\n" > $"{fileName}:\n{errors}" > > let errorsSeq = > errors > |> FSharp.Control.AsyncSeq.choose (fun error -> > match error with > | FatalError message -> > Some (message, error) > | TracedError data -> > Some (data.message, error) > | PackageErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | TokenizerErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | ParserErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | TypeErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | _ -> None > ) > |> FSharp.Control.AsyncSeq.map (fun (message, error) -> > None, Some (message, error) > ) > > let timerSeq = > 1000 > |> FSharp.Control.AsyncSeq.intervalMs > |> FSharp.Control.AsyncSeq.map (fun _ -> None, None) > > let outputSeq = > [[ fsxContentSeq; errorsSeq; timerSeq ]] > |> FSharp.Control.AsyncSeq.mergeAll > > let! outputChild = > ((None, [[]], 0), outputSeq) > ||> FSharp.Control.AsyncSeq.scan ( > fun (fsxContentResult, errors, typeErrorCount) (fsxContent, error) > -> > match fsxContent, error with > | Some fsxContent, None -> Some fsxContent, errors, > typeErrorCount > | None, Some (_, FatalError "File main has a type error > somewhere in its path.") -> > fsxContentResult, errors, typeErrorCount + 1 > | None, Some error -> fsxContentResult, error :: errors, > typeErrorCount > | None, None when typeErrorCount >= 1 -> > fsxContentResult, errors, typeErrorCount + 1 > | _ -> fsxContentResult, errors, typeErrorCount > ) > |> FSharp.Control.AsyncSeq.takeWhileInclusive (fun (fsxContent, errors, > typeErrorCount) -> > trace Debug (fun () -> $"buildFile / takeWhileInclusive / path: > {path} / fsxContent: {fsxContent |> Option.defaultValue System.String.Empty |> > SpiralSm.ellipsis_end 400} / errors: {errors |> serializeObj} / typeErrorCount: > {typeErrorCount}") _locals > #if INTERACTIVE > let errorWait = 2 > #else > let errorWait = 4 > #endif > match fsxContent, errors with > | None, [[]] when typeErrorCount > errorWait -> false > | None, [[]] -> true > | _ -> false > ) > |> FSharp.Control.AsyncSeq.tryLast > |> Async.withCancellationToken ct > |> Async.catch > |> Async.runWithTimeoutAsync timeout > |> Async.StartChild > > let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > > let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} |} > let! _fileOpenResult = fileOpenObj |> sendObj serverPort > > // do! Async.Sleep 60 > > let buildFileObj = {| BuildFile = {| uri = fullPathUri; backend = "Fsharp" > |} |} > let! _buildFileResult = buildFileObj |> sendObj serverPort > > let! result = > outputChild > |> Async.map (function > | Some (Ok (Some (fsxCode, errors, _))) -> > fsxCode, errors |> List.distinct |> List.rev > | Some (Error ex) -> > trace Critical (fun () -> $"buildFile / error: {ex |> > serializeObj}") _locals > None, [[]] > | _ -> None, [[]] > ) > > if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then > let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] |} |} > let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort > () > > let fsxPath = fileDir </> $"{fileName}.fsx" > return fsxPath, result > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## persistCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline persistCode code = async { > let targetDir = workspaceRoot </> "target/polyglot/spiral_eval" > > let packagesDir = targetDir </> "packages" > > let hashHex = code |> SpiralCrypto.hash_text > > let codeDir = packagesDir </> hashHex > > let mainPath = codeDir </> "main.spi" > > codeDir |> System.IO.Directory.CreateDirectory |> ignore > > do! code |> SpiralFileSystem.write_all_text_exists mainPath > > let spiprojPath = codeDir </> "package.spiproj" > let spiprojCode = > $"""packageDir: {workspaceRoot </> "lib"} > packages: > |core- > spiral- > modules: > main > """ > do! spiprojCode |> SpiralFileSystem.write_all_text_exists spiprojPath > > let fsxPath = codeDir </> "main.fsx" > > if fsxPath |> System.IO.File.Exists |> not > then return mainPath, None > else > let! oldCode = mainPath |> SpiralFileSystem.read_all_text_async > if oldCode <> code > then return mainPath, None > else > let! fsxCode = fsxPath |> SpiralFileSystem.read_all_text_async > return mainPath, Some (fsxPath, fsxCode |> SpiralSm.replace "\r\n" > "\n") > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## buildCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildCode timeout cancellationToken code = async { > let! mainPath, fsx = code |> persistCode > match fsx with > | Some (fsxPath, fsxCode) -> return mainPath, (fsxPath, Some fsxCode), [[]] > | None -> > let port = getCompilerPort () > let! fsxPath, (fsxCode, errors) = mainPath |> buildFile timeout port > cancellationToken > return mainPath, (fsxPath, fsxCode), errors > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let buildCode timeout cancellationToken code = buildCode timeout > cancellationToken code > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl app () = > console.write_line "text" > 1i32 > > inl main () = > app > |> dyn > |> ignore > """ > |> buildCode 15000 None > |> Async.runWithTimeout 15000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some """let rec closure0 () () : int32 = > let v0 : (string -> unit) = System.Console.WriteLine > let v1 : string = "text" > v0 v1 > 1 > let v0 : (unit -> int32) = closure0() > () > """, > [[]] > ) > ) > > ╭─[ 6.57s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:20 debug #1 run_with_timeout_async / timeout: 500 │ > │ 00:00:17 debug #1 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:17 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:17 verbose #3 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:17 verbose #4 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:20 debug #2 run_with_timeout_async / timeout: 100 │ > │ 00:00:20 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 │ > │ / timeout: Some 100 / status: True │ > │ 00:00:20 debug #4 run_with_timeout_async / timeout: 100 │ > │ 00:00:21 debug #5 run_with_timeout_async / timeout: 100 │ > │ 00:00:18 verbose #5 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:21 debug #6 run_with_timeout_async / timeout: 100 │ > │ 00:00:15 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:15 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:18 verbose #6 > Server bound to: http://localhost:13805 │ > │ 00:00:15 debug #3 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ > │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:15 debug #4 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ > │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:15 verbose #5 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl app () =\n console.write_line │ > │ \u0022text\u0022\n 1i32\n\ninl main │ > │ ...ot/spiral_eval/packages/0ad2ee90a0886647a7d9c334e1811a0c3ae5599125952e30e │ > │ ba9d5e3b57a56e0/main.spi"}} / result: │ > │ 00:00:15 verbose #6 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/0ad2ee90a0886647a7d9c334e1811a0c3ae5599125952e │ > │ 30eba9d5e3b57a56e0/main.spi"}} / result: │ > │ 00:00:19 verbose #7 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0ad2ee90a0886647a7 │ > │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0/main.spi │ > │ 00:00:16 debug #7 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ > │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:17 debug #8 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ > │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:18 debug #9 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ > │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:19 debug #10 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ > │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: let │ > │ rec closure0 () () : int32 = │ > │ let v0 : (string -> unit) = System.Console.WriteLine │ > │ let v1 : string = "text" │ > │ v0 v1 │ > │ 1 │ > │ let v0 : (unit -> int32) = closure0() │ > │ () │ > │ / errors: [] / typeErrorCount: 0 │ > │ 00:00:19 verbose #11 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0ad2ee90a │ > │ 0886647a7d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0"]}} / result: │ > │ 00:00:25 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 │ > │ / timeout: Some 100 / status: False │ > │ 00:00:25 debug #8 run_with_timeout_async / timeout: 100 │ > │ 00:00:19 debug #12 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some │ > │ (Some │ > │ "let rec closure0 () () : int32 = │ > │ let v0 : (string -> unit) = System.Console.WriteLine │ > │ let v1 : string = "text" │ > │ v0 v1 │ > │ 1 │ > │ let v0 : (unit -> int32) = closure0() │ > │ () │ > │ ", │ > │ []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "" > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> _assertEqual None > > ╭─[ 10.28s - stdout ]──────────────────────────────────────────────────────────╮ > │ 00:00:26 debug #9 run_with_timeout_async / timeout: 500 │ > │ 00:00:23 debug #8 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:24 verbose #9 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:24 verbose #10 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:24 verbose #11 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:27 debug #10 run_with_timeout_async / timeout: 100 │ > │ 00:00:27 verbose #11 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:27 debug #12 run_with_timeout_async / timeout: 100 │ > │ 00:00:27 debug #13 run_with_timeout_async / timeout: 100 │ > │ 00:00:27 debug #14 run_with_timeout_async / timeout: 100 │ > │ 00:00:27 debug #15 run_with_timeout_async / timeout: 100 │ > │ 00:00:25 verbose #12 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:28 debug #16 run_with_timeout_async / timeout: 100 │ > │ 00:00:22 verbose #13 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:22 verbose #14 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:25 verbose #13 > Server bound to: http://localhost:13805 │ > │ 00:00:22 debug #15 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:22 debug #16 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:22 verbose #17 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"","uri":"file:///c:/home/git/polyglot/target/polyglo │ > │ t/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca4959 │ > │ 91b7852b855/main.spi"}} / result: │ > │ 00:00:22 verbose #18 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b93 │ > │ 4ca495991b7852b855/main.spi"}} / result: │ > │ 00:00:26 verbose #14 > 00:00:02 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ > │ 00:00:23 debug #19 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:24 debug #20 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:25 debug #21 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:26 debug #22 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:29 verbose #15 > Cannot find `main` in file main. │ > │ 00:00:29 verbose #16 > 00:00:05 debug #5 │ > │ Supervisor.supervisor_server.BuildFile.handle_build_result.BuildSkip / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ > │ 00:00:27 debug #23 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:28 debug #24 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:29 debug #25 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:36 verbose #17 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:36 debug #18 run_with_timeout_async / timeout: 100 │ > │ 00:00:30 debug #26 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ 00:00:30 debug #27 runWithTimeoutAsync / timeout: 10000 │ > │ <null> │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > 1i32 / 0i32 > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "An attempt to divide by zero has been detected at compile time." ]] > ) > ) > > ╭─[ 5.61s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:36 debug #19 run_with_timeout_async / timeout: 500 │ > │ 00:00:34 debug #17 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:34 verbose #18 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:34 verbose #19 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:34 verbose #20 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:37 debug #20 run_with_timeout_async / timeout: 100 │ > │ 00:00:37 verbose #21 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:37 debug #22 run_with_timeout_async / timeout: 100 │ > │ 00:00:37 debug #23 run_with_timeout_async / timeout: 100 │ > │ 00:00:34 verbose #21 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:37 debug #24 run_with_timeout_async / timeout: 100 │ > │ 00:00:31 verbose #28 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:31 verbose #29 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:35 verbose #22 > Server bound to: http://localhost:13805 │ > │ 00:00:31 debug #30 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:31 debug #31 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:31 verbose #32 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n 1i32 / │ > │ 0i32\n","uri":"file:///c:/home/git/polyglot/target...ot/spiral_eval/packages │ > │ /232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi"} │ > │ } / result: │ > │ 00:00:31 verbose #33 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb1 │ > │ 7fe93dda9c433ec620/main.spi"}} / result: │ > │ 00:00:35 verbose #23 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi │ > │ 00:00:32 debug #34 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:33 debug #35 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:34 debug #36 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:35 debug #37 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [ │ > │ [ │ > │ "An attempt to divide by zero has been detected at compile time.", │ > │ { │ > │ "TracedError": { │ > │ "message": "An attempt to divide by zero has been detected at │ > │ compile time.", │ > │ "trace": [ │ > │ "Error trace on line: 1, column: 10 in module: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ > │ inl main () = │ > │ ^ │ > │ ", │ > │ "Error trace on line: 2, column: 5 in module: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ > │ 1i32 / 0i32 │ > │ ^ │ > │ " │ > │ ] │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 │ > │ 00:00:35 verbose #38 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d86 │ > │ 2bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620"]}} / result: │ > │ 00:00:41 verbose #25 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:41 debug #26 run_with_timeout_async / timeout: 100 │ > │ 00:00:35 debug #39 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (None, ["An attempt to divide by zero has been detected at compile │ > │ time."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > 1 + "" > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ > "main.spi: > Constraint satisfaction error. > Got: string > Fails to satisfy: number" > ]] > ) > ) > > ── fsharp ────────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ Expecto.AssertException: Testing.__expect.<br/> │ > │ <span style="color: green;">expected</span>:<br/> │ > │ Some<span style="color: green;"><br/> │ > │ (None,<br/> │ > │ ["main.spi:<br/> │ > │ Constraint satisfaction error.<br/> │ > │ Got: string<br/> │ > │ Fails to satisfy: number"])</span><br/> │ > │ <span style="color: red;"> actual</span>:<br/> │ > │ Some<span style="color: red;"> (None, [])</span> <br/> │ > │ at Expecto.Expect.equalWithDiffPrinter@401-15.Invoke(String msg) <br/> │ > │ at Expecto.Expect.equalWithDiffPrinter$cont@383[a](FSharpFunc`2 │ > │ diffPrinter, a actual, a expected, String message, Object e, Object a, Unit │ > │ unitVar) in C:\workspaces\dotnet\expecto\Expecto\Expect.fs:line 401 <br/> │ > │ at Expecto.Expect.equalWithDiffPrinter[a](FSharpFunc`2 diffPrinter, a │ > │ actual, a expected, String message) <br/> │ > │ at <StartupCode$FSI_0043>.$FSI_0043.main@() │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 7.31s - stderr ]───────────────────────────────────────────────────────────╮ > │ 00:00:42 debug #27 run_with_timeout_async / timeout: 500 │ > │ 00:00:39 debug #24 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:40 verbose #25 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:40 verbose #26 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:40 verbose #27 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:43 debug #28 run_with_timeout_async / timeout: 100 │ > │ 00:00:43 verbose #29 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:43 debug #30 run_with_timeout_async / timeout: 100 │ > │ 00:00:43 debug #31 run_with_timeout_async / timeout: 100 │ > │ 00:00:40 verbose #28 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:43 debug #32 run_with_timeout_async / timeout: 100 │ > │ 00:00:37 verbose #40 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:37 verbose #41 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:41 verbose #29 > Server bound to: http://localhost:13805 │ > │ 00:00:37 debug #42 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:37 debug #43 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:37 verbose #44 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n 1 \u002B │ > │ \u0022\u0022\n","uri":"file:///c:/home/git/polyg...ot/spiral_eval/packages/2 │ > │ 278923ce88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi"}} │ > │ / result: │ > │ 00:00:37 verbose #45 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/2278923ce88b0e473e77d4d93e25afa6e5e4f5efe80398 │ > │ 2e504cc198d4c4d82d/main.spi"}} / result: │ > │ 00:00:41 verbose #30 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi │ > │ 00:00:38 debug #46 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:39 debug #47 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:40 debug #48 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:41 debug #49 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 1 │ > │ 00:00:41 debug #50 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 2 │ > │ 00:00:42 debug #51 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 3 │ > │ 00:00:42 verbose #52 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce │ > │ 88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d"]}} / result: │ > │ 00:00:49 verbose #33 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:49 debug #34 run_with_timeout_async / timeout: 100 │ > │ 00:00:42 debug #53 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (None, []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > Exiting... 00:01:06 verbose #3 runtime.execute_with_options / result / exit_code: -1 / std_trace.Length: 77401 00:01:06 debug #4 spiral_builder.run / repl error / exit_code: -1 / retry: 1/3 / repl_result: ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ # Supervisor (Polyglot) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan dard2.1/FSharp.Control.AsyncSeq.dll" #r @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 0/System.Reactive.dll" #r @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ netstandard2.0/System.Reactive.Linq.dll" #r @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" #r @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha rp.Json.dll" ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A spNetCore.Html.Abstractions.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.Formatting.dll" open System open System.IO open System.Text open Microsoft.DotNet.Interactive.Formatting ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" open type Microsoft.DotNet.Interactive.Kernel ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Notebooks.dib #!import ../../lib/fsharp/Testing.dib ── fsharp - import ───────────────────────────────────────────────────────────── //// test Formatter.ListExpansionLimit <- 100 ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] #endif type core_any_Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type core_ops_Try<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] #endif type core_any_Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type core_ops_Try<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Co... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] #endif type async_std_task_JoinHandle<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] #endif type std_future_Future<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] #endif type rayon_vec_IntoIter<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] #endif type rayon_iter_Map<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] #endif type futures_lite_stream_StreamExt = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] #endif type futures_future_TryJoinAll<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] #endif type futures_future_Fuse<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] #endif type futures_future_JoinAll<'T> = class end let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : bool = true let mutable _v1 : Async<System.Threading.CancellationToken> option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] #endif type std_thread_JoinHandle<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] #endif type std_sync_Arc<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] #endif type std_sync_Mutex<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] #endif type std_sync_MutexGuard<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] #endif type std_sync_PoisonError<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] #endif type std_sync_mpsc_Receiver<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] #endif type std_sync_mpsc_SendError<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] #endif type std_sync_mpsc_Sender<'T> = class end type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [[<Struct>]] US0 = | US0_0 of f0_0 : System.Threading.CancellationToken | US0_1 let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = let v1 : bool = true let mutable _v1 : unit option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] #endif type reqwest_Error = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] #endif type reqwest_RequestBuilder = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] #endif type reqwest_Response = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] #endif type core_any_Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type core_ops_Try<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] #endif type clap_Arg = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] #endif type clap_ArgAction = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] #endif type clap_Command = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] #endif type clap_ArgMatches = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] #endif type clap_builder_ValueRange = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] #endif type clap_builder_ValueParser = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] #endif type clap_builder_PossibleValue = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] #endif type std_process_Child = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] #endif type std_process_ChildStderr = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] #endif type std_process_ChildStdout = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] #endif type std_process_ChildStdin = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] #endif type std_process_Command = class ... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] #endif type std_fs_File = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] #endif type std_fs_FileType = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] #endif type std_path_Display = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] #endif type std_path_Path = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] #endif type std_path_PathBuf = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] #endif type async_walkdir_DirEntry = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] #endif type async_walkdir_Filtering = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] #endif type async_walkdir_WalkDir = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] #endif type core_any_Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type core_ops_Try<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = clas... ── fsharp - import ───────────────────────────────────────────────────────────── module SpiralTrace = let trace x = #if !INTERACTIVE Trace.trace x #else trace x #endif type TraceLevel = #if !INTERACTIVE Trace.US0 #else US0 #endif module SpiralCrypto = let hash_text x = #if !INTERACTIVE Crypto.hash_text x #else hash_text x #endif #if !FABLE_COMPILER && !WASM && !CONTRACT module SpiralAsync = let merge_cancellation_token_with_default_async x = #if !INTERACTIVE Async_.merge_cancellation_token_with_default_async x #else merge_cancellation_token_with_default_async x #endif module SpiralThreading = let new_disposable_token x = #if !INTERACTIVE Threading.new_disposable_token x #else new_disposable_token x #endif module SpiralNetworking = let test_port_open x = #if !INTERACTIVE Networking.test_port_open x #else test_port_open x #endif let test_port_open_timeout x = #if !INTERACTIVE Networking.test_port_open_timeout x #else test_port_open_timeout x #endif let wait_for_port_access x = #if !INTERACTIVE Networking.wait_for_port_access x #else wait_for_port_access x #endif let get_available_port x = #if !INTERACTIVE Networking.get_available_port x #else get_available_port x #endif module SpiralRuntime = let get_executable_suffix () = #if !INTERACTIVE Runtime.get_executable_suffix () #else get_executable_suffix () #endif let is_windows () = #if !INTERACTIVE ... ── fsharp - import ───────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" ── fsharp - import ───────────────────────────────────────────────────────────── //// test type AssertExceptionFormatter (ex) = member _.Text = ex.ToString() .Replace("32m", "<span style=\"color: green;\">") .Replace("36m", "</span>") .Replace("31m", "<span style=\"color: red;\">") .Replace("\n", "<br/>\n") Formatter.Register<AssertExceptionFormatter> ((fun (x : AssertExceptionFormatter) -> x.Text), "text/html") ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __expect fn log expected actual = if log then printfn $"{actual.ToDisplayString ()}" try "Testing.__expect" |> fn actual expected with :? Expecto.AssertException as ex -> AssertExceptionFormatter(ex).Display () |> ignore failwith (ex.GetType().FullName) let inline __contains log expected actual = __expect Expecto.Expect.contains log expected actual let inline _contains expected actual = __contains true expected actual let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log expected actual let inline _assertEqual expected actual = __assertEqual true expected actual let inline __isGreaterThan log expected actual = __expect Expecto.Expect.isGreaterThan log expected actual let inline _isGreaterThan expected actual = __isGreaterThan true expected actual let inline __isGreaterThanOrEqual log expected actual = __expect Expecto.Expect.isGreaterThanOrEqual log expected actual let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true expected actual let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan log expected actual let inline _isLessThan expected actual = __isLessThan true expected actual let inline __isLessThanOrEqual log expected actual = __expect Expecto.Expect.isLessThanOrEqual log expected actual let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true expected actual let inline __sequenceEqual log expected actual = __expe... ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __isBetween log a b actual = let inline isBetween actual (a, b) _ = __isGreaterThanOrEqual log a actual __isLessThanOrEqual log b actual __expect isBetween log (a, b) actual let inline _isBetween a b actual = __isBetween true a b actual ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Common.fs #!import ../../lib/fsharp/CommonFSharp.fs #!import ../../lib/fsharp/Async.fs #!import ../../lib/fsharp/AsyncSeq.fs #!import ../../lib/fsharp/Runtime.fs #!import ../../lib/fsharp/FileSystem.fs ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Common = #if !INTERACTIVE open Lib #endif let nl = System.Environment.NewLine let q = @"""" let inline cons head tail = head :: tail /// ## memoize let inline memoize fn = let result = lazy fn () fun () -> result.Value /// ## TraceLevel type TraceLevel = | Verbose | Debug | Info | Warning | Critical let inline _locals () = "" /// ## trace let to_trace_level = function | Verbose -> SpiralTrace.TraceLevel.US0_0 | Debug -> SpiralTrace.TraceLevel.US0_1 | Info -> SpiralTrace.TraceLevel.US0_2 | Warning -> SpiralTrace.TraceLevel.US0_3 | Critical -> SpiralTrace.TraceLevel.US0_4 let trace level fn locals = let level = level |> to_trace_level SpiralTrace.trace level fn locals ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module CommonFSharp = open Common /// ## getUnionCaseName let inline getUnionCaseName<'T> (x: 'T) = match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with | case, _ -> case.Name ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Async = #if !INTERACTIVE open Lib #endif open Common /// ## choice let inline choice asyncs = async { let e = Event<_> () use cts = new System.Threading.CancellationTokenSource () let fn = asyncs |> Seq.map (fun a -> async { let! x = a e.Trigger x }) |> Async.Parallel |> Async.Ignore Async.Start (fn, cts.Token) let! result = Async.AwaitEvent e.Publish cts.Cancel () return result } /// ## map let inline map fn a = async { let! x = a return fn x } /// ## catch let inline catch a = a |> Async.Catch |> map (function | Choice1Of2 result -> Ok result | Choice2Of2 ex -> Error ex ) /// ## runWithTimeoutChoiceAsync let inline runWithTimeoutChoiceAsync (timeout : int) fn = let _locals () = $"timeout: {timeout} / {_locals ()}" let timeoutTask = async { do! Async.Sleep timeout trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals return None } let task = async { try let! result = fn return Some result with | :? System.AggregateException as ex when ex.InnerExceptions |> Seq.exists (function :? Sys... ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module AsyncSeq = #if !INTERACTIVE open Lib #endif open Common /// ## subscribeEvent let inline subscribeEvent (event: IEvent<'H, 'A>) map = let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, 'A>(event.AddHandler, event.RemoveHandler) System.Reactive.Linq.Observable.Select (observable, fun event -> map event.EventArgs) |> FSharp.Control.AsyncSeq.ofObservableBuffered /// ## subscribeToken let subscribeToken (token : System.Threading.CancellationToken) = let tcs = new System.Threading.Tasks.TaskCompletionSource () System.Action tcs.SetResult |> token.Register |> ignore let start = System.DateTime.Now.Ticks FSharp.Control.AsyncSeq.unfoldAsync (fun () -> async { do! tcs.Task |> Async.AwaitTask return Some (System.DateTime.Now.Ticks - start, ()) }) () ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Runtime = #if !INTERACTIVE open Lib #endif open Common /// ## parseArgs let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = let assemblyName = System.Reflection.Assembly.GetEntryAssembly().GetName().Name let errorHandler : Argu.IExiter = if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> List.contains assemblyName then Argu.ExceptionExiter () else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ -> Some System.ConsoleColor.Red) let parser = Argu.ArgumentParser.Create<'T> ( programName = $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", errorHandler = errorHandler ) parser.ParseCommandLine args let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseArgs<'T> |> fun results -> results.GetAllResults () let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseAllArgs<'T> |> List.groupBy CommonFSharp.getUnionCaseName<'T> |> Map.ofList ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module FileSystem = #if !INTERACTIVE open Lib #endif open Common open SpiralFileSystem.Operators /// ## watchDirectory [[<RequireQualifiedAccess>]] type FileSystemChangeType = | Failure | Changed | Created | Deleted | Renamed [[<RequireQualifiedAccess>]] type FileSystemChange = | Failure of exn: exn | Changed of path: string * content: string option | Created of path: string * content: string option | Deleted of path: string | Renamed of oldPath: string * (string * string option) let inline watchDirectoryWithFilter filter shouldReadContent path = let fullPath = path |> System.IO.Path.GetFullPath let _locals () = $"filter: {filter} / {_locals ()}" let watcher = new System.IO.FileSystemWatcher ( Path = fullPath, NotifyFilter = filter, EnableRaisingEvents = true, IncludeSubdirectories = true ) let inline getEventPath (path : string) = path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> SpiralSm.trim_start [[| '/'; '\\' |]] let inline ticks () = System.DateTime.UtcNow.Ticks let changedStream = AsyncSeq.subscribeEvent watcher.Changed (fun event -> ticks (), [[ FileSystemChange... ── fsharp ────────────────────────────────────────────────────────────────────── #if !INTERACTIVE open Lib #endif ── fsharp ────────────────────────────────────────────────────────────────────── open Common open SpiralFileSystem.Operators open Microsoft.AspNetCore.SignalR.Client ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## sendJson │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline sendJson (port : int) (json : string) = async { let host = "127.0.0.1" let! portOpen = SpiralNetworking.test_port_open host port if portOpen then try let connection = HubConnectionBuilder().WithUrl($"http://{host}:{port}").Build() do! connection.StartAsync () |> Async.AwaitTask let! result = connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask do! connection.StopAsync () |> Async.AwaitTask trace Verbose (fun () -> $"Supervisor.sendJson / port: {port} / json: {json |> SpiralSm.ellipsis_end 200} / result: {result |> Option.ofObj |> Option.map (SpiralSm.ellipsis_end 200)}") _locals return Some result with ex -> trace Critical (fun () -> $"Supervisor.sendJson / port: {port} / json: {json |> SpiralSm.ellipsis_end 200} / ex: {ex |> SpiralSm.format_exception}") _locals return None else trace Debug (fun () -> "Supervisor.sendJson / port: {port} / error: port not open") _locals return None } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## sendObj │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline sendObj port obj = obj |> System.Text.Json.JsonSerializer.Serialize |> sendJson port ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## awaitCompiler │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type VSCPos = {| line : int; character : int |} type VSCRange = VSCPos * VSCPos type RString = VSCRange * string type TracedError = {| trace : string list; message : string |} type ClientErrorsRes = | FatalError of string | TracedError of TracedError | PackageErrors of {| uri : string; errors : RString list |} | TokenizerErrors of {| uri : string; errors : RString list |} | ParserErrors of {| uri : string; errors : RString list |} | TypeErrors of {| uri : string; errors : RString list |} ── fsharp ────────────────────────────────────────────────────────────────────── let workspaceRoot = SpiralFileSystem.get_workspace_root () ── fsharp ────────────────────────────────────────────────────────────────────── let inline awaitCompiler port cancellationToken = async { let host = "127.0.0.1" let struct (ct, disposable) = cancellationToken |> SpiralThreading.new_disposable_token let! ct = ct |> SpiralAsync.merge_cancellation_token_with_default_async let compiler = MailboxProcessor.Start (fun inbox -> async { let! availablePort = SpiralNetworking.get_available_port (Some 500) host port if availablePort <> port then inbox.Post (port, false) else let compilerPath = workspaceRoot </> "deps/The-Spiral-Language/The Spiral Language 2/artifacts/bin/The Spiral Language 2/release" |> System.IO.Path.GetFullPath let dllPath = compilerPath </> "Spiral.dll" let! exitCode, result = SpiralRuntime.execution_options (fun x -> { x with l0 = Some ct l1 = $@"dotnet ""{dllPath}"" --port {availablePort} --default-int i32 --default-float f64" l3 = Some (fun struct (_, line, _) -> async { if line |> SpiralSm.contains $"System.IO.IOException: Failed to bind to address http://{host}:{port}: address already in use." then inbox.Post (port, false) if line |> SpiralSm.contains $"Server bound to: http://localhost:{availablePort}" then let rec loop retry = async { do! SpiralNetworking.wait_for_port_access (Some 100) true host availablePort |> Async.runWithTimeoutAsync 2000 |> Async.Ignore let _locals () = $"port: {availablePort} / retry: {retry} / {_locals ()}" try let pingObj = {| Ping = true |} let! pingResult = pingObj |> sendObj availablePort trace Verbose (fun () -> $"awaitCompiler / Ping / result: '{pingResult}'") _locals inbox.Post (availablePort, true) with ex -> trace Verbose (fun () -> $"awaitCompiler / Ping / ex: {ex |> SpiralSm.format_exception}") _locals do! Async.Sleep 10 do! loop (retry + 1) } do! loop 0 }) l6 = Some workspaceRoot } ) |> SpiralRuntime.execute_with_options_async trace Debug (fun () -> $"awaitCompiler / exitCode: {exitCode} / result: {result}") _locals disposable.Dispose () }, ct) let! serverPort, managed = compiler.Receive () let connection = HubConnectionBuilder().WithUrl($"http://{host}:{serverPort}").Build () do! connection.StartAsync () |> Async.AwaitTask let event = Event<_> () let disposable' = connection.On<string> ("ServerToClientMsg", event.Trigger) let stream = FSharp.Control.AsyncSeq.unfoldAsync (fun () -> async { let! msg = event.Publish |> Async.AwaitEvent return Some (msg |> FSharp.Json.Json.deserialize<ClientErrorsRes>, ()) }) () let disposable' = new_disposable (fun () -> async { disposable'.Dispose () do! connection.StopAsync () |> Async.AwaitTask disposable.Dispose () if managed then do! SpiralNetworking.wait_for_port_access (Some 100) false host serverPort |> Async.runWithTimeoutAsync 2000 |> Async.Ignore } |> Async.RunSynchronously ) return serverPort, stream, ct, disposable' } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## getFilePathFromUri │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline getFilePathFromUri uri = match System.Uri.TryCreate (uri, System.UriKind.Absolute) with | true, uri -> uri.AbsolutePath |> System.IO.Path.GetFullPath | _ -> failwith "invalid uri" ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## getCompilerPort │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline getCompilerPort () = 13805 ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## serialize_obj │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let serializeObj obj = obj |> FSharp.Json.Json.serialize |> SpiralSm.replace "\\\\" "\\" |> SpiralSm.replace "\\r\\n" "\n" |> SpiralSm.replace "\\n" "\n" ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## buildFile │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline buildFile timeout port cancellationToken path = async { let fullPath = path |> System.IO.Path.GetFullPath let fileDir = fullPath |> System.IO.Path.GetDirectoryName let fileName = fullPath |> System.IO.Path.GetFileNameWithoutExtension let! code = fullPath |> SpiralFileSystem.read_all_text_async let stream, disposable = fileDir |> FileSystem.watchDirectory (fun _ -> false) use _ = disposable let struct (token, disposable) = SpiralThreading.new_disposable_token cancellationToken use _ = disposable let! serverPort, errors, ct, disposable = awaitCompiler port (Some token) use _ = disposable let fsxContentSeq = stream |> FSharp.Control.AsyncSeq.chooseAsync (function | _, (FileSystem.FileSystemChange.Changed (path, _)) when (path |> System.IO.Path.GetFileName) = $"{fileName}.fsx" -> fileDir </> path |> SpiralFileSystem.read_all_text_retry_async | _ -> None |> Async.init ) |> FSharp.Control.AsyncSeq.map (fun content -> Some (content |> SpiralSm.replace "\r\n" "\n"), None ) let inline printErrorData (data : {| uri : string; errors : RString list |}) = let fileName = data.uri |> System.IO.Path.GetFileName let errors = data.errors |> List.map snd |> SpiralSm.concat "\n" $"{fileName}:\n{errors}" let errorsSeq = errors |> FSharp.Control.AsyncSeq.choose (fun error -> match error with | FatalError message -> Some (message, error) | TracedError data -> Some (data.message, error) | PackageErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | TokenizerErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | ParserErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | TypeErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | _ -> None ) |> FSharp.Control.AsyncSeq.map (fun (message, error) -> None, Some (message, error) ) let timerSeq = 1000 |> FSharp.Control.AsyncSeq.intervalMs |> FSharp.Control.AsyncSeq.map (fun _ -> None, None) let outputSeq = [[ fsxContentSeq; errorsSeq; timerSeq ]] |> FSharp.Control.AsyncSeq.mergeAll let! outputChild = ((None, [[]], 0), outputSeq) ||> FSharp.Control.AsyncSeq.scan ( fun (fsxContentResult, errors, typeErrorCount) (fsxContent, error) -> match fsxContent, error with | Some fsxContent, None -> Some fsxContent, errors, typeErrorCount | None, Some (_, FatalError "File main has a type error somewhere in its path.") -> fsxContentResult, errors, typeErrorCount + 1 | None, Some error -> fsxContentResult, error :: errors, typeErrorCount | None, None when typeErrorCount >= 1 -> fsxContentResult, errors, typeErrorCount + 1 | _ -> fsxContentResult, errors, typeErrorCount ) |> FSharp.Control.AsyncSeq.takeWhileInclusive (fun (fsxContent, errors, typeErrorCount) -> trace Debug (fun () -> $"buildFile / takeWhileInclusive / path: {path} / fsxContent: {fsxContent |> Option.defaultValue System.String.Empty |> SpiralSm.ellipsis_end 400} / errors: {errors |> serializeObj} / typeErrorCount: {typeErrorCount}") _locals #if INTERACTIVE let errorWait = 2 #else let errorWait = 4 #endif match fsxContent, errors with | None, [[]] when typeErrorCount > errorWait -> false | None, [[]] -> true | _ -> false ) |> FSharp.Control.AsyncSeq.tryLast |> Async.withCancellationToken ct |> Async.catch |> Async.runWithTimeoutAsync timeout |> Async.StartChild let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> SpiralFileSystem.new_file_uri let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} |} let! _fileOpenResult = fileOpenObj |> sendObj serverPort // do! Async.Sleep 60 let buildFileObj = {| BuildFile = {| uri = fullPathUri; backend = "Fsharp" |} |} let! _buildFileResult = buildFileObj |> sendObj serverPort let! result = outputChild |> Async.map (function | Some (Ok (Some (fsxCode, errors, _))) -> fsxCode, errors |> List.distinct |> List.rev | Some (Error ex) -> trace Critical (fun () -> $"buildFile / error: {ex |> serializeObj}") _locals None, [[]] | _ -> None, [[]] ) if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> SpiralFileSystem.new_file_uri let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] |} |} let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort () let fsxPath = fileDir </> $"{fileName}.fsx" return fsxPath, result } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## persistCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline persistCode code = async { let targetDir = workspaceRoot </> "target/polyglot/spiral_eval" let packagesDir = targetDir </> "packages" let hashHex = code |> SpiralCrypto.hash_text let codeDir = packagesDir </> hashHex let mainPath = codeDir </> "main.spi" codeDir |> System.IO.Directory.CreateDirectory |> ignore do! code |> SpiralFileSystem.write_all_text_exists mainPath let spiprojPath = codeDir </> "package.spiproj" let spiprojCode = $"""packageDir: {workspaceRoot </> "lib"} packages: |core- spiral- modules: main """ do! spiprojCode |> SpiralFileSystem.write_all_text_exists spiprojPath let fsxPath = codeDir </> "main.fsx" if fsxPath |> System.IO.File.Exists |> not then return mainPath, None else let! oldCode = mainPath |> SpiralFileSystem.read_all_text_async if oldCode <> code then return mainPath, None else let! fsxCode = fsxPath |> SpiralFileSystem.read_all_text_async return mainPath, Some (fsxPath, fsxCode |> SpiralSm.replace "\r\n" "\n") } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## buildCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline buildCode timeout cancellationToken code = async { let! mainPath, fsx = code |> persistCode match fsx with | Some (fsxPath, fsxCode) -> return mainPath, (fsxPath, Some fsxCode), [[]] | None -> let port = getCompilerPort () let! fsxPath, (fsxCode, errors) = mainPath |> buildFile timeout port cancellationToken return mainPath, (fsxPath, fsxCode), errors } ── fsharp ────────────────────────────────────────────────────────────────────── //// test let buildCode timeout cancellationToken code = buildCode timeout cancellationToken code ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl app () = console.write_line "text" 1i32 inl main () = app |> dyn |> ignore """ |> buildCode 15000 None |> Async.runWithTimeout 15000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( Some """let rec closure0 () () : int32 = let v0 : (string -> unit) = System.Console.WriteLine let v1 : string = "text" v0 v1 1 let v0 : (unit -> int32) = closure0() () """, [[]] ) ) ╭─[ 6.57s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:20 debug #1 run_with_timeout_async / timeout: 500 │ │ 00:00:17 debug #1 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:17 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:17 verbose #3 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:17 verbose #4 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:20 debug #2 run_with_timeout_async / timeout: 100 │ │ 00:00:20 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 │ │ / timeout: Some 100 / status: True │ │ 00:00:20 debug #4 run_with_timeout_async / timeout: 100 │ │ 00:00:21 debug #5 run_with_timeout_async / timeout: 100 │ │ 00:00:18 verbose #5 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:21 debug #6 run_with_timeout_async / timeout: 100 │ │ 00:00:15 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:15 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:18 verbose #6 > Server bound to: http://localhost:13805 │ │ 00:00:15 debug #3 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:15 debug #4 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:15 verbose #5 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl app () =\n console.write_line │ │ \u0022text\u0022\n 1i32\n\ninl main │ │ ...ot/spiral_eval/packages/0ad2ee90a0886647a7d9c334e1811a0c3ae5599125952e30e │ │ ba9d5e3b57a56e0/main.spi"}} / result: │ │ 00:00:15 verbose #6 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/0ad2ee90a0886647a7d9c334e1811a0c3ae5599125952e │ │ 30eba9d5e3b57a56e0/main.spi"}} / result: │ │ 00:00:19 verbose #7 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0ad2ee90a0886647a7 │ │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0/main.spi │ │ 00:00:16 debug #7 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:17 debug #8 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:18 debug #9 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:19 debug #10 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\0ad2ee90a0886647a7 │ │ d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0\main.spi / fsxContent: let │ │ rec closure0 () () : int32 = │ │ let v0 : (string -> unit) = System.Console.WriteLine │ │ let v1 : string = "text" │ │ v0 v1 │ │ 1 │ │ let v0 : (unit -> int32) = closure0() │ │ () │ │ / errors: [] / typeErrorCount: 0 │ │ 00:00:19 verbose #11 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0ad2ee90a │ │ 0886647a7d9c334e1811a0c3ae5599125952e30eba9d5e3b57a56e0"]}} / result: │ │ 00:00:25 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 │ │ / timeout: Some 100 / status: False │ │ 00:00:25 debug #8 run_with_timeout_async / timeout: 100 │ │ 00:00:19 debug #12 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some │ │ (Some │ │ "let rec closure0 () () : int32 = │ │ let v0 : (string -> unit) = System.Console.WriteLine │ │ let v1 : string = "text" │ │ v0 v1 │ │ 1 │ │ let v0 : (unit -> int32) = closure0() │ │ () │ │ ", │ │ []) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test "" |> buildCode 10000 None |> Async.runWithTimeout 10000 |> _assertEqual None ╭─[ 10.28s - stdout ]──────────────────────────────────────────────────────────╮ │ 00:00:26 debug #9 run_with_timeout_async / timeout: 500 │ │ 00:00:23 debug #8 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:24 verbose #9 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:24 verbose #10 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:24 verbose #11 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:27 debug #10 run_with_timeout_async / timeout: 100 │ │ 00:00:27 verbose #11 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:27 debug #12 run_with_timeout_async / timeout: 100 │ │ 00:00:27 debug #13 run_with_timeout_async / timeout: 100 │ │ 00:00:27 debug #14 run_with_timeout_async / timeout: 100 │ │ 00:00:27 debug #15 run_with_timeout_async / timeout: 100 │ │ 00:00:25 verbose #12 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:28 debug #16 run_with_timeout_async / timeout: 100 │ │ 00:00:22 verbose #13 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:22 verbose #14 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:25 verbose #13 > Server bound to: http://localhost:13805 │ │ 00:00:22 debug #15 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:22 debug #16 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:22 verbose #17 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"","uri":"file:///c:/home/git/polyglot/target/polyglo │ │ t/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca4959 │ │ 91b7852b855/main.spi"}} / result: │ │ 00:00:22 verbose #18 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b93 │ │ 4ca495991b7852b855/main.spi"}} / result: │ │ 00:00:26 verbose #14 > 00:00:02 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ │ 00:00:23 debug #19 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:24 debug #20 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:25 debug #21 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:26 debug #22 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:29 verbose #15 > Cannot find `main` in file main. │ │ 00:00:29 verbose #16 > 00:00:05 debug #5 │ │ Supervisor.supervisor_server.BuildFile.handle_build_result.BuildSkip / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ │ 00:00:27 debug #23 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:28 debug #24 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:29 debug #25 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:36 verbose #17 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:36 debug #18 run_with_timeout_async / timeout: 100 │ │ 00:00:30 debug #26 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ 00:00:30 debug #27 runWithTimeoutAsync / timeout: 10000 │ │ <null> │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl main () = 1i32 / 0i32 """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( None, [[ "An attempt to divide by zero has been detected at compile time." ]] ) ) ╭─[ 5.61s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:36 debug #19 run_with_timeout_async / timeout: 500 │ │ 00:00:34 debug #17 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:34 verbose #18 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:34 verbose #19 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:34 verbose #20 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:37 debug #20 run_with_timeout_async / timeout: 100 │ │ 00:00:37 verbose #21 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:37 debug #22 run_with_timeout_async / timeout: 100 │ │ 00:00:37 debug #23 run_with_timeout_async / timeout: 100 │ │ 00:00:34 verbose #21 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:37 debug #24 run_with_timeout_async / timeout: 100 │ │ 00:00:31 verbose #28 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:31 verbose #29 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:35 verbose #22 > Server bound to: http://localhost:13805 │ │ 00:00:31 debug #30 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:31 debug #31 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:31 verbose #32 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl main () =\n 1i32 / │ │ 0i32\n","uri":"file:///c:/home/git/polyglot/target...ot/spiral_eval/packages │ │ /232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi"} │ │ } / result: │ │ 00:00:31 verbose #33 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb1 │ │ 7fe93dda9c433ec620/main.spi"}} / result: │ │ 00:00:35 verbose #23 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi │ │ 00:00:32 debug #34 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:33 debug #35 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:34 debug #36 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:35 debug #37 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [ │ │ [ │ │ "An attempt to divide by zero has been detected at compile time.", │ │ { │ │ "TracedError": { │ │ "message": "An attempt to divide by zero has been detected at │ │ compile time.", │ │ "trace": [ │ │ "Error trace on line: 1, column: 10 in module: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ │ inl main () = │ │ ^ │ │ ", │ │ "Error trace on line: 2, column: 5 in module: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ │ 1i32 / 0i32 │ │ ^ │ │ " │ │ ] │ │ } │ │ } │ │ ] │ │ ] / typeErrorCount: 0 │ │ 00:00:35 verbose #38 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d86 │ │ 2bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620"]}} / result: │ │ 00:00:41 verbose #25 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:41 debug #26 run_with_timeout_async / timeout: 100 │ │ 00:00:35 debug #39 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some (None, ["An attempt to divide by zero has been detected at compile │ │ time."]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl main () = 1 + "" """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( None, [[ "main.spi: Constraint satisfaction error. Got: string Fails to satisfy: number" ]] ) ) ── fsharp ────────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ Expecto.AssertException: Testing.__expect.<br/> │ │ <span style="color: green;">expected</span>:<br/> │ │ Some<span style="color: green;"><br/> │ │ (None,<br/> │ │ ["main.spi:<br/> │ │ Constraint satisfaction error.<br/> │ │ Got: string<br/> │ │ Fails to satisfy: number"])</span><br/> │ │ <span style="color: red;"> actual</span>:<br/> │ │ Some<span style="color: red;"> (None, [])</span> <br/> │ │ at Expecto.Expect.equalWithDiffPrinter@401-15.Invoke(String msg) <br/> │ │ at Expecto.Expect.equalWithDiffPrinter$cont@383[a](FSharpFunc`2 │ │ diffPrinter, a actual, a expected, String message, Object e, Object a, Unit │ │ unitVar) in C:\workspaces\dotnet\expecto\Expecto\Expect.fs:line 401 <br/> │ │ at Expecto.Expect.equalWithDiffPrinter[a](FSharpFunc`2 diffPrinter, a │ │ actual, a expected, String message) <br/> │ │ at <StartupCode$FSI_0043>.$FSI_0043.main@() │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 7.31s - stderr ]───────────────────────────────────────────────────────────╮ │ 00:00:42 debug #27 run_with_timeout_async / timeout: 500 │ │ 00:00:39 debug #24 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:40 verbose #25 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:40 verbose #26 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:40 verbose #27 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:43 debug #28 run_with_timeout_async / timeout: 100 │ │ 00:00:43 verbose #29 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:43 debug #30 run_with_timeout_async / timeout: 100 │ │ 00:00:43 debug #31 run_with_timeout_async / timeout: 100 │ │ 00:00:40 verbose #28 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:43 debug #32 run_with_timeout_async / timeout: 100 │ │ 00:00:37 verbose #40 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:37 verbose #41 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:41 verbose #29 > Server bound to: http://localhost:13805 │ │ 00:00:37 debug #42 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:37 debug #43 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:37 verbose #44 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl main () =\n 1 \u002B │ │ \u0022\u0022\n","uri":"file:///c:/home/git/polyg...ot/spiral_eval/packages/2 │ │ 278923ce88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi"}} │ │ / result: │ │ 00:00:37 verbose #45 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/2278923ce88b0e473e77d4d93e25afa6e5e4f5efe80398 │ │ 2e504cc198d4c4d82d/main.spi"}} / result: │ │ 00:00:41 verbose #30 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi │ │ 00:00:38 debug #46 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:39 debug #47 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:40 debug #48 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:41 debug #49 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 1 │ │ 00:00:41 debug #50 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 2 │ │ 00:00:42 debug #51 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 3 │ │ 00:00:42 verbose #52 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce │ │ 88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d"]}} / result: │ │ 00:00:49 verbose #33 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:49 debug #34 run_with_timeout_async / timeout: 100 │ │ 00:00:42 debug #53 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some (None, []) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ Exiting... 00:01:06 debug #5 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/Supervisor.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/Supervisor.dib" --output-path "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Supervisor (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com > mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli > ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ > 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" > #r > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha > rp.Json.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A > spNetCore.Html.Abstractions.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.Formatting.dll" > open System > open System.IO > open System.Text > open Microsoft.DotNet.Interactive.Formatting > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > open type Microsoft.DotNet.Interactive.Kernel > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: > TextWriter)->fprintfn writer "%120A" x) > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Notebooks.dib > #!import ../../lib/fsharp/Testing.dib > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > Formatter.ListExpansionLimit <- 100 > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] > #endif > type Mut<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Co... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] > #endif > type async_std_task_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] > #endif > type std_future_Future<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] > #endif > type rayon_vec_IntoIter<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] > #endif > type rayon_iter_Map<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] > #endif > type futures_lite_stream_StreamExt = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] > #endif > type futures_future_TryJoinAll<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] > #endif > type futures_future_Fuse<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] > #endif > type futures_future_JoinAll<'T> = class end > let rec closure0 () (v0 : System.Threading.CancellationToken) : > Async<System.Threading.CancellationToken> = > let v1 : bool = true > let mutable _v1 : Async<System.Threading.CancellationToken> option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT > let v2 : Async<System.Threading.CancellationToken> = null |> > unbox<Async<System... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] > #endif > type std_thread_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] > #endif > type std_sync_Arc<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] > #endif > type std_sync_Mutex<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] > #endif > type std_sync_MutexGuard<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] > #endif > type std_sync_PoisonError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] > #endif > type std_sync_mpsc_Receiver<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] > #endif > type std_sync_mpsc_SendError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] > #endif > type std_sync_mpsc_Sender<'T> = class end > type Disposable (f : unit -> unit) = interface System.IDisposable with member > _.Dispose () = f () > type [[<Struct>]] US0 = > | US0_0 of f0_0 : System.Threading.CancellationToken > | US0_1 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = > let v1 : bool = true > let mutable _v1 : unit option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] > #endif > type reqwest_Error = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] > #endif > type reqwest_RequestBuilder = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] > #endif > type reqwest_Response = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] > #endif > type clap_Arg = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] > #endif > type clap_ArgAction = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] > #endif > type clap_Command = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] > #endif > type clap_ArgMatches = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] > #endif > type clap_builder_ValueRange = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] > #endif > type clap_builder_ValueParser = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] > #endif > type clap_builder_PossibleValue = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] > #endif > type std_process_Child = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] > #endif > type std_process_ChildStderr = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] > #endif > type std_process_ChildStdout = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] > #endif > type std_process_ChildStdin = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] > #endif > type std_process_Command = class ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] > #endif > type std_fs_File = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] > #endif > type std_fs_FileType = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] > #endif > type std_path_Display = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] > #endif > type std_path_Path = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] > #endif > type std_path_PathBuf = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] > #endif > type async_walkdir_DirEntry = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] > #endif > type async_walkdir_Filtering = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] > #endif > type async_walkdir_WalkDir = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = clas... > > ── fsharp - import ───────────────────────────────────────────────────────────── > module SpiralTrace = > let trace x = > #if !INTERACTIVE > Trace.trace x > #else > trace x > #endif > > type TraceLevel = > #if !INTERACTIVE > Trace.US0 > #else > US0 > #endif > > module SpiralCrypto = > let hash_text x = > #if !INTERACTIVE > Crypto.hash_text x > #else > hash_text x > #endif > > #if !FABLE_COMPILER && !WASM && !CONTRACT > > module SpiralAsync = > let merge_cancellation_token_with_default_async x = > #if !INTERACTIVE > Async_.merge_cancellation_token_with_default_async x > #else > merge_cancellation_token_with_default_async x > #endif > > module SpiralThreading = > let new_disposable_token x = > #if !INTERACTIVE > Threading.new_disposable_token x > #else > new_disposable_token x > #endif > > module SpiralNetworking = > let test_port_open x = > #if !INTERACTIVE > Networking.test_port_open x > #else > test_port_open x > #endif > > let test_port_open_timeout x = > #if !INTERACTIVE > Networking.test_port_open_timeout x > #else > test_port_open_timeout x > #endif > > let wait_for_port_access x = > #if !INTERACTIVE > Networking.wait_for_port_access x > #else > wait_for_port_access x > #endif > > let get_available_port x = > #if !INTERACTIVE > Networking.get_available_port x > #else > get_available_port x > #endif > > module SpiralRuntime = > let get_executable_suffix () = > #if !INTERACTIVE > Runtime.get_executable_suffix () > #else > get_executable_suffix () > #endif > > let is_windows () = > #if !INTERACTIVE > ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > type AssertExceptionFormatter (ex) = > member _.Text = > ex.ToString() > .Replace("32m", "<span style=\"color: green;\">") > .Replace("36m", "</span>") > .Replace("31m", "<span style=\"color: red;\">") > .Replace("\n", "<br/>\n") > > > Formatter.Register<AssertExceptionFormatter> ((fun (x : > AssertExceptionFormatter) -> x.Text), "text/html") > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __expect fn log expected actual = > if log then printfn $"{actual.ToDisplayString ()}" > try > "Testing.__expect" |> fn actual expected > with :? Expecto.AssertException as ex -> > AssertExceptionFormatter(ex).Display () |> ignore > failwith (ex.GetType().FullName) > > let inline __contains log expected actual = __expect Expecto.Expect.contains log > expected actual > let inline _contains expected actual = __contains true expected actual > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log > expected actual > let inline _assertEqual expected actual = __assertEqual true expected actual > > let inline __isGreaterThan log expected actual = __expect > Expecto.Expect.isGreaterThan log expected actual > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual > > let inline __isGreaterThanOrEqual log expected actual = __expect > Expecto.Expect.isGreaterThanOrEqual log expected actual > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true > expected actual > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan > log expected actual > let inline _isLessThan expected actual = __isLessThan true expected actual > > let inline __isLessThanOrEqual log expected actual = __expect > Expecto.Expect.isLessThanOrEqual log expected actual > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true > expected actual > > let inline __sequenceEqual log expected actual = __expe... > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __isBetween log a b actual = > let inline isBetween actual (a, b) _ = > __isGreaterThanOrEqual log a actual > __isLessThanOrEqual log b actual > __expect isBetween log (a, b) actual > let inline _isBetween a b actual = __isBetween true a b actual > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Common.fs > #!import ../../lib/fsharp/CommonFSharp.fs > #!import ../../lib/fsharp/Async.fs > #!import ../../lib/fsharp/AsyncSeq.fs > #!import ../../lib/fsharp/Runtime.fs > #!import ../../lib/fsharp/FileSystem.fs > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Common = > > #if !INTERACTIVE > open Lib > #endif > > let nl = System.Environment.NewLine > let q = @"""" > > let inline cons head tail = head :: tail > > /// ## memoize > let inline memoize fn = > let result = lazy fn () > fun () -> result.Value > > /// ## TraceLevel > type TraceLevel = > | Verbose > | Debug > | Info > | Warning > | Critical > > let inline _locals () = "" > > /// ## trace > let to_trace_level = function > | Verbose -> SpiralTrace.TraceLevel.US0_0 > | Debug -> SpiralTrace.TraceLevel.US0_1 > | Info -> SpiralTrace.TraceLevel.US0_2 > | Warning -> SpiralTrace.TraceLevel.US0_3 > | Critical -> SpiralTrace.TraceLevel.US0_4 > > let trace level fn locals = > let level = level |> to_trace_level > SpiralTrace.trace level fn locals > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module CommonFSharp = > > open Common > > /// ## getUnionCaseName > let inline getUnionCaseName<'T> (x: 'T) = > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with > | case, _ -> case.Name > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Async = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## choice > let inline choice asyncs = async { > let e = Event<_> () > use cts = new System.Threading.CancellationTokenSource () > let fn = > asyncs > |> Seq.map (fun a -> async { > let! x = a > e.Trigger x > }) > |> Async.Parallel > |> Async.Ignore > Async.Start (fn, cts.Token) > let! result = Async.AwaitEvent e.Publish > cts.Cancel () > return result > } > > /// ## map > let inline map fn a = async { > let! x = a > return fn x > } > > /// ## catch > let inline catch a = > a > |> Async.Catch > |> map (function > | Choice1Of2 result -> Ok result > | Choice2Of2 ex -> Error ex > ) > > /// ## runWithTimeoutChoiceAsync > let inline runWithTimeoutChoiceAsync (timeout : int) fn = > let _locals () = $"timeout: {timeout} / {_locals ()}" > > let timeoutTask = async { > do! Async.Sleep timeout > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals > return None > } > > let task = async { > try > let! result = fn > return Some result > with > | :? System.AggregateException as ex when > ex.InnerExceptions > |> Seq.exists (function :? Sys... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module AsyncSeq = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## subscribeEvent > let inline subscribeEvent (event: IEvent<'H, 'A>) map = > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, > 'A>(event.AddHandler, event.RemoveHandler) > System.Reactive.Linq.Observable.Select (observable, fun event -> map > event.EventArgs) > |> FSharp.Control.AsyncSeq.ofObservableBuffered > > /// ## subscribeToken > let subscribeToken (token : System.Threading.CancellationToken) = > let tcs = new System.Threading.Tasks.TaskCompletionSource () > System.Action tcs.SetResult |> token.Register |> ignore > let start = System.DateTime.Now.Ticks > FSharp.Control.AsyncSeq.unfoldAsync > (fun () -> async { > do! tcs.Task |> Async.AwaitTask > return Some (System.DateTime.Now.Ticks - start, ()) > }) > () > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Runtime = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## parseArgs > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = > let assemblyName = > System.Reflection.Assembly.GetEntryAssembly().GetName().Name > let errorHandler : Argu.IExiter = > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> > List.contains assemblyName > then Argu.ExceptionExiter () > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | > _ -> Some System.ConsoleColor.Red) > > let parser = > Argu.ArgumentParser.Create<'T> ( > programName = > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", > errorHandler = errorHandler > ) > > parser.ParseCommandLine args > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseArgs<'T> > |> fun results -> results.GetAllResults () > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseAllArgs<'T> > |> List.groupBy CommonFSharp.getUnionCaseName<'T> > |> Map.ofList > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module FileSystem = > > #if !INTERACTIVE > open Lib > #endif > > open Common > open SpiralFileSystem.Operators > > /// ## watchDirectory > [[<RequireQualifiedAccess>]] > type FileSystemChangeType = > | Failure > | Changed > | Created > | Deleted > | Renamed > > [[<RequireQualifiedAccess>]] > type FileSystemChange = > | Failure of exn: exn > | Changed of path: string * content: string option > | Created of path: string * content: string option > | Deleted of path: string > | Renamed of oldPath: string * (string * string option) > > > let inline watchDirectoryWithFilter filter shouldReadContent path = > let fullPath = path |> System.IO.Path.GetFullPath > let _locals () = $"filter: {filter} / {_locals ()}" > > let watcher = > new System.IO.FileSystemWatcher ( > Path = fullPath, > NotifyFilter = filter, > EnableRaisingEvents = true, > IncludeSubdirectories = true > ) > > let inline getEventPath (path : string) = > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> > SpiralSm.trim_start [[| '/'; '\\' |]] > > let inline ticks () = > System.DateTime.UtcNow.Ticks > > let changedStream = > AsyncSeq.subscribeEvent > watcher.Changed > (fun event -> > ticks (), > [[ FileSystemChange... > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open SpiralFileSystem.Operators > open Microsoft.AspNetCore.SignalR.Client > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## sendJson │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sendJson (port : int) (json : string) = async { > let host = "127.0.0.1" > let! portOpen = SpiralNetworking.test_port_open host port > if portOpen then > try > let connection = > HubConnectionBuilder().WithUrl($"http://{host}:{port}").Build() > do! connection.StartAsync () |> Async.AwaitTask > let! result = connection.InvokeAsync<string>("ClientToServerMsg", > json) |> Async.AwaitTask > do! connection.StopAsync () |> Async.AwaitTask > trace Verbose (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / result: {result |> Option.ofObj |> > Option.map (SpiralSm.ellipsis_end 200)}") _locals > return Some result > with ex -> > trace Critical (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / ex: {ex |> > SpiralSm.format_exception}") _locals > return None > else > trace Debug (fun () -> "Supervisor.sendJson / port: {port} / error: port > not open") _locals > return None > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## sendObj │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sendObj port obj = > obj > |> System.Text.Json.JsonSerializer.Serialize > |> sendJson port > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## awaitCompiler │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type VSCPos = {| line : int; character : int |} > type VSCRange = VSCPos * VSCPos > type RString = VSCRange * string > type TracedError = {| trace : string list; message : string |} > type ClientErrorsRes = > | FatalError of string > | TracedError of TracedError > | PackageErrors of {| uri : string; errors : RString list |} > | TokenizerErrors of {| uri : string; errors : RString list |} > | ParserErrors of {| uri : string; errors : RString list |} > | TypeErrors of {| uri : string; errors : RString list |} > > ── fsharp ────────────────────────────────────────────────────────────────────── > let workspaceRoot = SpiralFileSystem.get_workspace_root () > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline awaitCompiler port cancellationToken = async { > let host = "127.0.0.1" > let struct (ct, disposable) = cancellationToken |> > SpiralThreading.new_disposable_token > let! ct = ct |> SpiralAsync.merge_cancellation_token_with_default_async > > let compiler = MailboxProcessor.Start (fun inbox -> async { > let! availablePort = SpiralNetworking.get_available_port (Some 500) host > port > if availablePort <> port then > inbox.Post (port, false) > else > let compilerPath = > workspaceRoot </> "deps/The-Spiral-Language/The Spiral Language > 2/artifacts/bin/The Spiral Language 2/release" > |> System.IO.Path.GetFullPath > > let dllPath = compilerPath </> "Spiral.dll" > > let! exitCode, result = > SpiralRuntime.execution_options (fun x -> > { x with > l0 = Some ct > l1 = $@"dotnet ""{dllPath}"" --port {availablePort} > --default-int i32 --default-float f64" > l3 = Some (fun struct (_, line, _) -> async { > if line |> SpiralSm.contains > $"System.IO.IOException: Failed to bind to address http://{host}:{port}: address > already in use." then > inbox.Post (port, false) > > if line |> SpiralSm.contains $"Server bound to: > http://localhost:{availablePort}" then > let rec loop retry = async { > do! > SpiralNetworking.wait_for_port_access > (Some 100) true host availablePort > |> Async.runWithTimeoutAsync 2000 > |> Async.Ignore > > let _locals () = $"port: {availablePort} / > retry: {retry} / {_locals ()}" > try > let pingObj = {| Ping = true |} > let! pingResult = pingObj |> sendObj > availablePort > trace Verbose (fun () -> $"awaitCompiler > / Ping / result: '{pingResult}'") _locals > > inbox.Post (availablePort, true) > with ex -> > trace Verbose (fun () -> $"awaitCompiler > / Ping / ex: {ex |> SpiralSm.format_exception}") _locals > do! Async.Sleep 10 > do! loop (retry + 1) > } > do! loop 0 > }) > l6 = Some workspaceRoot > } > ) > |> SpiralRuntime.execute_with_options_async > > trace Debug (fun () -> $"awaitCompiler / exitCode: {exitCode} / > result: {result}") _locals > disposable.Dispose () > }, ct) > > let! serverPort, managed = compiler.Receive () > > let connection = > HubConnectionBuilder().WithUrl($"http://{host}:{serverPort}").Build () > do! connection.StartAsync () |> Async.AwaitTask > > let event = Event<_> () > let disposable' = connection.On<string> ("ServerToClientMsg", event.Trigger) > let stream = > FSharp.Control.AsyncSeq.unfoldAsync > (fun () -> async { > let! msg = event.Publish |> Async.AwaitEvent > return Some (msg |> > FSharp.Json.Json.deserialize<ClientErrorsRes>, ()) > }) > () > > let disposable' = > new_disposable (fun () -> > async { > disposable'.Dispose () > do! connection.StopAsync () |> Async.AwaitTask > disposable.Dispose () > if managed > then do! > SpiralNetworking.wait_for_port_access (Some 100) false host > serverPort > |> Async.runWithTimeoutAsync 2000 > |> Async.Ignore > } > |> Async.RunSynchronously > ) > > return > serverPort, > stream, > ct, > disposable' > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getFilePathFromUri │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getFilePathFromUri uri = > match System.Uri.TryCreate (uri, System.UriKind.Absolute) with > | true, uri -> uri.AbsolutePath |> System.IO.Path.GetFullPath > | _ -> failwith "invalid uri" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getCompilerPort │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getCompilerPort () = > 13805 > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## serialize_obj │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let serializeObj obj = > obj > |> FSharp.Json.Json.serialize > |> SpiralSm.replace "\\\\" "\\" > |> SpiralSm.replace "\\r\\n" "\n" > |> SpiralSm.replace "\\n" "\n" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## buildFile │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildFile timeout port cancellationToken path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let fileDir = fullPath |> System.IO.Path.GetDirectoryName > let fileName = fullPath |> System.IO.Path.GetFileNameWithoutExtension > let! code = fullPath |> SpiralFileSystem.read_all_text_async > > let stream, disposable = fileDir |> FileSystem.watchDirectory (fun _ -> > false) > use _ = disposable > > let struct (token, disposable) = SpiralThreading.new_disposable_token > cancellationToken > use _ = disposable > > let! serverPort, errors, ct, disposable = awaitCompiler port (Some token) > use _ = disposable > > let fsxContentSeq = > stream > |> FSharp.Control.AsyncSeq.chooseAsync (function > | _, (FileSystem.FileSystemChange.Changed (path, _)) > when (path |> System.IO.Path.GetFileName) = $"{fileName}.fsx" > -> > fileDir </> path |> > SpiralFileSystem.read_all_text_retry_async > | _ -> None |> Async.init > ) > |> FSharp.Control.AsyncSeq.map (fun content -> > Some (content |> SpiralSm.replace "\r\n" "\n"), None > ) > > let inline printErrorData (data : {| uri : string; errors : RString list |}) > = > let fileName = data.uri |> System.IO.Path.GetFileName > let errors = > data.errors > |> List.map snd > |> SpiralSm.concat "\n" > $"{fileName}:\n{errors}" > > let errorsSeq = > errors > |> FSharp.Control.AsyncSeq.choose (fun error -> > match error with > | FatalError message -> > Some (message, error) > | TracedError data -> > Some (data.message, error) > | PackageErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | TokenizerErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | ParserErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | TypeErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | _ -> None > ) > |> FSharp.Control.AsyncSeq.map (fun (message, error) -> > None, Some (message, error) > ) > > let timerSeq = > 1000 > |> FSharp.Control.AsyncSeq.intervalMs > |> FSharp.Control.AsyncSeq.map (fun _ -> None, None) > > let outputSeq = > [[ fsxContentSeq; errorsSeq; timerSeq ]] > |> FSharp.Control.AsyncSeq.mergeAll > > let! outputChild = > ((None, [[]], 0), outputSeq) > ||> FSharp.Control.AsyncSeq.scan ( > fun (fsxContentResult, errors, typeErrorCount) (fsxContent, error) > -> > match fsxContent, error with > | Some fsxContent, None -> Some fsxContent, errors, > typeErrorCount > | None, Some (_, FatalError "File main has a type error > somewhere in its path.") -> > fsxContentResult, errors, typeErrorCount + 1 > | None, Some error -> fsxContentResult, error :: errors, > typeErrorCount > | None, None when typeErrorCount >= 1 -> > fsxContentResult, errors, typeErrorCount + 1 > | _ -> fsxContentResult, errors, typeErrorCount > ) > |> FSharp.Control.AsyncSeq.takeWhileInclusive (fun (fsxContent, errors, > typeErrorCount) -> > trace Debug (fun () -> $"buildFile / takeWhileInclusive / path: > {path} / fsxContent: {fsxContent |> Option.defaultValue System.String.Empty |> > SpiralSm.ellipsis_end 400} / errors: {errors |> serializeObj} / typeErrorCount: > {typeErrorCount}") _locals > #if INTERACTIVE > let errorWait = 2 > #else > let errorWait = 4 > #endif > match fsxContent, errors with > | None, [[]] when typeErrorCount > errorWait -> false > | None, [[]] -> true > | _ -> false > ) > |> FSharp.Control.AsyncSeq.tryLast > |> Async.withCancellationToken ct > |> Async.catch > |> Async.runWithTimeoutAsync timeout > |> Async.StartChild > > let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > > let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} |} > let! _fileOpenResult = fileOpenObj |> sendObj serverPort > > // do! Async.Sleep 60 > > let buildFileObj = {| BuildFile = {| uri = fullPathUri; backend = "Fsharp" > |} |} > let! _buildFileResult = buildFileObj |> sendObj serverPort > > let! result = > outputChild > |> Async.map (function > | Some (Ok (Some (fsxCode, errors, _))) -> > fsxCode, errors |> List.distinct |> List.rev > | Some (Error ex) -> > trace Critical (fun () -> $"buildFile / error: {ex |> > serializeObj}") _locals > None, [[]] > | _ -> None, [[]] > ) > > if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then > let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] |} |} > let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort > () > > let fsxPath = fileDir </> $"{fileName}.fsx" > return fsxPath, result > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## persistCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline persistCode code = async { > let targetDir = workspaceRoot </> "target/polyglot/spiral_eval" > > let packagesDir = targetDir </> "packages" > > let hashHex = code |> SpiralCrypto.hash_text > > let codeDir = packagesDir </> hashHex > > let mainPath = codeDir </> "main.spi" > > codeDir |> System.IO.Directory.CreateDirectory |> ignore > > do! code |> SpiralFileSystem.write_all_text_exists mainPath > > let spiprojPath = codeDir </> "package.spiproj" > let spiprojCode = > $"""packageDir: {workspaceRoot </> "lib"} > packages: > |core- > spiral- > modules: > main > """ > do! spiprojCode |> SpiralFileSystem.write_all_text_exists spiprojPath > > let fsxPath = codeDir </> "main.fsx" > > if fsxPath |> System.IO.File.Exists |> not > then return mainPath, None > else > let! oldCode = mainPath |> SpiralFileSystem.read_all_text_async > if oldCode <> code > then return mainPath, None > else > let! fsxCode = fsxPath |> SpiralFileSystem.read_all_text_async > return mainPath, Some (fsxPath, fsxCode |> SpiralSm.replace "\r\n" > "\n") > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## buildCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildCode timeout cancellationToken code = async { > let! mainPath, fsx = code |> persistCode > match fsx with > | Some (fsxPath, fsxCode) -> return mainPath, (fsxPath, Some fsxCode), [[]] > | None -> > let port = getCompilerPort () > let! fsxPath, (fsxCode, errors) = mainPath |> buildFile timeout port > cancellationToken > return mainPath, (fsxPath, fsxCode), errors > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let buildCode timeout cancellationToken code = buildCode timeout > cancellationToken code > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl app () = > console.write_line "text" > 1i32 > > inl main () = > app > |> dyn > |> ignore > """ > |> buildCode 15000 None > |> Async.runWithTimeout 15000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some """let rec closure0 () () : int32 = > let v0 : (string -> unit) = System.Console.WriteLine > let v1 : string = "text" > v0 v1 > 1 > let v0 : (unit -> int32) = closure0() > () > """, > [[]] > ) > ) > > ╭─[ 313.91ms - stdout ]────────────────────────────────────────────────────────╮ > │ Some │ > │ (Some │ > │ "let rec closure0 () () : int32 = │ > │ let v0 : (string -> unit) = System.Console.WriteLine │ > │ let v1 : string = "text" │ > │ v0 v1 │ > │ 1 │ > │ let v0 : (unit -> int32) = closure0() │ > │ () │ > │ ", │ > │ []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "" > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> _assertEqual None > > ╭─[ 10.33s - stdout ]──────────────────────────────────────────────────────────╮ > │ 00:00:21 debug #1 run_with_timeout_async / timeout: 500 │ > │ 00:00:17 debug #1 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:18 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:18 verbose #3 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:18 verbose #4 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:21 debug #2 run_with_timeout_async / timeout: 100 │ > │ 00:00:21 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 │ > │ / timeout: Some 100 / status: True │ > │ 00:00:21 debug #4 run_with_timeout_async / timeout: 100 │ > │ 00:00:22 debug #5 run_with_timeout_async / timeout: 100 │ > │ 00:00:18 verbose #5 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:22 debug #6 run_with_timeout_async / timeout: 100 │ > │ 00:00:15 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:15 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:19 verbose #6 > Server bound to: http://localhost:13805 │ > │ 00:00:15 debug #3 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:15 debug #4 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:15 verbose #5 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"","uri":"file:///c:/home/git/polyglot/target/polyglo │ > │ t/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca4959 │ > │ 91b7852b855/main.spi"}} / result: │ > │ 00:00:15 verbose #6 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b93 │ > │ 4ca495991b7852b855/main.spi"}} / result: │ > │ 00:00:19 verbose #7 > 00:00:02 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ > │ 00:00:16 debug #7 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:17 debug #8 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:18 debug #9 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:23 verbose #8 > Cannot find `main` in file main. │ > │ 00:00:23 verbose #9 > 00:00:05 debug #5 │ > │ Supervisor.supervisor_server.BuildFile.handle_build_result.BuildSkip / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ > │ 00:00:19 debug #10 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:20 debug #11 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:21 debug #12 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:22 debug #13 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ > │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:30 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 │ > │ / timeout: Some 100 / status: False │ > │ 00:00:30 debug #8 run_with_timeout_async / timeout: 100 │ > │ 00:00:23 debug #14 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ 00:00:23 debug #15 runWithTimeoutAsync / timeout: 10000 │ > │ <null> │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > 1i32 / 0i32 > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "An attempt to divide by zero has been detected at compile time." ]] > ) > ) > > ╭─[ 6.11s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:31 debug #9 run_with_timeout_async / timeout: 500 │ > │ 00:00:27 debug #10 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:28 verbose #11 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:28 verbose #12 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:28 verbose #13 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:31 debug #10 run_with_timeout_async / timeout: 100 │ > │ 00:00:31 verbose #11 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:32 debug #12 run_with_timeout_async / timeout: 100 │ > │ 00:00:32 debug #13 run_with_timeout_async / timeout: 100 │ > │ 00:00:32 debug #14 run_with_timeout_async / timeout: 100 │ > │ 00:00:28 verbose #14 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:32 debug #15 run_with_timeout_async / timeout: 100 │ > │ 00:00:25 verbose #16 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:25 verbose #17 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:29 verbose #15 > Server bound to: http://localhost:13805 │ > │ 00:00:25 debug #18 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:25 debug #19 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:25 verbose #20 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n 1i32 / │ > │ 0i32\n","uri":"file:///c:/home/git/polyglot/target...ot/spiral_eval/packages │ > │ /232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi"} │ > │ } / result: │ > │ 00:00:25 verbose #21 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb1 │ > │ 7fe93dda9c433ec620/main.spi"}} / result: │ > │ 00:00:29 verbose #16 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi │ > │ 00:00:26 debug #22 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:27 debug #23 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:28 debug #24 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:28 debug #25 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ > │ errors: [ │ > │ [ │ > │ "An attempt to divide by zero has been detected at compile time.", │ > │ { │ > │ "TracedError": { │ > │ "message": "An attempt to divide by zero has been detected at │ > │ compile time.", │ > │ "trace": [ │ > │ "Error trace on line: 1, column: 10 in module: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ > │ inl main () = │ > │ ^ │ > │ ", │ > │ "Error trace on line: 2, column: 5 in module: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ > │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ > │ 1i32 / 0i32 │ > │ ^ │ > │ " │ > │ ] │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 │ > │ 00:00:29 verbose #26 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d86 │ > │ 2bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620"]}} / result: │ > │ 00:00:36 verbose #16 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:36 debug #17 run_with_timeout_async / timeout: 100 │ > │ 00:00:29 debug #27 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (None, ["An attempt to divide by zero has been detected at compile │ > │ time."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > 1 + "" > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ > "main.spi: > Constraint satisfaction error. > Got: string > Fails to satisfy: number" > ]] > ) > ) > > ╭─[ 5.33s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:37 debug #18 run_with_timeout_async / timeout: 500 │ > │ 00:00:33 debug #17 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:34 verbose #18 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:34 verbose #19 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:34 verbose #20 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:38 debug #19 run_with_timeout_async / timeout: 100 │ > │ 00:00:38 verbose #20 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:38 debug #21 run_with_timeout_async / timeout: 100 │ > │ 00:00:38 debug #22 run_with_timeout_async / timeout: 100 │ > │ 00:00:34 verbose #21 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:38 debug #23 run_with_timeout_async / timeout: 100 │ > │ 00:00:31 verbose #28 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:31 verbose #29 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:35 verbose #22 > Server bound to: http://localhost:13805 │ > │ 00:00:31 debug #30 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:31 debug #31 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:31 verbose #32 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n 1 \u002B │ > │ \u0022\u0022\n","uri":"file:///c:/home/git/polyg...ot/spiral_eval/packages/2 │ > │ 278923ce88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi"}} │ > │ / result: │ > │ 00:00:31 verbose #33 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/2278923ce88b0e473e77d4d93e25afa6e5e4f5efe80398 │ > │ 2e504cc198d4c4d82d/main.spi"}} / result: │ > │ 00:00:35 verbose #23 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi │ > │ 00:00:32 debug #34 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:33 debug #35 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:34 debug #36 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:34 debug #37 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 1 │ > │ 00:00:34 debug #38 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ > │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ > │ errors: [ │ > │ [ │ > │ "main.spi: │ > │ Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number", │ > │ { │ > │ "TypeErrors": { │ > │ "errors": [ │ > │ [ │ > │ [ │ > │ { │ > │ "character": 8, │ > │ "line": 1 │ > │ }, │ > │ { │ > │ "character": 10, │ > │ "line": 1 │ > │ } │ > │ ], │ > │ "Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number" │ > │ ] │ > │ ], │ > │ "uri": │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce │ > │ 88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi" │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 1 │ > │ 00:00:34 verbose #39 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce │ > │ 88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d"]}} / result: │ > │ 00:00:41 verbose #24 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:41 debug #25 run_with_timeout_async / timeout: 100 │ > │ 00:00:34 debug #40 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (None, ["main.spi: │ > │ Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number"]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > x + y > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ > "main.spi: > Unbound variable: x. > Unbound variable: y." > ]] > ) > ) > > ╭─[ 5.91s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:42 debug #26 run_with_timeout_async / timeout: 500 │ > │ 00:00:39 debug #24 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:40 verbose #25 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:40 verbose #26 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:40 verbose #27 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:43 debug #27 run_with_timeout_async / timeout: 100 │ > │ 00:00:43 verbose #28 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:43 debug #29 run_with_timeout_async / timeout: 100 │ > │ 00:00:43 debug #30 run_with_timeout_async / timeout: 100 │ > │ 00:00:44 debug #31 run_with_timeout_async / timeout: 100 │ > │ 00:00:40 verbose #28 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:44 debug #32 run_with_timeout_async / timeout: 100 │ > │ 00:00:37 verbose #41 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:37 verbose #42 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:40 verbose #29 > Server bound to: http://localhost:13805 │ > │ 00:00:37 debug #43 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ > │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:37 debug #44 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ > │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:37 verbose #45 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n x \u002B │ > │ y\n","uri":"file:///c:/home/git/polyglot/target/...ot/spiral_eval/packages/5 │ > │ d8d0e66f59ab13f3bfd8d88f05ce13771ab005b08581d99225216170ba6489b/main.spi"}} │ > │ / result: │ > │ 00:00:37 verbose #46 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/5d8d0e66f59ab13f3bfd8d88f05ce13771ab005b08581d │ > │ 99225216170ba6489b/main.spi"}} / result: │ > │ 00:00:41 verbose #30 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d8d0e66f59ab13f3b │ > │ fd8d88f05ce13771ab005b08581d99225216170ba6489b/main.spi │ > │ 00:00:38 debug #47 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ > │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:39 debug #48 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ > │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:40 debug #49 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ > │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:40 debug #50 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ > │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ > │ errors: [ │ > │ [ │ > │ "main.spi: │ > │ Unbound variable: x. │ > │ Unbound variable: y.", │ > │ { │ > │ "TypeErrors": { │ > │ "errors": [ │ > │ [ │ > │ [ │ > │ { │ > │ "character": 4, │ > │ "line": 1 │ > │ }, │ > │ { │ > │ "character": 5, │ > │ "line": 1 │ > │ } │ > │ ], │ > │ "Unbound variable: x." │ > │ ], │ > │ [ │ > │ [ │ > │ { │ > │ "character": 8, │ > │ "line": 1 │ > │ }, │ > │ { │ > │ "character": 9, │ > │ "line": 1 │ > │ } │ > │ ], │ > │ "Unbound variable: y." │ > │ ] │ > │ ], │ > │ "uri": │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d8d0e66f │ > │ 59ab13f3bfd8d88f05ce13771ab005b08581d99225216170ba6489b/main.spi" │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 │ > │ 00:00:40 verbose #51 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d8d0e66f │ > │ 59ab13f3bfd8d88f05ce13771ab005b08581d99225216170ba6489b"]}} / result: │ > │ 00:00:47 verbose #33 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:47 debug #34 run_with_timeout_async / timeout: 100 │ > │ 00:00:40 debug #52 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (None, ["main.spi: │ > │ Unbound variable: x. │ > │ Unbound variable: y."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl main () = > real > inl real_unbox forall a. (obj : a) : a = > typecase obj with > | _ => obj > real_unbox () > () > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "Cannot apply a forall with a term." ]] > ) > ) > > ╭─[ 5.46s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:48 debug #35 run_with_timeout_async / timeout: 500 │ > │ 00:00:45 debug #31 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:45 verbose #32 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:45 verbose #33 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:45 verbose #34 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:49 debug #36 run_with_timeout_async / timeout: 100 │ > │ 00:00:49 verbose #37 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:49 debug #38 run_with_timeout_async / timeout: 100 │ > │ 00:00:49 debug #39 run_with_timeout_async / timeout: 100 │ > │ 00:00:45 verbose #35 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:49 debug #40 run_with_timeout_async / timeout: 100 │ > │ 00:00:42 verbose #53 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:42 verbose #54 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:46 verbose #36 > Server bound to: http://localhost:13805 │ > │ 00:00:42 debug #55 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:42 debug #56 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:42 verbose #57 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl real_unbox │ > │ forall a. (obj : a) : a │ > │ =\...ot/spiral_eval/packages/a2aa158e3d25dde470018a814a2045bf437bae1760d98ab │ > │ 33335c72b076d4d50/main.spi"}} / result: │ > │ 00:00:42 verbose #58 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/a2aa158e3d25dde470018a814a2045bf437bae1760d98a │ > │ b33335c72b076d4d50/main.spi"}} / result: │ > │ 00:00:46 verbose #37 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi │ > │ 00:00:43 debug #59 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:44 debug #60 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:45 debug #61 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:45 debug #62 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ > │ errors: [ │ > │ [ │ > │ "Cannot apply a forall with a term.", │ > │ { │ > │ "TracedError": { │ > │ "message": "Cannot apply a forall with a term.", │ > │ "trace": [ │ > │ "Error trace on line: 2, column: 10 in module: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi. │ > │ inl main () = │ > │ ^ │ > │ ", │ > │ "Error trace on line: 4, column: 9 in module: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi. │ > │ inl real_unbox forall a. (obj : a) : a = │ > │ ^ │ > │ ", │ > │ "Error trace on line: 7, column: 9 in module: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ > │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi. │ > │ real_unbox () │ > │ ^ │ > │ " │ > │ ] │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 │ > │ 00:00:45 verbose #63 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3 │ > │ d25dde470018a814a2045bf437bae1760d98ab33335c72b076d4d50"]}} / result: │ > │ 00:00:53 verbose #41 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:53 debug #42 run_with_timeout_async / timeout: 100 │ > │ 00:00:45 debug #64 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (None, ["Cannot apply a forall with a term."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl main () = > real > inl real_unbox forall a. (obj : a) : a = > typecase obj with > | _ => obj > real_unbox `i32 1 > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "The main function should not have a forall." ]] > ) > ) > > ╭─[ 5.95s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:54 debug #43 run_with_timeout_async / timeout: 500 │ > │ 00:00:50 debug #38 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:51 verbose #39 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:51 verbose #40 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:51 verbose #41 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:00:54 debug #44 run_with_timeout_async / timeout: 100 │ > │ 00:00:54 verbose #45 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:00:54 debug #46 run_with_timeout_async / timeout: 100 │ > │ 00:00:54 debug #47 run_with_timeout_async / timeout: 100 │ > │ 00:00:51 verbose #42 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:00:55 debug #48 run_with_timeout_async / timeout: 100 │ > │ 00:00:47 verbose #65 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:47 verbose #66 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:51 verbose #43 > Server bound to: http://localhost:13805 │ > │ 00:00:47 debug #67 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ > │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:47 debug #68 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ > │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:47 verbose #69 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl real_unbox │ > │ forall a. (obj : a) : a │ > │ =\...ot/spiral_eval/packages/84eca3865a0cfc1afd28f49a38d395e9b89071527b4bda7 │ > │ 59de7cfb116593b3e/main.spi"}} / result: │ > │ 00:00:47 verbose #70 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/84eca3865a0cfc1afd28f49a38d395e9b89071527b4bda │ > │ 759de7cfb116593b3e/main.spi"}} / result: │ > │ 00:00:52 verbose #44 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/84eca3865a0cfc1afd │ > │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e/main.spi │ > │ 00:00:48 debug #71 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ > │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:49 debug #72 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ > │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:50 debug #73 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ > │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:51 debug #74 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ > │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ > │ errors: [ │ > │ [ │ > │ "The main function should not have a forall.", │ > │ { │ > │ "TracedError": { │ > │ "message": "The main function should not have a forall.", │ > │ "trace": [] │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 │ > │ 00:00:51 verbose #75 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/84eca3865 │ > │ a0cfc1afd28f49a38d395e9b89071527b4bda759de7cfb116593b3e"]}} / result: │ > │ 00:00:59 verbose #49 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:00:59 debug #50 run_with_timeout_async / timeout: 100 │ > │ 00:00:51 debug #76 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (None, ["The main function should not have a forall."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl init_series start end inc = > inl total : f64 = conv ((end - start) / inc) + 1 > listm.init total (conv >> (*) inc >> (+) start) : list f64 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64 > > inl integral dt : integration = > fun f a b => > init_series (a + dt / 2) (b - dt / 2) dt > |> listm.map (f >> (*) dt) > |> listm.fold (+) 0 > > inl main () = > integral 0.1 (fun x => x ** 2) 0 1 > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some "0.3325000000000001\n", > [[]] > ) > ) > > ╭─[ 6.03s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:01:00 debug #51 run_with_timeout_async / timeout: 500 │ > │ 00:00:56 debug #45 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:00:57 verbose #46 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:00:57 verbose #47 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:00:57 verbose #48 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:01:00 debug #52 run_with_timeout_async / timeout: 100 │ > │ 00:01:00 verbose #53 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:01:00 debug #54 run_with_timeout_async / timeout: 100 │ > │ 00:01:01 debug #55 run_with_timeout_async / timeout: 100 │ > │ 00:00:57 verbose #49 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:01:01 debug #56 run_with_timeout_async / timeout: 100 │ > │ 00:00:54 verbose #77 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:54 verbose #78 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:00:57 verbose #50 > Server bound to: http://localhost:13805 │ > │ 00:00:54 debug #79 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\c0932fdbf60389c2ae │ > │ 8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:54 debug #80 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\c0932fdbf60389c2ae │ > │ 8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:54 verbose #81 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl init_series start end inc =\n inl total : │ > │ f64 = conv ((end - │ > │ start)...ot/spiral_eval/packages/c0932fdbf60389c2ae8b78bb5443994f2d0ecdc6c6e │ > │ 7dfddf408cecaa050d294/main.spi"}} / result: │ > │ 00:00:54 verbose #82 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/c0932fdbf60389c2ae8b78bb5443994f2d0ecdc6c6e7df │ > │ ddf408cecaa050d294/main.spi"}} / result: │ > │ 00:00:58 verbose #51 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c0932fdbf60389c2ae │ > │ 8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294/main.spi │ > │ 00:00:55 debug #83 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\c0932fdbf60389c2ae │ > │ 8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:56 debug #84 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\c0932fdbf60389c2ae │ > │ 8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:57 debug #85 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\c0932fdbf60389c2ae │ > │ 8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:57 debug #86 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\c0932fdbf60389c2ae │ > │ 8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294\main.spi / fsxContent: │ > │ 0.3325000000000001 │ > │ / errors: [] / typeErrorCount: 0 │ > │ 00:00:57 verbose #87 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c0932fdbf │ > │ 60389c2ae8b78bb5443994f2d0ecdc6c6e7dfddf408cecaa050d294"]}} / result: │ > │ 00:01:05 verbose #57 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:01:05 debug #58 run_with_timeout_async / timeout: 100 │ > │ 00:00:57 debug #88 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (Some "0.3325000000000001 │ > │ ", []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl init_series start end inc = > inl total : f64 = conv ((end - start) / inc) + 1 > listm.init total (conv >> (*) inc >> (+) start) : list f64 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64 > > inl integral dt : integration = > fun f a b => > init_series (a + dt / 2) (b - dt / 2) dt > |> listm.map (f >> (*) dt) > |> listm.fold (+) 0 > > inl main () = > integral 0.01 (fun x => x ** 2) 0 1 > """ > |> buildCode 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some "0.33332500000000004\n", > [[]] > ) > ) > // |> _assertEqual None > // |> fun x -> printfn $"{x.ToDisplayString ()}" > > ╭─[ 6.38s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:01:06 debug #59 run_with_timeout_async / timeout: 500 │ > │ 00:01:02 debug #52 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:buildCode@3-398>, None, true, │ > │ Some "C:\home\git\polyglot") │ > │ 00:01:03 verbose #53 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:01:03 verbose #54 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:01:03 verbose #55 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:01:06 debug #60 run_with_timeout_async / timeout: 100 │ > │ 00:01:06 verbose #61 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:01:06 debug #62 run_with_timeout_async / timeout: 100 │ > │ 00:01:06 debug #63 run_with_timeout_async / timeout: 100 │ > │ 00:01:07 debug #64 run_with_timeout_async / timeout: 100 │ > │ 00:01:03 verbose #56 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:01:07 debug #65 run_with_timeout_async / timeout: 100 │ > │ 00:00:59 verbose #89 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ > │ / result: │ > │ 00:00:59 verbose #90 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:01:03 verbose #57 > Server bound to: http://localhost:13805 │ > │ 00:00:59 debug #91 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:59 debug #92 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:00:59 verbose #93 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl init_series start end inc =\n inl total : │ > │ f64 = conv ((end - │ > │ start)...ot/spiral_eval/packages/355c36b6d259fe6b1c7527aa9b475ca37914ad348c4 │ > │ a239687383dcd0daeed2c/main.spi"}} / result: │ > │ 00:00:59 verbose #94 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ polyglot/spiral_eval/packages/355c36b6d259fe6b1c7527aa9b475ca37914ad348c4a23 │ > │ 9687383dcd0daeed2c/main.spi"}} / result: │ > │ 00:01:04 verbose #58 > 00:00:01 debug #4 │ > │ Supervisor.supervisor_server.BuildFile / file: │ > │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c/main.spi │ > │ 00:01:00 debug #95 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:01:01 debug #96 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:01:02 debug #97 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:01:03 debug #98 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c\main.spi / fsxContent: / │ > │ errors: [] / typeErrorCount: 0 │ > │ 00:01:04 debug #99 buildFile / takeWhileInclusive / path: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\355c36b6d259fe6b1c │ > │ 7527aa9b475ca37914ad348c4a239687383dcd0daeed2c\main.spi / fsxContent: │ > │ 0.33332500000000004 │ > │ / errors: [] / typeErrorCount: 0 │ > │ 00:01:04 verbose #100 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/355c36b6d │ > │ 259fe6b1c7527aa9b475ca37914ad348c4a239687383dcd0daeed2c"]}} / result: │ > │ 00:01:11 verbose #66 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:01:11 debug #67 run_with_timeout_async / timeout: 100 │ > │ 00:01:04 debug #101 watchWithFilter / Disposing watch stream / filter: │ > │ FileName, LastWrite │ > │ Some (Some "0.33332500000000004 │ > │ ", []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getFileTokenRange │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getFileTokenRange port cancellationToken path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let! code = fullPath |> SpiralFileSystem.read_all_text_async > let lines = code |> SpiralSm.split "\n" > > let struct (token, disposable) = SpiralThreading.new_disposable_token > cancellationToken > use _ = disposable > > let! serverPort, _errors, ct, disposable = > match port with > | Some port -> awaitCompiler port (Some token) > | None -> (getCompilerPort (), FSharp.Control.AsyncSeq.empty, token, > new_disposable id) |> Async.init > use _ = disposable > > let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > > let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} |} > let! _fileOpenResult = fileOpenObj |> sendObj serverPort > > // do! Async.Sleep 60 > > let fileTokenRangeObj = > {| > FileTokenRange = > {| > uri = fullPathUri > range = > [[| > {| line = 0; character = 0 |} > {| line = lines.Length - 1; character = > lines.[[lines.Length - 1]].Length |} > |]] > |} > |} > let! fileTokenRangeResult = > fileTokenRangeObj > |> sendObj serverPort > |> Async.withCancellationToken ct > > let fileDir = fullPath |> System.IO.Path.GetDirectoryName > if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then > let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] |} |} > let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort > () > > return fileTokenRangeResult |> Option.map FSharp.Json.Json.deserialize<int > array> > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getCodeTokenRange │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getCodeTokenRange cancellationToken code = async { > let! mainPath, _ = persistCode code > > let codeDir = mainPath |> System.IO.Path.GetDirectoryName > let tokensPath = codeDir </> "tokens.json" > let! tokens = async { > if tokensPath |> System.IO.File.Exists |> not > then return None > else > let! text = tokensPath |> SpiralFileSystem.read_all_text_async > > return > if text.Length > 2 > then text |> FSharp.Json.Json.deserialize<int array> |> Some > else None > } > match tokens with > | Some tokens -> return tokens |> Some > | None -> > let port = getCompilerPort () > return! mainPath |> getFileTokenRange (Some port) cancellationToken > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = ()""" > |> getCodeTokenRange None > |> Async.runWithTimeout 10000 > |> Option.flatten > |> _assertEqual (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; > 8; 0; 0; 2; 1; 4; 0; 0; > 2; 1; 8; 0; 0; 1; 1; 8; 0 |]]) > > ╭─[ 5.56s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:01:18 debug #68 run_with_timeout_async / timeout: 500 │ > │ 00:01:14 debug #59 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:it@4-167>, None, true, Some "C:\home\git\polyglot") │ > │ 00:01:15 verbose #60 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:01:15 verbose #61 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:01:15 verbose #62 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:01:19 debug #69 run_with_timeout_async / timeout: 100 │ > │ 00:01:19 verbose #70 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:01:19 debug #71 run_with_timeout_async / timeout: 100 │ > │ 00:01:19 debug #72 run_with_timeout_async / timeout: 100 │ > │ 00:01:16 verbose #63 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:01:19 debug #73 run_with_timeout_async / timeout: 100 │ > │ 00:01:19 debug #74 run_with_timeout_async / timeout: 100 │ > │ 00:01:12 verbose #102 Supervisor.sendJson / port: 13805 / json: │ > │ {"Ping":true} / result: │ > │ 00:01:12 verbose #103 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:01:16 verbose #64 > Server bound to: http://localhost:13805 │ > │ 00:01:12 verbose #104 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () = │ > │ ()","uri":"file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages │ > │ /fb6c8d45c45c5bed6706c564f1573e80b77a3923967ce83cb69737ce2ce5040c/main.spi"} │ > │ } / result: │ > │ 00:01:13 verbose #105 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileTokenRange":{"range":[ │ > │ {"character":0,"line":0},{"character":16,"line":0}],"uri":"file:///c:/ho...o │ > │ t/spiral_eval/packages/fb6c8d45c45c5bed6706c564f1573e80b77a3923967ce83cb6973 │ > │ 7ce2ce5040c/main.spi"}} / result: Some([ │ > │ 0, │ > │ 0, │ > │ 3, │ > │ 7, │ > │ 0, │ > │ 0, │ > │ 4, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 0, │ > │ 5, │ > │ 1, │ > │ 8, │ > │ 0, │ > │ 0, │ > │ ...8, │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 8, │ > │ 0, │ > │ 0, │ > │ 1, │ > │ 1, │ > │ 8, │ > │ 0 │ > │ ]) │ > │ 00:01:13 verbose #106 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fb6c8d45c │ > │ 45c5bed6706c564f1573e80b77a3923967ce83cb69737ce2ce5040c"]}} / result: │ > │ 00:01:20 verbose #75 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:01:21 debug #76 run_with_timeout_async / timeout: 100 │ > │ Some [|0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; │ > │ 4; 0; 0; 2; 1; 8; 0; 0; 1; 1; 8; 0|] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = 1i32""" > |> getCodeTokenRange None > |> Async.runWithTimeout 10000 > |> Option.flatten > |> _assertEqual (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; > 8; 0; 0; 2; 1; 4; 0; 0; > 2; 1; 3; 0; 0; 1; 3; 12; 0 |]]) > > ╭─[ 4.99s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:01:23 debug #77 run_with_timeout_async / timeout: 500 │ > │ 00:01:20 debug #65 execute_with_options_async / options: struct (Some │ > │ System.Threading.CancellationToken, │ > │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ > │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ > │ 13805 --default-int i32 --default-float f64", │ > │ [||], Some <fun:it@4-387>, None, true, Some "C:\home\git\polyglot") │ > │ 00:01:20 verbose #66 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ > │ 00:01:20 verbose #67 > 00:00:00 debug #2 dllPath: │ > │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ > │ 2\artifacts\bin\The Spiral Language 2\release │ > │ 00:01:20 verbose #68 > 00:00:00 debug #3 targetDir: │ > │ C:\home\git\polyglot\target/polyglot/spiral_eval │ > │ 00:01:24 debug #78 run_with_timeout_async / timeout: 100 │ > │ 00:01:24 verbose #79 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: True │ > │ 00:01:24 debug #80 run_with_timeout_async / timeout: 100 │ > │ 00:01:24 debug #81 run_with_timeout_async / timeout: 100 │ > │ 00:01:21 verbose #69 > Starting the Spiral Server. It is bound to: │ > │ http://localhost:13805 │ > │ 00:01:24 debug #82 run_with_timeout_async / timeout: 100 │ > │ 00:01:17 verbose #107 Supervisor.sendJson / port: 13805 / json: │ > │ {"Ping":true} / result: │ > │ 00:01:17 verbose #108 awaitCompiler / Ping / result: 'Some(null)' / port: │ > │ 13805 / retry: 0 │ > │ 00:01:21 verbose #70 > Server bound to: http://localhost:13805 │ > │ 00:01:17 verbose #109 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () = │ > │ 1i32","uri":"file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packag │ > │ es/9df95a2f18642bd8d2f682f6edb6cef45c30ca9c616b33ebb0e5577eed14871c/main.spi │ > │ "}} / result: │ > │ 00:01:18 verbose #110 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileTokenRange":{"range":[ │ > │ {"character":0,"line":0},{"character":18,"line":0}],"uri":"file:///c:/ho...o │ > │ t/spiral_eval/packages/9df95a2f18642bd8d2f682f6edb6cef45c30ca9c616b33ebb0e55 │ > │ 77eed14871c/main.spi"}} / result: Some([ │ > │ 0, │ > │ 0, │ > │ 3, │ > │ 7, │ > │ 0, │ > │ 0, │ > │ 4, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 0, │ > │ 5, │ > │ 1, │ > │ 8, │ > │ 0, │ > │ 0, │ > │ ..., │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 3, │ > │ 0, │ > │ 0, │ > │ 1, │ > │ 3, │ > │ 12, │ > │ 0 │ > │ ]) │ > │ 00:01:18 verbose #111 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9df95a2f1 │ > │ 8642bd8d2f682f6edb6cef45c30ca9c616b33ebb0e5577eed14871c"]}} / result: │ > │ 00:01:25 verbose #83 networking.wait_for_port_access / port: 13805 / retry: │ > │ 0 / timeout: Some 100 / status: False │ > │ 00:01:26 debug #84 run_with_timeout_async / timeout: 100 │ > │ Some [|0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; │ > │ 4; 0; 0; 2; 1; 3; 0; 0; 1; 3; 12; 0|] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Arguments │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > [[<RequireQualifiedAccess>]] > type Arguments = > | Build_File of string * string > | File_Token_Range of string * string > | Execute_Command of string > | [[<Argu.ArguAttributes.Unique>]] Timeout of int > | [[<Argu.ArguAttributes.Unique>]] Port of int > | [[<Argu.ArguAttributes.Unique>]] Parallel > | [[<Argu.ArguAttributes.Unique>]] Exit_On_Error > > interface Argu.IArgParserTemplate with > member s.Usage = > match s with > | Build_File _ -> nameof Build_File > | File_Token_Range _ -> nameof File_Token_Range > | Execute_Command _ -> nameof Execute_Command > | Timeout _ -> nameof Timeout > | Port _ -> nameof Port > | Parallel -> nameof Parallel > | Exit_On_Error-> nameof Exit_On_Error > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () > > ╭─[ 161.29ms - return value ]──────────────────────────────────────────────────╮ > │ "USAGE: dotnet-repl [--help] [--build-file <string> <string>] │ > │ [--file-token-range <string> <string>] │ > │ [--execute-command <string>] [--timeout <int>] [--port │ > │ <int>] │ > │ [--parallel] [--exit-on-error] │ > │ │ > │ OPTIONS: │ > │ │ > │ --build-file <string> <string> │ > │ Build_File │ > │ --file-token-range <string> <string> │ > │ File_Token_Range │ > │ --execute-command <string> │ > │ Execute_Command │ > │ --timeout <int> Timeout │ > │ --port <int> Port │ > │ --parallel Parallel │ > │ --exit-on-error Exit_On_Error │ > │ --help display this list of options. │ > │ " │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## main │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let main args = > let argsMap = args |> Runtime.parseArgsMap<Arguments> > > let buildFileActions = > argsMap > |> Map.tryFind (nameof Arguments.Build_File) > |> Option.defaultValue [[]] > |> List.choose (function > | Arguments.Build_File (inputPath, outputPath) -> Some (inputPath, > outputPath) > | _ -> None > ) > > let fileTokenRangeActions = > argsMap > |> Map.tryFind (nameof Arguments.File_Token_Range) > |> Option.defaultValue [[]] > |> List.choose (function > | Arguments.File_Token_Range (inputPath, outputPath) -> Some > (inputPath, outputPath) > | _ -> None > ) > > let executeCommandActions = > argsMap > |> Map.tryFind (nameof Arguments.Execute_Command) > |> Option.defaultValue [[]] > |> List.choose (function > | Arguments.Execute_Command command -> Some command > | _ -> None > ) > > let timeout = > match argsMap |> Map.tryFind (nameof Arguments.Timeout) with > | Some [[ Arguments.Timeout timeout ]] -> timeout > | _ -> 60000 * 60 > > let port = > match argsMap |> Map.tryFind (nameof Arguments.Port) with > | Some [[ Arguments.Port port ]] -> Some port > | _ -> None > > let isParallel = argsMap |> Map.containsKey (nameof Arguments.Parallel) > > let isExitOnError = argsMap |> Map.containsKey (nameof > Arguments.Exit_On_Error) > > async { > let port = port |> Option.defaultWith getCompilerPort > let struct (localToken, disposable) = > SpiralThreading.new_disposable_token None > let! serverPort, _errors, compilerToken, disposable = awaitCompiler port > (Some localToken) > use _ = disposable > > let buildFileAsync = > buildFileActions > |> List.map (fun (inputPath, outputPath) -> async { > let! _fsxPath, (outputCode, errors) = inputPath |> buildFile > timeout serverPort None > > errors > |> List.map snd > |> List.iter (fun error -> > trace Critical (fun () -> $"main / error: {error |> > serializeObj}") _locals > ) > > match outputCode with > | Some outputCode -> > do! outputCode |> SpiralFileSystem.write_all_text_async > outputPath > return 0 > | None -> > if isExitOnError > then System.Environment.Exit 1 > > return 1 > }) > > let fileTokenRangeAsync = > fileTokenRangeActions > |> List.map (fun (inputPath, outputPath) -> async { > let! tokenRange = inputPath |> getFileTokenRange (Some > serverPort) None > match tokenRange with > | Some tokenRange -> > do! tokenRange |> FSharp.Json.Json.serialize |> > SpiralFileSystem.write_all_text_async outputPath > return 0 > | None -> > if isExitOnError > then System.Environment.Exit 1 > > return 1 > }) > > let executeCommandAsync = > executeCommandActions > |> List.map (fun command -> async { > let! exitCode, result = > SpiralRuntime.execution_options (fun x -> > { x with > l0 = Some compilerToken > l1 = command > } > ) > |> SpiralRuntime.execute_with_options_async > > trace Debug (fun () -> $"main / executeCommand / exitCode: > {exitCode} / command: {command}") _locals > > if isExitOnError && exitCode > 0 > then System.Environment.Exit exitCode > > return exitCode > }) > > return! > [[| buildFileAsync; fileTokenRangeAsync; executeCommandAsync |]] > |> Seq.collect id > |> fun x -> > if isParallel > then Async.Parallel (x, float System.Environment.ProcessorCount > * 0.51 |> ceil |> int) > else Async.Sequential x > |> Async.map Array.sum > } > |> Async.runWithTimeout timeout > |> Option.defaultValue 1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let args = > System.Environment.GetEnvironmentVariable "ARGS" > |> SpiralRuntime.split_args > |> Seq.toArray > > match args with > | [[||]] -> 0 > | args -> if main args = 0 then 0 else failwith "main failed" > > ╭─[ 137.40ms - return value ]──────────────────────────────────────────────────╮ > │ <div class="dni-plaintext"><pre>0 │ > │ </pre></div><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:55 verbose #6 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 142352 00:02:55 debug #7 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:02:57 verbose #8 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb to html 00:02:57 verbose #9 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:02:57 verbose #10 ! validate(nb) 00:03:00 verbose #11 ! [NbConvertApp] Writing 464968 bytes to c:\home\git\polyglot\apps\spiral\Supervisor.dib.html 00:03:00 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 653 00:03:00 debug #13 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 653 00:03:00 debug #14 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Supervisor.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Supervisor.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:03:02 verbose #15 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:03:02 debug #16 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:03:03 debug #17 spiral_builder.run / dib / exit_code: 0 / result.Length: 143064 00:00:00 debug #1 writeDibCode / output: Fs / path: Supervisor.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Supervisor.dib 00:00:00 debug #1 persistCodeProject / packages: [Argu; FSharp.Control.AsyncSeq; FSharp.Json; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: Supervisor / hash: / code.Length: 23287 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj 00:00:00 debug #1 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime linux-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Supervisor") 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj (in 721 ms). 00:00:03 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj] 00:00:20 verbose #6 > Supervisor -> C:\home\git\polyglot\target\polyglot\builder\Supervisor\bin\Release\net9.0\linux-x64\Supervisor.dll 00:00:22 verbose #7 > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:22 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 715 00:00:22 debug #9 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime win-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Supervisor") 00:00:22 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:23 verbose #11 > Determining projects to restore... 00:00:24 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj (in 458 ms). 00:00:24 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj] 00:00:39 verbose #14 > Supervisor -> C:\home\git\polyglot\target\polyglot\builder\Supervisor\bin\Release\net9.0\win-x64\Supervisor.dll 00:00:42 verbose #15 > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:42 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 713 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Eval.dib", "--retries", "3"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/Eval.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/Eval.dib" --output-path "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Eval (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com > mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli > ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ > 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" > #r > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha > rp.Json.dll" > #r > @"../../../../../../../.nuget/packages/system.management/7.0.0/lib/netstandard2. > 0/System.Management.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A > spNetCore.Html.Abstractions.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.Formatting.dll" > open System > open System.IO > open System.Text > open Microsoft.DotNet.Interactive.Formatting > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.FSharp.dll" > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers > #r > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D > otNet.Interactive.dll" > open type Microsoft.DotNet.Interactive.Kernel > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) > > ── fsharp - import ───────────────────────────────────────────────────────────── > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: > TextWriter)->fprintfn writer "%120A" x) > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Notebooks.dib > #!import ../../lib/fsharp/Testing.dib > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > Formatter.ListExpansionLimit <- 100 > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #endif > type FnOnce<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] > #endif > type ActionFn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] > #endif > type ActionFn2<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] > #endif > type Impl<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] > #endif > type Mut<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Co... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] > #endif > type async_std_task_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] > #endif > type std_future_Future<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] > #endif > type rayon_vec_IntoIter<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] > #endif > type rayon_iter_Map<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] > #endif > type futures_lite_stream_StreamExt = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] > #endif > type futures_future_TryJoinAll<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] > #endif > type futures_future_Fuse<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] > #endif > type futures_future_JoinAll<'T> = class end > let rec closure0 () (v0 : System.Threading.CancellationToken) : > Async<System.Threading.CancellationToken> = > let v1 : bool = true > let mutable _v1 : Async<System.Threading.CancellationToken> option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT > let v2 : Async<System.Threading.CancellationToken> = null |> > unbox<Async<System... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] > #endif > type std_thread_JoinHandle<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] > #endif > type std_sync_Arc<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] > #endif > type std_sync_Mutex<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] > #endif > type std_sync_MutexGuard<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] > #endif > type std_sync_PoisonError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] > #endif > type std_sync_mpsc_Receiver<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] > #endif > type std_sync_mpsc_SendError<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] > #endif > type std_sync_mpsc_Sender<'T> = class end > type Disposable (f : unit -> unit) = interface System.IDisposable with member > _.Dispose () = f () > type [[<Struct>]] US0 = > | US0_0 of f0_0 : System.Threading.CancellationToken > | US0_1 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = > let v1 : bool = true > let mutable _v1 : unit option = None > > #if FABLE_COMPILER || WASM || CONTRACT > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] > #endif > type reqwest_Error = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] > #endif > type reqwest_RequestBuilder = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] > #endif > type reqwest_Response = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] > #endif > type std_env_VarError = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] > #endif > type Dyn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] > #endif > type Send<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] > #endif > type Fn<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] > #endif > type FnUnit = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] > #... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] > #endif > type clap_Arg = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] > #endif > type clap_ArgAction = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] > #endif > type clap_Command = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] > #endif > type clap_ArgMatches = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] > #endif > type clap_builder_ValueRange = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] > #endif > type clap_builder_ValueParser = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] > #endif > type clap_builder_PossibleValue = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] > #endif > type std_process_Child = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] > #endif > type std_process_ChildStderr = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] > #endif > type std_process_ChildStdout = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] > #endif > type std_process_ChildStdin = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] > #endif > type std_process_Command = class ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] > #endif > type std_fs_File = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] > #endif > type std_fs_FileType = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] > #endif > type std_path_Display = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] > #endif > type std_path_Path = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] > #endif > type std_path_PathBuf = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] > #endif > type async_walkdir_DirEntry = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] > #endif > type async_walkdir_Filtering = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] > #endif > type async_walkdir_WalkDir = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] > #endif > type core_any_Any = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] > #endif > type core_ops_Try<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] > #endif > type Func0<'T> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] > #endif > type Func0<'T, 'U> = class end > #if FABLE_COMPILER > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] > #endif > type Box<'T> = clas... > > ── fsharp - import ───────────────────────────────────────────────────────────── > module SpiralTrace = > let trace x = > #if !INTERACTIVE > Trace.trace x > #else > trace x > #endif > > type TraceLevel = > #if !INTERACTIVE > Trace.US0 > #else > US0 > #endif > > module SpiralCrypto = > let hash_text x = > #if !INTERACTIVE > Crypto.hash_text x > #else > hash_text x > #endif > > #if !FABLE_COMPILER && !WASM && !CONTRACT > > module SpiralAsync = > let merge_cancellation_token_with_default_async x = > #if !INTERACTIVE > Async_.merge_cancellation_token_with_default_async x > #else > merge_cancellation_token_with_default_async x > #endif > > module SpiralThreading = > let new_disposable_token x = > #if !INTERACTIVE > Threading.new_disposable_token x > #else > new_disposable_token x > #endif > > module SpiralNetworking = > let test_port_open x = > #if !INTERACTIVE > Networking.test_port_open x > #else > test_port_open x > #endif > > let test_port_open_timeout x = > #if !INTERACTIVE > Networking.test_port_open_timeout x > #else > test_port_open_timeout x > #endif > > let wait_for_port_access x = > #if !INTERACTIVE > Networking.wait_for_port_access x > #else > wait_for_port_access x > #endif > > let get_available_port x = > #if !INTERACTIVE > Networking.get_available_port x > #else > get_available_port x > #endif > > module SpiralRuntime = > let get_executable_suffix () = > #if !INTERACTIVE > Runtime.get_executable_suffix () > #else > get_executable_suffix () > #endif > > let is_windows () = > #if !INTERACTIVE > ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > type AssertExceptionFormatter (ex) = > member _.Text = > ex.ToString() > .Replace("32m", "<span style=\"color: green;\">") > .Replace("36m", "</span>") > .Replace("31m", "<span style=\"color: red;\">") > .Replace("\n", "<br/>\n") > > > Formatter.Register<AssertExceptionFormatter> ((fun (x : > AssertExceptionFormatter) -> x.Text), "text/html") > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __expect fn log expected actual = > if log then printfn $"{actual.ToDisplayString ()}" > try > "Testing.__expect" |> fn actual expected > with :? Expecto.AssertException as ex -> > AssertExceptionFormatter(ex).Display () |> ignore > failwith (ex.GetType().FullName) > > let inline __contains log expected actual = __expect Expecto.Expect.contains log > expected actual > let inline _contains expected actual = __contains true expected actual > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log > expected actual > let inline _assertEqual expected actual = __assertEqual true expected actual > > let inline __isGreaterThan log expected actual = __expect > Expecto.Expect.isGreaterThan log expected actual > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual > > let inline __isGreaterThanOrEqual log expected actual = __expect > Expecto.Expect.isGreaterThanOrEqual log expected actual > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true > expected actual > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan > log expected actual > let inline _isLessThan expected actual = __isLessThan true expected actual > > let inline __isLessThanOrEqual log expected actual = __expect > Expecto.Expect.isLessThanOrEqual log expected actual > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true > expected actual > > let inline __sequenceEqual log expected actual = __expe... > > ── fsharp - import ───────────────────────────────────────────────────────────── > //// test > > let inline __isBetween log a b actual = > let inline isBetween actual (a, b) _ = > __isGreaterThanOrEqual log a actual > __isLessThanOrEqual log b actual > __expect isBetween log (a, b) actual > let inline _isBetween a b actual = __isBetween true a b actual > > ── fsharp ────────────────────────────────────────────────────────────────────── > #!import ../../lib/fsharp/Common.fs > #!import ../../lib/fsharp/CommonFSharp.fs > #!import ../../lib/fsharp/Async.fs > #!import ../../lib/fsharp/AsyncSeq.fs > #!import ../../lib/fsharp/Runtime.fs > #!import ../../lib/fsharp/FileSystem.fs > > #!import ../../apps/builder/Builder.fs > #!import ../../apps/spiral/Supervisor.fs > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Common = > > #if !INTERACTIVE > open Lib > #endif > > let nl = System.Environment.NewLine > let q = @"""" > > let inline cons head tail = head :: tail > > /// ## memoize > let inline memoize fn = > let result = lazy fn () > fun () -> result.Value > > /// ## TraceLevel > type TraceLevel = > | Verbose > | Debug > | Info > | Warning > | Critical > > let inline _locals () = "" > > /// ## trace > let to_trace_level = function > | Verbose -> SpiralTrace.TraceLevel.US0_0 > | Debug -> SpiralTrace.TraceLevel.US0_1 > | Info -> SpiralTrace.TraceLevel.US0_2 > | Warning -> SpiralTrace.TraceLevel.US0_3 > | Critical -> SpiralTrace.TraceLevel.US0_4 > > let trace level fn locals = > let level = level |> to_trace_level > SpiralTrace.trace level fn locals > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module CommonFSharp = > > open Common > > /// ## getUnionCaseName > let inline getUnionCaseName<'T> (x: 'T) = > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with > | case, _ -> case.Name > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Async = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## choice > let inline choice asyncs = async { > let e = Event<_> () > use cts = new System.Threading.CancellationTokenSource () > let fn = > asyncs > |> Seq.map (fun a -> async { > let! x = a > e.Trigger x > }) > |> Async.Parallel > |> Async.Ignore > Async.Start (fn, cts.Token) > let! result = Async.AwaitEvent e.Publish > cts.Cancel () > return result > } > > /// ## map > let inline map fn a = async { > let! x = a > return fn x > } > > /// ## catch > let inline catch a = > a > |> Async.Catch > |> map (function > | Choice1Of2 result -> Ok result > | Choice2Of2 ex -> Error ex > ) > > /// ## runWithTimeoutChoiceAsync > let inline runWithTimeoutChoiceAsync (timeout : int) fn = > let _locals () = $"timeout: {timeout} / {_locals ()}" > > let timeoutTask = async { > do! Async.Sleep timeout > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals > return None > } > > let task = async { > try > let! result = fn > return Some result > with > | :? System.AggregateException as ex when > ex.InnerExceptions > |> Seq.exists (function :? Sys... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module AsyncSeq = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## subscribeEvent > let inline subscribeEvent (event: IEvent<'H, 'A>) map = > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, > 'A>(event.AddHandler, event.RemoveHandler) > System.Reactive.Linq.Observable.Select (observable, fun event -> map > event.EventArgs) > |> FSharp.Control.AsyncSeq.ofObservableBuffered > > /// ## subscribeToken > let subscribeToken (token : System.Threading.CancellationToken) = > let tcs = new System.Threading.Tasks.TaskCompletionSource () > System.Action tcs.SetResult |> token.Register |> ignore > let start = System.DateTime.Now.Ticks > FSharp.Control.AsyncSeq.unfoldAsync > (fun () -> async { > do! tcs.Task |> Async.AwaitTask > return Some (System.DateTime.Now.Ticks - start, ()) > }) > () > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Runtime = > > #if !INTERACTIVE > open Lib > #endif > > open Common > > /// ## parseArgs > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = > let assemblyName = > System.Reflection.Assembly.GetEntryAssembly().GetName().Name > let errorHandler : Argu.IExiter = > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> > List.contains assemblyName > then Argu.ExceptionExiter () > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | > _ -> Some System.ConsoleColor.Red) > > let parser = > Argu.ArgumentParser.Create<'T> ( > programName = > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", > errorHandler = errorHandler > ) > > parser.ParseCommandLine args > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseArgs<'T> > |> fun results -> results.GetAllResults () > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = > args > |> parseAllArgs<'T> > |> List.groupBy CommonFSharp.getUnionCaseName<'T> > |> Map.ofList > > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module FileSystem = > > #if !INTERACTIVE > open Lib > #endif > > open Common > open SpiralFileSystem.Operators > > /// ## watchDirectory > [[<RequireQualifiedAccess>]] > type FileSystemChangeType = > | Failure > | Changed > | Created > | Deleted > | Renamed > > [[<RequireQualifiedAccess>]] > type FileSystemChange = > | Failure of exn: exn > | Changed of path: string * content: string option > | Created of path: string * content: string option > | Deleted of path: string > | Renamed of oldPath: string * (string * string option) > > > let inline watchDirectoryWithFilter filter shouldReadContent path = > let fullPath = path |> System.IO.Path.GetFullPath > let _locals () = $"filter: {filter} / {_locals ()}" > > let watcher = > new System.IO.FileSystemWatcher ( > Path = fullPath, > NotifyFilter = filter, > EnableRaisingEvents = true, > IncludeSubdirectories = true > ) > > let inline getEventPath (path : string) = > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> > SpiralSm.trim_start [[| '/'; '\\' |]] > > let inline ticks () = > System.DateTime.UtcNow.Ticks > > let changedStream = > AsyncSeq.subscribeEvent > watcher.Changed > (fun event -> > ticks (), > [[ FileSystemChange... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Builder = > > #if !INTERACTIVE > open Lib > #endif > > open Common > open SpiralFileSystem.Operators > > /// ## buildProject > let inline buildProject runtime outputDir path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let fileDir = fullPath |> System.IO.Path.GetDirectoryName > let extension = fullPath |> System.IO.Path.GetExtension > > trace Debug > (fun () -> "buildProject") > (fun () -> $"fullPath: {fullPath} / {_locals ()}") > > match extension with > | ".fsproj" -> () > | _ -> failwith "Invalid project file" > > let runtimes = > runtime > |> Option.map List.singleton > |> Option.defaultValue [[ "linux-x64"; "win-x64" ]] > > let outputDir = outputDir |> Option.defaultValue "dist" > > return! > runtimes > |> List.map (fun runtime -> async { > let command = $@"dotnet publish ""{path}"" --configuration > Release --output ""{outputDir}"" --runtime {runtime}" > let! exitCode, _result = > SpiralRuntime.execution_options (fun x -> > { x with > l1 = command > l6 = Some fileDir > } > ) > |> SpiralRuntime.execute_with_options_async > return exitCode > }) > |> Async.Sequential > ... > > ── fsharp - import ───────────────────────────────────────────────────────────── > #if !INTERACTIVE > namespace Polyglot > #endif > > module Supervisor = > > #if !INTERACTIVE > open Lib > #endif > > open Common > open SpiralFileSystem.Operators > open Microsoft.AspNetCore.SignalR.Client > > /// ## sendJson > let inline sendJson (port : int) (json : string) = async { > let host = "127.0.0.1" > let! portOpen = SpiralNetworking.test_port_open host port > if portOpen then > try > let connection = > HubConnectionBuilder().WithUrl($"http://{host}:{port}").Build() > do! connection.StartAsync () |> Async.AwaitTask > let! result = > connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask > do! connection.StopAsync () |> Async.AwaitTask > trace Verbose (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / result: {result |> Option.ofObj |> > Option.map (SpiralSm.ellipsis_end 200)}") _locals > return Some result > with ex -> > trace Critical (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / ex: {ex |> > SpiralSm.format_exception}") _locals > return None > else > trace Debug (fun () -> "Supervisor.sendJson / port: {port} / error: > port not open") _locals > return None > } > > /// ## sendObj > let inline sendObj port obj = > obj > |> System.Text.Json.JsonSerializer.Serialize > |> se... > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open SpiralFileSystem.Operators > open Microsoft.AspNetCore.SignalR.Client > > ── fsharp ────────────────────────────────────────────────────────────────────── > open System > open System.Collections.Generic > open System.IO > open System.Text > open System.Threading > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## mapErrors │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline mapErrors (severity, errors, lastTopLevelIndex) allCode = > let allCodeLineLength = > allCode |> SpiralSm.split "\n" |> Array.length > > errors > |> List.map (fun (_, error) -> > match error with > | Supervisor.FatalError message -> > ( > severity, message, 0, ("", (0, 0), (0, 0)) > ) > |> List.singleton > | Supervisor.TracedError data -> > data.trace > |> List.truncate 5 > |> List.append [[ data.message ]] > |> List.map (fun message -> > ( > severity, message, 0, ("", (0, 0), (0, 0)) > ) > ) > | Supervisor.PackageErrors data > | Supervisor.TokenizerErrors data > | Supervisor.ParserErrors data > | Supervisor.TypeErrors data -> > data.errors > |> List.filter (fun ((rangeStart, _), _) -> > trace Debug (fun () -> $"Eval.mapErrors / rangeStart.line: > {rangeStart.line} / lastTopLevelIndex: {lastTopLevelIndex} / allCodeLineLength: > {allCodeLineLength} / filtered: {rangeStart.line > allCodeLineLength}") _locals > rangeStart.line > allCodeLineLength > ) > |> List.map (fun ((rangeStart, rangeEnd), message) -> > ( > severity, > message, > 0, > ( > (data.uri |> System.IO.Path.GetFileName), > ( > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeStart.line - allCodeLineLength - 2 > | _ -> rangeStart.line - allCodeLineLength), > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeStart.character - 4 > | _ -> rangeStart.character) > ), > ( > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeEnd.line - allCodeLineLength - 2 > | _ -> rangeEnd.line - allCodeLineLength), > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeEnd.character - 4 > | _ -> rangeEnd.character) > ) > ) > ) > ) > ) > |> List.collect id > |> List.toArray > > ── fsharp ────────────────────────────────────────────────────────────────────── > let workspaceRoot = SpiralFileSystem.get_workspace_root () > let targetDir = workspaceRoot </> "target/polyglot/spiral_eval" > [[ targetDir ]] > |> List.iter (fun dir -> if Directory.Exists dir |> not then > Directory.CreateDirectory dir |> ignore) > > let assemblyName = Reflection.Assembly.GetEntryAssembly().GetName().Name > > let mutable allCode = "" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getParentProcessId │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let getParentProcessId () = > if SpiralRuntime.is_windows () |> not > then 0u > else > let pid = System.Diagnostics.Process.GetCurrentProcess().Id > let query = $"SELECT ParentProcessId FROM Win32_Process WHERE ProcessId > = {pid}" > use searcher = new System.Management.ManagementObjectSearcher (query) > use results = searcher.Get () > let data = results |> Seq.cast<System.Management.ManagementObject> > if data |> Seq.isEmpty > then 0u > else data |> Seq.head |> (fun mo -> mo.[["ParentProcessId"]] :?> uint32) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## startTokenRangeWatcher │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline startTokenRangeWatcher () = > if [[ "dotnet-repl" ]] |> List.contains assemblyName |> not then > let tokensDir = targetDir </> "tokens" > > [[ tokensDir ]] > |> List.iter (fun dir -> if Directory.Exists dir |> not then > Directory.CreateDirectory dir |> ignore) > > let stream, disposable = FileSystem.watchDirectory (fun _ -> false) > tokensDir > > try > let existingFilesChild = > tokensDir > |> System.IO.Directory.GetDirectories > |> Array.map (fun codeDir -> async { > try > let tokensPath = codeDir </> "tokens.json" > if tokensPath |> File.Exists |> not then > let codePath = codeDir </> "main.spi" > let! tokens = codePath |> > Supervisor.getFileTokenRange None None > match tokens with > | Some tokens -> > do! > tokens > |> FSharp.Json.Json.serialize > |> SpiralFileSystem.write_all_text_async > tokensPath > | None -> > trace Verbose (fun () -> > $"Eval.startTokenRangeWatcher / GetDirectories / tokens: None") _locals > with ex -> > trace Critical (fun () -> $"Eval.startTokenRangeWatcher > / GetDirectories / ex: {ex |> SpiralSm.format_exception}") _locals > }) > |> Async.Parallel > |> Async.Ignore > > let streamAsyncChild = > stream > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun (ticks, event) > -> async { > try > match event with > | FileSystem.FileSystemChange.Changed (codePath, _) > when System.IO.Path.GetFileName codePath = > "main.spi" > -> > let hashDir = codePath |> > System.IO.Directory.GetParent > let hashHex = hashDir.Name > let codePath = tokensDir </> codePath > let tokensPath = tokensDir </> hashHex </> > "tokens.json" > do! > codePath > |> SpiralFileSystem.wait_for_file_access_read > |> Async.runWithTimeoutAsync 3000 > |> Async.Ignore > let! tokens = codePath |> > Supervisor.getFileTokenRange None None > match tokens with > | Some tokens -> > do! > tokens > |> FSharp.Json.Json.serialize > |> SpiralFileSystem.write_all_text_async > tokensPath > | None -> > trace Verbose (fun () -> > $"Eval.startTokenRangeWatcher / iterAsyncParallel / tokens: None") _locals > | _ -> () > with ex -> > trace Critical (fun () -> $"Eval.startTokenRangeWatcher > / iterAsyncParallel / ex: {ex |> SpiralSm.format_exception}") _locals > }) > > let parentAsyncChild = async { > let parentProcessId = getParentProcessId () > trace Verbose > (fun () -> "Eval.parentAsyncChild") > (fun () -> $"parentProcessId: {parentProcessId} / {_locals > ()}") > > if parentProcessId > 0u then > let parentProcess = parentProcessId |> int |> > System.Diagnostics.Process.GetProcessById > do! parentProcess.WaitForExitAsync () |> Async.AwaitTask > trace Verbose > (fun () -> "Eval.parentAsyncChild / Parent process has > exited. Performing cleanup...") > (fun () -> $"{_locals ()}") > System.Threading.Thread.Sleep 1000 > System.Environment.Exit 1 > } > > async { > do! Async.Sleep 3000 > existingFilesChild |> Async.StartImmediate > streamAsyncChild |> Async.Start > parentAsyncChild |> Async.Start > } > |> Async.Start > with ex -> > trace Critical (fun () -> $"Eval.startTokenRangeWatcher / ex: {ex |> > SpiralSm.format_exception}") _locals > > disposable > else new_disposable (fun () -> ()) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## startCommandsWatcher │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let startCommandsWatcher (uriServer : string) = > let commandsDir = targetDir </> "eval_commands" > let commandHistoryDir = targetDir </> "eval_command_history" > [[ commandsDir; commandHistoryDir ]] > |> List.iter (fun dir -> if Directory.Exists dir |> not then > Directory.CreateDirectory dir |> ignore) > > Directory.EnumerateFiles commandsDir |> Seq.iter File.Delete > > let stream, disposable = > commandsDir > |> FileSystem.watchDirectory (function > | FileSystem.FileSystemChange.Created _ -> true > | _ -> false > ) > > let connection = HubConnectionBuilder().WithUrl(uriServer).Build() > connection.StartAsync() |> Async.AwaitTask |> Async.Start > // let _ = connection.On<string>("ServerToClientMsg", fun x -> > // printfn $"ServerToClientMsg: '{x}'" > // ) > > stream > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun (ticks, event) -> async { > let _locals () = $"ticks: {ticks} / event: {event} / {_locals ()}" > trace Verbose (fun () -> "Eval.startCommandsWatcher / > iterAsyncParallel") _locals > > match event with > | FileSystem.FileSystemChange.Created (path, Some json) -> > try > let fullPath = commandsDir </> path > let! result = > connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask > let commandHistoryPath = commandHistoryDir </> path > do! fullPath |> SpiralFileSystem.move_file_async > commandHistoryPath |> Async.Ignore > if result |> SpiralSm.trim |> String.length > 0 then > let resultPath = commandHistoryDir </> > $"{Path.GetFileNameWithoutExtension path}_result.json" > do! result |> SpiralFileSystem.write_all_text_async > resultPath > with ex -> > let _locals () = $"ex: {ex |> SpiralSm.format_exception} / > {_locals ()}" > trace Critical (fun () -> "Eval.startCommandsWatcher / > iterAsyncParallel") _locals > | _ -> () > }) > |> Async.StartChild > |> Async.Ignore > |> Async.Start > > new_disposable (fun () -> > disposable.Dispose () > ) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## eval │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline eval > (fsi_eval: > string > -> System.Threading.CancellationToken > -> Choice<'a, Exception> * (TraceLevel * string * int * (string * (int * > int) * (int * int))) array) > (cancellationToken: Option<System.Threading.CancellationToken>) > (code: string) > = > trace Verbose (fun () -> $"Eval.eval / code: %A{code}") _locals > > let rawCellCode = > code |> SpiralSm.replace "\r\n" "\n" > > let lines = rawCellCode |> SpiralSm.split "\n" > > if lines |> Array.exists (fun line -> line |> SpiralSm.starts_with "#r " && > line |> SpiralSm.ends_with "\"") then > let cancellationToken = defaultArg cancellationToken > System.Threading.CancellationToken.None > let ch, errors = fsi_eval code cancellationToken > match ch with > | Choice1Of2 v -> Ok(v), errors > | Choice2Of2 ex -> Error(ex), errors > else > try > let builderArgs = > lines > |> Array.choose (fun line -> > if line |> SpiralSm.starts_with "///! " > then line |> SpiralSm.split "///! " |> Array.tryItem 1 > else None > ) > > let timeout = > lines > |> Array.tryPick (fun line -> > if line |> SpiralSm.starts_with "//// timeout=" > then line |> SpiralSm.split "=" |> Array.tryItem 1 |> > Option.map int > else None > ) > |> Option.defaultValue (60000 * 60) > > let printCode = > lines > |> Array.tryPick (fun line -> > if line |> SpiralSm.starts_with "//// print_code=" > then line |> SpiralSm.split "=" |> Array.tryItem 1 |> > Option.map ((=) "true") > else None > ) > |> Option.defaultValue false > > let isTrace = > lines > |> Array.tryPick (fun line -> > if line |> SpiralSm.starts_with "//// trace=" > then line |> SpiralSm.split "=" |> Array.tryItem 1 |> > Option.map ((=) "true") > else None > ) > |> Option.defaultValue false > > let oldLevel = get_trace_level () > let traceLevel = > if isTrace > then Verbose > else Info > traceLevel > |> to_trace_level > |> set_trace_level > use _ = (new_disposable (fun () -> > oldLevel |> set_trace_level > )) > > let lastBlock = > lines > |> Array.tryFindBack (fun line -> > line |> String.length > 0 > && line.[[0]] <> ' ' > ) > > let hasMain = > lastBlock > |> Option.exists (fun line -> > line |> SpiralSm.starts_with "inl main " > || line |> SpiralSm.starts_with "let main " > ) > > let cellCode, lastTopLevelIndex = > if hasMain > then rawCellCode, None > else > let lastTopLevelIndex, _ = > (lines |> Array.indexed, (None, false)) > ||> Array.foldBack (fun (i, line) (lastTopLevelIndex, > finished) -> > trace Debug (fun () -> $"i: {i} / line: '{line}' / > lastTopLevelIndex: {lastTopLevelIndex} / finished: {finished}") _locals > match line with > | _ when finished -> lastTopLevelIndex, true > | "" -> lastTopLevelIndex, false > | line when > line |> SpiralSm.starts_with " " > || line |> SpiralSm.starts_with "// " -> > lastTopLevelIndex, false > | line when > line |> SpiralSm.starts_with "open " > || line |> SpiralSm.starts_with "prototype " > || line |> SpiralSm.starts_with "instance " > || line |> SpiralSm.starts_with "type " > || line |> SpiralSm.starts_with "union " > || line |> SpiralSm.starts_with "nominal " -> > lastTopLevelIndex, true > | line when > line |> SpiralSm.starts_with "inl " > || line |> SpiralSm.starts_with "let " -> > let m = > System.Text.RegularExpressions.Regex.Match ( > line, > @"^(inl|let) +([[~\(\w]][[\w\d']]*(?:| > *[[~\w]][[\w\d']]*\)|, *[[~\w]][[\w\d']]*)) +[[:=]](?! +function)" > ) > trace Debug (fun () -> $"m: '{m}' / > m.Groups.Count: {m.Groups.Count}") _locals > if m.Groups.Count = 3 > then Some i, false > else lastTopLevelIndex, true > | _ -> Some i, false > ) > let code = > match lastTopLevelIndex with > | Some lastTopLevelIndex -> > lines > |> Array.mapi (fun i line -> > match i with > | i when i < lastTopLevelIndex -> line > | i when i = lastTopLevelIndex -> $"\nlet main > () =\n {line}" > | _ when line |> SpiralSm.trim = "" -> "" > | _ -> $" {line}" > ) > |> SpiralSm.concat "\n" > | None -> $"{rawCellCode}\n\ninl main () = ()\n" > code, lastTopLevelIndex > > let newAllCode = $"{allCode}\n\n{cellCode}" > > async { > try > let! codeChoice = > newAllCode > |> Supervisor.buildCode timeout cancellationToken > |> Async.catch > |> Async.runWithTimeoutAsync timeout > > match codeChoice with > | Some (Ok (_mainPath, (fsxPath, Some code), spiralErrors)) > -> > let spiralErrors = > mapErrors (Warning, spiralErrors, lastTopLevelIndex) > allCode > let inline _trace (fn : unit -> string) = > if isTrace > then trace Info (fun () -> $"Eval.eval / {fn ()}") > _locals > else fn () |> System.Console.WriteLine > > if printCode > then _trace (fun () -> if builderArgs.Length > 0 then > $".fsx:\n{code}\n" else code) > > let! evalResult = > match builderArgs, lastTopLevelIndex with > | [[||]], _ | _, None -> None |> Async.init > | builderArgs, _ -> async { > let! result = > builderArgs > |> Array.map (fun builderArgs -> async { > let! exitCode, result = > SpiralRuntime.execution_options (fun > x -> > { x with > l0 = cancellationToken > l1 = > $"""{workspaceRoot}/apps/spiral/dist/Eval{SpiralRuntime.get_executable_suffix > ()} --file "{fsxPath}" --args "{builderArgs}" --trace-level %A{traceLevel}""" > l2 = [[| > "AUTOMATION", > assemblyName = "dotnet-repl" |> string > |]] > } > ) > |> > SpiralRuntime.execute_with_options_async > trace Debug (fun () -> $"Eval.eval / > builder / exitCode: {exitCode} / result: {result}") _locals > return > if exitCode = 0 > then result |> Ok > else result |> Error > |> Some > }) > |> Async.Parallel > return > (None, result) > ||> Array.fold (fun acc x -> x) > } > > let cancellationToken = defaultArg cancellationToken > System.Threading.CancellationToken.None > > let fsxResult = > if builderArgs.Length > 0 > then None > else > try > let ch, errors = fsi_eval code > cancellationToken > let errors = > errors > |> Array.map (fun (e1, e2, e3, _) -> > (e1, e2, e3, ("", (0, 0), (0, 0))) > ) > let errors = > if errors |> Array.isEmpty > then errors > else > errors > |> Array.append [[| > TraceLevel.Critical, $"Eval.eval > / fsi_eval error / fsxPath: {fsxPath} / builderArgs: %A{builderArgs} / code: > {code}", 0, ("", (0, 0), (0, 0)) > |]] > Some (ch, errors) > with ex -> > trace Critical (fun () -> $"Eval.eval / ex: > {ex |> SpiralSm.format_exception}") _locals > None > > match fsxResult, evalResult with > | Some (ch, errors), None -> > let errors = errors |> Array.append spiralErrors > match ch with > | Choice1Of2 v -> > allCode <- newAllCode > return Ok(v), errors > | Choice2Of2 ex -> return Error ex, errors > | _, Some result -> > let result, errors = > match result with > | Ok result -> > let result = result |> > FSharp.Json.Json.deserialize<Map<string,string>> > result, [[||]] > | Error error -> > ([[]] |> Map), > [[| > ( > TraceLevel.Critical, error, 0, ("", > (0, 0), (0, 0)) > ) > |]] > > if errors |> Array.isEmpty |> not > then return Error (Exception "Eval.eval / fsx > error"), errors > else > let extension = result.[["extension"]] > if printCode > then _trace (fun () -> > $""".{extension}:{'\n'}{result.[["code"]]}""") > > let output = > result.[["output"]] |> > FSharp.Json.Json.deserialize<Result<string, string>> > match output with > | Error error -> return Error (Exception error), > errors > | Ok output -> > let header = if printCode then > $".{extension} output:\n" else "" > let code = > if printCode > then > $"\"\"\"{header}{output}\n\n\n\"\"\"" > else $"\"\"\"{header}{output}\n\"\"\"" > > let ch, errors2 = fsi_eval code > cancellationToken > let errors = > errors > |> Array.append spiralErrors > |> Array.append errors2 > let errors = > if errors |> Array.isEmpty > then errors > else > errors > |> Array.append [[| > TraceLevel.Critical, $"Eval.eval > / fsi_eval error / fsxPath: {fsxPath} / builderArgs: %A{builderArgs} / code: > {code}", 0, ("", (0, 0), (0, 0)) > |]] > match ch with > | Choice1Of2 v -> > allCode <- newAllCode > return Ok(v), errors > | Choice2Of2 ex -> > return Error ex, errors > | _ -> > let ch, errors = fsi_eval "()" cancellationToken > match ch with > | Choice1Of2 v -> > allCode <- newAllCode > return Ok(v), errors > | Choice2Of2 ex -> > return Error ex, errors > | Some (Ok (_, _, errors)) when errors |> List.isEmpty |> > not -> > return errors.[[0]] |> fst |> Exception |> Error, > mapErrors (TraceLevel.Critical, errors, > lastTopLevelIndex) allCode > | Some (Error ex) -> > trace Critical (fun () -> $"Eval.eval / ex: {ex |> > SpiralSm.format_exception}") _locals > return Error (Exception $"Spiral error or timeout / ex: > {ex |> SpiralSm.format_exception}"), > [[| > ( > TraceLevel.Critical, $"Diag: Spiral error or > timeout / ex: %A{ex}", 0, ("", (0, 0), (0, 0)) > ) > |]] > | _ -> > return Error (Exception "Spiral error or timeout"), > [[| > ( > TraceLevel.Critical, "Diag: Spiral error or > timeout", 0, ("", (0, 0), (0, 0)) > ) > |]] > with ex -> > trace Critical (fun () -> $"Eval.eval / ex: {ex |> > SpiralSm.format_exception}") _locals > return Error (Exception $"Spiral error or timeout (4_) / ex: > {ex |> SpiralSm.format_exception}"), > [[| > ( > TraceLevel.Critical, $"Diag: Spiral error or timeout > (4) / ex: {ex |> SpiralSm.format_exception}", 0, ("", (0, 0), (0, 0)) > ) > |]] > } > |> Async.runWithTimeout timeout > |> Option.defaultValue ( > Error (Exception "Spiral error or timeout (2)"), > [[| > ( > TraceLevel.Critical, "Diag: Spiral error or timeout > (2)", 0, ("", (0, 0), (0, 0)) > ) > |]] > ) > with ex -> > trace Critical (fun () -> $"Eval.eval / ex: {ex |> > SpiralSm.format_exception}") _locals > Error (Exception $"Spiral error or timeout (3) / ex: {ex |> > SpiralSm.format_exception}"), > [[| > ( > TraceLevel.Critical, $"Diag: Spiral error or timeout (3) / > ex: {ex |> SpiralSm.format_exception}", 0, ("", (0, 0), (0, 0)) > ) > |]] > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## run │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let run file args traceLevel = async { > let isTrace = traceLevel = Verbose > let inline _trace (fn : unit -> string) = > if isTrace > then trace Info (fun () -> $"Eval.run / {fn ()}") _locals > else fn () |> System.Console.WriteLine > > let! code = file |> SpiralFileSystem.read_all_text_async > > let hashHex = code |> SpiralCrypto.hash_text > > let workspaceName = "spiral_eval" > > let! fsprojPath = > code > |> Builder.persistCodeProject > [["Fable.Core"]] > [[]] > workspaceName > (hashHex |> Some) > > let projectDir = fsprojPath |> Path.GetDirectoryName > > let workspaceDir = projectDir </> $"../.." > > let cargoTomlPath = projectDir </> $"Cargo.toml" > let workspaceCargoTomlPath = workspaceDir </> $"Cargo.toml" > > let emptyCargoTomlContent () = > let id = System.Random().Next (1000000000, 2000000000) > $"[[package]]\nname = \"spiral_eval_{id}\"\nversion = \"0.0.1\"\nedition > = \"2021\"\n\n[[[[bin]]]]\nname = \"spiral_eval_{id}\"\npath = > \"spiral_eval.rs\"" > > if cargoTomlPath |> File.Exists |> not then > do! emptyCargoTomlContent () |> SpiralFileSystem.write_all_text_exists > cargoTomlPath > > if workspaceCargoTomlPath |> File.Exists |> not then > do! emptyCargoTomlContent () |> SpiralFileSystem.write_all_text_exists > workspaceCargoTomlPath > > let libLinkTargetPath = workspaceRoot </> > "lib/rust/fable/fable_modules/fable-library-rust" > let libLinkPath = projectDir </> $"fable_modules/fable-library-rust" > > if Directory.Exists libLinkTargetPath |> not > then libLinkTargetPath |> Directory.CreateDirectory |> ignore > > libLinkPath |> Path.GetDirectoryName |> Directory.CreateDirectory |> ignore > > let libLinkPathInfo = DirectoryInfo libLinkPath > if libLinkPathInfo.Exists && libLinkPathInfo.LinkTarget = null then > Directory.Delete (libLinkPath, true) > > if libLinkPath |> Directory.Exists |> not then > Directory.CreateSymbolicLink (libLinkPath, libLinkTargetPath) > |> ignore > > let workspaceRootExternal = > let currentDir = > System.IO.Directory.GetCurrentDirectory () > |> SpiralSm.to_lower > let workspaceRoot = workspaceRoot |> SpiralSm.to_lower > if currentDir |> SpiralSm.starts_with workspaceRoot > then None > else Some workspaceRoot > > let! exitCode, spiralBuilderResult = > let command = > let path = > workspaceRoot </> > $@"workspace/target/release/spiral_builder{SpiralRuntime.get_executable_suffix > ()}" > |> System.IO.Path.GetFullPath > $"{path} --trace-level %A{traceLevel} fsharp --path \"{fsprojPath}\" > --package-dir \"{projectDir}\" --args \"{args}\"" > SpiralRuntime.execution_options (fun x -> > { x with > l1 = command > l6 = workspaceRootExternal > } > ) > |> SpiralRuntime.execute_with_options_async > > if exitCode <> 0 then > trace Critical (fun () -> $"Eval.run / spiral_builder / exitCode: > {exitCode} / spiralBuilderResult: {spiralBuilderResult}") _locals > return Some (Error spiralBuilderResult) > else > trace Debug (fun () -> $"Eval.run / spiral_builder / exitCode: > {exitCode} / spiralBuilderResult: {spiralBuilderResult}") _locals > > let! exitCode, dotnetFableResult = > SpiralRuntime.execution_options (fun x -> > { x with > l1 = $"dotnet fable \"{fsprojPath}\" --optimize --lang rs > --extension .rs --outDir \"{projectDir}\"" > l6 = workspaceRootExternal > } > ) > |> SpiralRuntime.execute_with_options_async > |> Async.retryAsync 3 > |> Async.map (Result.defaultWith (fun e -> 1, e)) > > if exitCode <> 0 then > trace Critical (fun () -> $"Eval.run / dotnet fable / exitCode: > {exitCode} / dotnetFableResult: {dotnetFableResult}") _locals > return Some (Error dotnetFableResult) > else > let spiralBuilderResult = > spiralBuilderResult > |> FSharp.Json.Json.deserialize<Map<string, string>> > > let cargoTomlContent = spiralBuilderResult.[["cargo_toml_content"]] > let workspaceCargoTomlContent = > spiralBuilderResult.[["workspace_cargo_toml_content"]] > > do! cargoTomlContent |> SpiralFileSystem.write_all_text_exists > cargoTomlPath > do! workspaceCargoTomlContent |> > SpiralFileSystem.write_all_text_exists workspaceCargoTomlPath > > try > let rangeRsPath = libLinkPath </> "src/Range.rs" > let! text = rangeRsPath |> SpiralFileSystem.read_all_text_async > do! > text > |> SpiralSm.replace "use crate::String_::fromCharCode;" "use > crate::String_::fromChar;" > |> SpiralSm.replace "fromCharCode(c)" > "std::char::from_u32(c).unwrap()" > |> SpiralFileSystem.write_all_text_exists rangeRsPath > with ex -> > trace Debug (fun () -> $"Eval.run / Range.rs error / > cargoFmtResult: {ex |> SpiralSm.format_exception} / spiralBuilderResult: > {spiralBuilderResult}") _locals > > let! exitCode, cargoFmtResult = > async { > > let! exitCode, cargoFmtResult = > SpiralRuntime.execution_options (fun x -> > { x with > l1 = $"cargo fmt --manifest-path > \"{cargoTomlPath}\" --" > l6 = workspaceRootExternal > } > ) > |> SpiralRuntime.execute_with_options_async > > if cargoFmtResult |> SpiralSm.contains "failed to load > manifest for workspace member" |> not > then return exitCode, cargoFmtResult > else > let missingTomlPath = > System.Text.RegularExpressions.Regex.Match > (cargoFmtResult, @"failed to read > `(.*?Cargo.toml)`") > |> fun m -> m.Groups.[[1]].Value > > if missingTomlPath |> File.Exists |> not then > do! emptyCargoTomlContent () |> > SpiralFileSystem.write_all_text_exists missingTomlPath > > return exitCode, cargoFmtResult > } > |> Async.retryAsync 3 > |> Async.map (Result.defaultWith (fun e -> 1, e)) > > if exitCode <> 0 then > trace Critical (fun () -> $"Eval.run / cargo fmt error / > exitCode: {exitCode} / cargoFmtResult: {cargoFmtResult} / spiralBuilderResult: > {spiralBuilderResult}") _locals > > let rsPath = projectDir </> $"{workspaceName}.rs" > let! rsCode = rsPath |> SpiralFileSystem.read_all_text_async > > let mainCodeHeader = "pub fn main() -> Result<(), String> {" > let mainCode = $"{mainCodeHeader} Ok(()) }}" > > let cached = rsCode |> SpiralSm.contains mainCodeHeader > > let rsCode = > if cached > then rsCode > else > rsCode > |> SpiralSm.replace "),);" "));" > |> SpiralSm.replace_regex "\s\sdefaultOf\(\);" " > defaultOf::<()>();" > |> SpiralSm.replace "defaultOf()," > "defaultOf::<std::sync::Arc<dyn IDisposable>>()," > |> SpiralSm.replace "_self_." "self." > |> SpiralSm.replace "get_or_insert_with" "get_or_init" > |> SpiralSm.replace "use > fable_library_rust::System::Collections::Concurrent::ConcurrentStack_1;" "type > ConcurrentStack_1<T> = T;" > |> SpiralSm.replace "use > fable_library_rust::System::Threading::CancellationToken;" "type > CancellationToken = ();" > |> SpiralSm.replace "use > fable_library_rust::System::TimeZoneInfo;" "type TimeZoneInfo = i64;" > |> SpiralSm.replace "use > fable_library_rust::System::Threading::Tasks::TaskCanceledException;" "type > TaskCanceledException = ();" > > if not cached > then do! > $"{rsCode}\n\n{mainCode}\n" > |> SpiralFileSystem.write_all_text_exists rsPath > > let command = $"cargo +nightly run --manifest-path > \"{cargoTomlPath}\"" > let environmentVariables = [[| > struct ("RUSTC_WRAPPER", "sccache") > // "RUSTFLAGS", "-C prefer-dynamic" > "RUSTFLAGS", "-C prefer-dynamic -C strip=symbols -C link-arg=-s > -C debuginfo=0" > // "RUSTFLAGS", "-C prefer-dynamic -C link-arg=-s -C debuginfo=0 > -C strip=symbols" > |]] > let! exitCode, cargoRunResult = > SpiralRuntime.execution_options (fun x -> > { x with > l1 = command > l2 = environmentVariables > l6 = workspaceRootExternal > } > ) > |> SpiralRuntime.execute_with_options_async > > [[ ".d"; ".exe"; ".pdb"; "" ]] > |> List.map (fun ext -> workspaceDir </> > $"target/debug/spiral_builder_{hashHex}{ext}") > |> List.filter File.Exists > |> List.iter File.Delete > > let externalCommand = > let vars = > environmentVariables > |> Array.map (fun struct (k, v) -> $"$env:{k}=''{v}''") > |> String.concat ";" > $"pwsh -c '{vars}; {command}'" > if exitCode = 0 then > let output = > try > cargoRunResult > |> SpiralSm.split "\n" > |> Array.skipWhile (fun line -> > (line |> SpiralSm.contains @"profile [[optimized]] > target" |> not) > && (line |> SpiralSm.contains @"profile > [[unoptimized]] target" |> not) > && (line |> SpiralSm.contains @"profile > [[unoptimized + debuginfo]] target" |> not) > ) > |> Array.skip 2 > |> SpiralSm.concat "\n" > |> Ok > with ex -> > $"ex: {ex} / rsPath: {rsPath} / externalCommand: > {externalCommand} / cargoRunResult: {cargoRunResult} / spiralBuilderResult: > {spiralBuilderResult}" |> Error > > let result = > [[ > "extension", "rs" > "code", rsCode > "output", (output |> FSharp.Json.Json.serialize) > ]] > |> Map > |> FSharp.Json.Json.serialize > |> Ok > |> Some > > return result > else > return Some (Error $"exitCode: {exitCode} / rsPath: {rsPath} / > externalCommand: {externalCommand} / cargoRunResult: {cargoRunResult}") > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Arguments │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > [[<RequireQualifiedAccess>]] > type Arguments = > | [[<Argu.ArguAttributes.ExactlyOnce>]] File of string > | [[<Argu.ArguAttributes.ExactlyOnce>]] Args of string > | [[<Argu.ArguAttributes.Unique>]] Trace_Level of TraceLevel > > interface Argu.IArgParserTemplate with > member s.Usage = > match s with > | File _ -> nameof File > | Args _ -> nameof Args > | Trace_Level _ -> nameof Trace_Level > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () > > ╭─[ 169.50ms - return value ]──────────────────────────────────────────────────╮ > │ "USAGE: dotnet-repl [--help] --file <string> --args <string> │ > │ [--trace-level <verbose|debug|info|warning|critical>] │ > │ │ > │ OPTIONS: │ > │ │ > │ --file <string> File │ > │ --args <string> Args │ > │ --trace-level <verbose|debug|info|warning|critical> │ > │ Trace_Level │ > │ --help display this list of options. │ > │ " │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## main │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let main args = > let argsMap = args |> Runtime.parseArgsMap<Arguments> > > let file = > match argsMap.[[nameof Arguments.File]] with > | [[ Arguments.File file ]] -> file |> Some > | _ -> None > |> Option.get > > let args = > match argsMap.[[nameof Arguments.Args]] with > | [[ Arguments.Args args ]] -> args |> Some > | _ -> None > |> Option.get > > let traceLevel = > match argsMap |> Map.tryFind (nameof Arguments.Trace_Level) with > | Some [[ Arguments.Trace_Level traceLevel ]] -> traceLevel > | _ -> Verbose > > traceLevel |> to_trace_level |> set_trace_level > > async { > let! result = run file args traceLevel > > return > match result with > | Some (Ok result) -> > trace Debug (fun () -> $"Eval.main / result: %A{result}") > _locals > > if traceLevel = Info > then result |> System.Console.WriteLine > 0 > | Some (Error error) -> > trace Critical (fun () -> $"Eval.main / error: %A{error}") > _locals > 1 > | None -> 1 > } > |> Async.runWithTimeout (60000 * 60) > |> Option.defaultValue 1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let args = > System.Environment.GetEnvironmentVariable "ARGS" > |> SpiralRuntime.split_args > |> Seq.toArray > > match args with > | [[||]] -> 0 > | args -> if main args = 0 then 0 else failwith "main failed" > > ╭─[ 102.72ms - return value ]──────────────────────────────────────────────────╮ > │ <div class="dni-plaintext"><pre>0 │ > │ </pre></div><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:47 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 77876 00:00:47 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:49 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb to html 00:00:49 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:49 verbose #7 ! validate(nb) 00:00:51 verbose #8 ! [NbConvertApp] Writing 436983 bytes to c:\home\git\polyglot\apps\spiral\Eval.dib.html 00:00:52 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 641 00:00:52 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 641 00:00:52 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Eval.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Eval.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:52 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:52 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:53 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 78576 00:00:00 debug #1 writeDibCode / output: Fs / path: Eval.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Eval.dib 00:00:00 debug #1 persistCodeProject / packages: [Argu; FSharp.Control.AsyncSeq; FSharp.Json; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: Eval / hash: / code.Length: 43612 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj 00:00:00 debug #1 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Eval\Eval.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime linux-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Eval") 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj (in 434 ms). 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj] 00:00:19 verbose #6 > Eval -> C:\home\git\polyglot\target\polyglot\builder\Eval\bin\Release\net9.0\linux-x64\Eval.dll 00:00:21 verbose #7 > Eval -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:21 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 667 00:00:21 debug #9 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Eval\Eval.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime win-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Eval") 00:00:21 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:22 verbose #11 > Determining projects to restore... 00:00:23 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj (in 435 ms). 00:00:23 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj] 00:00:40 verbose #14 > Eval -> C:\home\git\polyglot\target\polyglot\builder\Eval\bin\Release\net9.0\win-x64\Eval.dll 00:00:44 verbose #15 > Eval -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:44 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 665
In [ ]:
{ pwsh ../apps/spiral/builder/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../../workspace/target/release/spiral_builder.exe dib --path spiral_builder.dib",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "spiral_builder.dib"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib" --output-path "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:04 verbose #10 > >
00:00:04 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:04 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:04 verbose #13 > > │ # spiral_builder │
00:00:04 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:04 verbose #15 > >
00:00:04 verbose #16 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:04 verbose #17 > > open file_system_operators
00:00:04 verbose #18 > > open rust_operators
00:00:04 verbose #19 > > open sm'_operators
00:00:04 verbose #20 > >
00:00:04 verbose #21 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:00:04 verbose #22 > > #r
00:00:04 verbose #23 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #24 > > otNet.Interactive.Spiral.dll"
00:00:04 verbose #25 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:00:04 verbose #26 > > #r
00:00:04 verbose #27 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #28 > > otNet.Interactive.dll"
00:00:04 verbose #29 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:09 verbose #30 > 00:00:08 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dbd4e241eb2e3e9a3661143aea0c86fecd75762a2bbbb339087b494077d89a25/main.spi
00:00:13 verbose #31 > >
00:00:13 verbose #32 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #33 > > //// test
00:00:13 verbose #34 > >
00:00:13 verbose #35 > > open testing
00:00:13 verbose #36 > 00:00:12 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c12ae2a75395e39b3def498de22659301f7a6ea52c622d4d10338cc3c8e9ec7c/main.spi
00:00:13 verbose #37 > >
00:00:13 verbose #38 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #39 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #40 > > │ ## types │
00:00:13 verbose #41 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #42 > >
00:00:13 verbose #43 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #44 > > inl types () =
00:00:13 verbose #45 > > env.types ()
00:00:13 verbose #46 > > file_system.types ()
00:00:13 verbose #47 > > runtime.types ()
00:00:13 verbose #48 > > rust.types ()
00:00:13 verbose #49 > > sm'.types ()
00:00:14 verbose #50 > 00:00:13 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/248bb57b697d1996f0f5b37eacf3016b68495eaea753490679abc947ca2c54e0/main.spi
00:00:14 verbose #51 > >
00:00:14 verbose #52 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #53 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #54 > > │ ## get_args │
00:00:14 verbose #55 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #56 > >
00:00:14 verbose #57 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #58 > > inl get_args () =
00:00:14 verbose #59 > > {
00:00:14 verbose #60 > > fsharp = "fsharp", {
00:00:14 verbose #61 > > path = "path", 'p'
00:00:14 verbose #62 > > package_dir = "package-dir", 'd'
00:00:14 verbose #63 > > args = "args", 'a'
00:00:14 verbose #64 > > }
00:00:14 verbose #65 > > rust = "rust", {
00:00:14 verbose #66 > > deps = "deps", 'd'
00:00:14 verbose #67 > > }
00:00:14 verbose #68 > > dib = "dib", {
00:00:14 verbose #69 > > path = "path", 'p'
00:00:14 verbose #70 > > retries = "retries", 'r'
00:00:14 verbose #71 > > working_directory = "working_directory", 'w'
00:00:14 verbose #72 > > }
00:00:14 verbose #73 > > trace_level = "trace-level", 't'
00:00:14 verbose #74 > > }
00:00:15 verbose #75 > 00:00:14 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/593afbb11cca96ec6417edf5e45d43bd8af78080f0b3511c80eab5f14319c72d/main.spi
00:00:15 verbose #76 > >
00:00:15 verbose #77 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 verbose #78 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 verbose #79 > > │ ## get_command │
00:00:15 verbose #80 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 verbose #81 > >
00:00:15 verbose #82 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 verbose #83 > > let get_command () =
00:00:15 verbose #84 > > ##"command"
00:00:15 verbose #85 > > |> runtime.new_command
00:00:15 verbose #86 > > |> runtime.command_init_arg (get_args () .trace_level) (
00:00:15 verbose #87 > > real runtime.arg_union `trace_level ignore
00:00:15 verbose #88 > > )
00:00:15 verbose #89 > > |> runtime.command_subcommand_required true
00:00:15 verbose #90 > > |> runtime.command_subcommand (
00:00:15 verbose #91 > > ##(get_args () .fsharp |> fst)
00:00:15 verbose #92 > > |> runtime.new_command
00:00:15 verbose #93 > > |> runtime.command_init_arg ((get_args () .fsharp |> snd).path) (
00:00:15 verbose #94 > > runtime.arg_required true
00:00:15 verbose #95 > > )
00:00:15 verbose #96 > > |> runtime.command_init_arg ((get_args () .fsharp |> snd).package_dir) (
00:00:15 verbose #97 > > runtime.arg_required true
00:00:15 verbose #98 > > )
00:00:15 verbose #99 > > |> runtime.command_init_arg ((get_args () .fsharp |> snd).args) (
00:00:15 verbose #100 > > id
00:00:15 verbose #101 > > )
00:00:15 verbose #102 > > )
00:00:15 verbose #103 > > |> runtime.command_subcommand (
00:00:15 verbose #104 > > ##(get_args () .rust |> fst)
00:00:15 verbose #105 > > |> runtime.new_command
00:00:15 verbose #106 > > |> runtime.command_init_arg ((get_args () .rust |> snd).deps) (
00:00:15 verbose #107 > > runtime.arg_value_names ;[[ ##"NAME"; ##"VERSION" ]]
00:00:15 verbose #108 > > >> runtime.arg_num_args_range (
00:00:15 verbose #109 > > runtime.new_value_range
00:00:15 verbose #110 > > (am'.Start (1i32 |> convert : unativeint))
00:00:15 verbose #111 > > (am'.End id)
00:00:15 verbose #112 > > )
00:00:15 verbose #113 > > >> runtime.arg_action runtime.Append
00:00:15 verbose #114 > > )
00:00:15 verbose #115 > > )
00:00:15 verbose #116 > > |> runtime.command_subcommand (
00:00:15 verbose #117 > > ##(get_args () .dib |> fst)
00:00:15 verbose #118 > > |> runtime.new_command
00:00:15 verbose #119 > > |> runtime.command_init_arg ((get_args () .dib |> snd).path) (
00:00:15 verbose #120 > > runtime.arg_required true
00:00:15 verbose #121 > > // >> runtime.arg_value_parser (runtime.value_parser_path_buf ())
00:00:15 verbose #122 > > )
00:00:15 verbose #123 > > |> runtime.command_init_arg ((get_args () .dib |> snd).retries) (
00:00:15 verbose #124 > > runtime.arg_value_parser (runtime.value_parser_expr "u8")
00:00:15 verbose #125 > > )
00:00:15 verbose #126 > > |> runtime.command_init_arg ((get_args () .dib |>
00:00:15 verbose #127 > > snd).working_directory) (
00:00:15 verbose #128 > > id
00:00:15 verbose #129 > > )
00:00:15 verbose #130 > > )
00:00:15 verbose #131 > 00:00:14 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4cd437bd0f61e5a09bab93b49d085e05a957e61ac8e754f28a25d5b11dff2b20/main.spi
00:00:15 verbose #132 > >
00:00:15 verbose #133 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 verbose #134 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 verbose #135 > > │ ## get_workspace_cargo_toml_content │
00:00:15 verbose #136 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 verbose #137 > >
00:00:15 verbose #138 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 verbose #139 > > inl get_workspace_cargo_toml_content () : string =
00:00:15 verbose #140 > > $'$"""[[workspace]]\nresolver = "2"\nmembers =
00:00:15 verbose #141 > > [["packages/*"]]\n\n[[workspace.dependencies]]\nfable_library_rust = {{ path =
00:00:15 verbose #142 > > \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\",
00:00:15 verbose #143 > > default-features = false, features = [[\"static_do_bindings\", \"datetime\",
00:00:15 verbose #144 > > \"guid\", \"threaded\"]] }}\ninline_colorization = \"~0.1\"\n\n"""'
00:00:16 verbose #145 > 00:00:15 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e69a038f142ce25cf66fc2312ba2a6992b21f657c4e16524c542fab87deba1f1/main.spi
00:00:16 verbose #146 > >
00:00:16 verbose #147 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 verbose #148 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 verbose #149 > > │ ## get_cargo_toml_content │
00:00:16 verbose #150 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 verbose #151 > >
00:00:16 verbose #152 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 verbose #153 > > inl get_cargo_toml_content { hash deps } : string =
00:00:16 verbose #154 > > $'$"""[[package]]\nname = \"spiral_builder_{!hash}\"\nversion =
00:00:16 verbose #155 > > "0.0.1"\nedition = "2021"\n\n[[dependencies]]\nfable_library_rust = {{ workspace
00:00:16 verbose #156 > > = true }}\ninline_colorization = {{ workspace = true
00:00:16 verbose #157 > > }}\n{!deps}\n\n[[[[bin]]]]\nname = \"spiral_builder_{!hash}\"\npath =
00:00:16 verbose #158 > > \"spiral_eval.rs\" """'
00:00:17 verbose #159 > 00:00:16 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/69ee59be36642b70e22b7a598cb5cbe69d866fadf3f4dfc2acc1773b1af0c77e/main.spi
00:00:17 verbose #160 > >
00:00:17 verbose #161 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 verbose #162 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 verbose #163 > > │ ## process_dib │
00:00:17 verbose #164 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 verbose #165 > >
00:00:17 verbose #166 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 verbose #167 > > inl process_dib { path retries working_directory } =
00:00:17 verbose #168 > > inl exit_code, repl_result =
00:00:17 verbose #169 > > let rec loop retry =
00:00:17 verbose #170 > > inl exit_code, repl_result =
00:00:17 verbose #171 > > runtime.execution_options fun x => { x with
00:00:17 verbose #172 > > command = $'$"dotnet repl --exit-after-run --run
00:00:17 verbose #173 > > \\\"{!path}\\\" --output-path \\\"{!path}.ipynb\\\""'
00:00:17 verbose #174 > > environment_variables = ;[[ "AUTOMATION", "True" ]]
00:00:17 verbose #175 > > trace = false
00:00:17 verbose #176 > > working_directory
00:00:17 verbose #177 > > }
00:00:17 verbose #178 > > |> runtime.execute_with_options
00:00:17 verbose #179 > >
00:00:17 verbose #180 > > if exit_code = 0 || retry >= retries
00:00:17 verbose #181 > > then exit_code, repl_result
00:00:17 verbose #182 > > else
00:00:17 verbose #183 > > trace Debug
00:00:17 verbose #184 > > fun () => $'"spiral_builder.run / repl error"'
00:00:17 verbose #185 > > fun () => $'$"exit_code: {!exit_code} / retry:
00:00:17 verbose #186 > > {!retry}/{!retries} / repl_result: {!repl_result} / {!_locals ()}"'
00:00:17 verbose #187 > > loop (retry + 1)
00:00:17 verbose #188 > > loop 1
00:00:17 verbose #189 > >
00:00:17 verbose #190 > > inl exit_code, result =
00:00:17 verbose #191 > > if exit_code <>. 0
00:00:17 verbose #192 > > then exit_code, repl_result
00:00:17 verbose #193 > > else
00:00:17 verbose #194 > > inl exit_code, jupyter_result =
00:00:17 verbose #195 > > runtime.execution_options fun x => { x with
00:00:17 verbose #196 > > command = $'$"jupyter nbconvert \\\"{!path}.ipynb\\\" --to
00:00:17 verbose #197 > > html --HTMLExporter.theme=dark"'
00:00:17 verbose #198 > > }
00:00:17 verbose #199 > > |> runtime.execute_with_options
00:00:17 verbose #200 > >
00:00:17 verbose #201 > > trace Debug
00:00:17 verbose #202 > > fun () => $'"spiral_builder.run / dib / jupyter nbconvert"'
00:00:17 verbose #203 > > fun () => $'$"exit_code: {!exit_code} / jupyter_result.Length:
00:00:17 verbose #204 > > {!jupyter_result.Length} / {!_locals ()}"'
00:00:17 verbose #205 > >
00:00:17 verbose #206 > > if exit_code <>. 0
00:00:17 verbose #207 > > then exit_code, $'$"repl_result: {!repl_result}\n\njupyter_result:
00:00:17 verbose #208 > > {!jupyter_result}"'
00:00:17 verbose #209 > > else
00:00:17 verbose #210 > > inl exit_code, pwsh_replace_html_result =
00:00:17 verbose #211 > > inl path = path |> sm'.replace "'" "''"
00:00:17 verbose #212 > > runtime.execution_options fun x => { x with
00:00:17 verbose #213 > > command = $'$"pwsh -c \\\"$counter = 1; $path =
00:00:17 verbose #214 > > \'{!path}.html\'; (Get-Content $path -Raw) -replace
00:00:17 verbose #215 > > \'(id=\\\\\\"cell-id=)[[a-fA-F0-9]]{{8}}\', {{ $_.Groups[[1]].Value + $counter++
00:00:17 verbose #216 > > }} | Set-Content $path\\\""'
00:00:17 verbose #217 > > }
00:00:17 verbose #218 > > |> runtime.execute_with_options
00:00:17 verbose #219 > >
00:00:17 verbose #220 > > trace Debug
00:00:17 verbose #221 > > fun () => $'"spiral_builder.run / dib / html cell ids"'
00:00:17 verbose #222 > > fun () => $'$"exit_code: {!exit_code}
00:00:17 verbose #223 > > pwsh_replace_html_result.Length: {!pwsh_replace_html_result.Length} / {!_locals
00:00:17 verbose #224 > > ()}"'
00:00:17 verbose #225 > >
00:00:17 verbose #226 > > $'$"{!path}.html"'
00:00:17 verbose #227 > > |> file_system.read_all_text
00:00:17 verbose #228 > > |> sm'.replace "\r\n" "\n"
00:00:17 verbose #229 > > |> file_system.write_all_text $'$"{!path}.html"'
00:00:17 verbose #230 > >
00:00:17 verbose #231 > > $'$"{!path}.ipynb"'
00:00:17 verbose #232 > > |> file_system.read_all_text
00:00:17 verbose #233 > > |> sm'.replace "\\r\\n" "\\n"
00:00:17 verbose #234 > > |> file_system.write_all_text $'$"{!path}.ipynb"'
00:00:17 verbose #235 > >
00:00:17 verbose #236 > > exit_code, $'$"repl_result: {!repl_result}\n\njupyter_result:
00:00:17 verbose #237 > > {!jupyter_result}\n\npwsh_replace_html_result: {!pwsh_replace_html_result}"'
00:00:17 verbose #238 > >
00:00:17 verbose #239 > > trace Debug
00:00:17 verbose #240 > > fun () => $'"spiral_builder.run / dib"'
00:00:17 verbose #241 > > fun () => $'$"exit_code: {!exit_code} / result.Length: {!result.Length}
00:00:17 verbose #242 > > / {!_locals ()}"'
00:00:17 verbose #243 > >
00:00:17 verbose #244 > > if exit_code <>. 0
00:00:17 verbose #245 > > then failwith $'$"spiral_builder.run / dib / exit_code: {!exit_code}
00:00:17 verbose #246 > > result: {!result} / {!_locals ()}"'
00:00:17 verbose #247 > > ;[[
00:00:17 verbose #248 > > "stdio",
00:00:17 verbose #249 > > result
00:00:17 verbose #250 > > ]]
00:00:17 verbose #251 > 00:00:16 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f2303205d655ca1e3affbec9e3f0bd10ab4ea34a166d4ce9342796c026f97fa4/main.spi
00:00:18 verbose #252 > >
00:00:18 verbose #253 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 verbose #254 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 verbose #255 > > │ ## process_fsharp │
00:00:18 verbose #256 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 verbose #257 > >
00:00:18 verbose #258 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 verbose #259 > > inl process_fsharp { path package_dir deps } =
00:00:18 verbose #260 > > inl path = path |> file_system.get_full_path
00:00:18 verbose #261 > > inl package_dir = package_dir |> file_system.get_full_path
00:00:18 verbose #262 > > inl hash = package_dir |> file_system.get_file_name
00:00:18 verbose #263 > >
00:00:18 verbose #264 > > inl deps =
00:00:18 verbose #265 > > deps
00:00:18 verbose #266 > > |> am'.vec_map fun dep =>
00:00:18 verbose #267 > > inl dep = dep |> sm'.from_std_string
00:00:18 verbose #268 > > if dep |> sm'.contains "="
00:00:18 verbose #269 > > then dep
00:00:18 verbose #270 > > else $'$"{!dep}=\\"*\\""'
00:00:18 verbose #271 > > |> am'.from_vec
00:00:18 verbose #272 > > |> fun x => x : _ i32 _
00:00:18 verbose #273 > > |> seq.of_array'
00:00:18 verbose #274 > > |> sm'.concat "\n"
00:00:18 verbose #275 > >
00:00:18 verbose #276 > > ;[[
00:00:18 verbose #277 > > "cargo_toml_content",
00:00:18 verbose #278 > > get_cargo_toml_content { hash deps }
00:00:18 verbose #279 > >
00:00:18 verbose #280 > > "workspace_cargo_toml_content",
00:00:18 verbose #281 > > get_workspace_cargo_toml_content ()
00:00:18 verbose #282 > > ]]
00:00:18 verbose #283 > 00:00:17 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bf0edce62085b3f5b150e9bbaf76559d22627cca1dc4176807bca99d89579d7c/main.spi
00:00:18 verbose #284 > >
00:00:18 verbose #285 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 verbose #286 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 verbose #287 > > │ ## run │
00:00:18 verbose #288 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 verbose #289 > >
00:00:18 verbose #290 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 verbose #291 > > let rec run (matches : runtime.arg_matches) : async.future_pin (resultm.result'
00:00:18 verbose #292 > > string string) =
00:00:18 verbose #293 > > fun () =>
00:00:18 verbose #294 > > match matches |> runtime.matches_subcommand |> optionm'.unbox with
00:00:18 verbose #295 > > | Some (subcommand, arg_matches)
00:00:18 verbose #296 > > when sm'.from_std_string subcommand = (get_args () .fsharp |>
00:00:18 verbose #297 > > fst) =>
00:00:18 verbose #298 > > inl path =
00:00:18 verbose #299 > > arg_matches
00:00:18 verbose #300 > > |> runtime.matches_get_one ((get_args () .fsharp |> snd).path |>
00:00:18 verbose #301 > > fst)
00:00:18 verbose #302 > > |> optionm'.unbox
00:00:18 verbose #303 > > |> optionm.value
00:00:18 verbose #304 > > |> sm'.from_std_string
00:00:18 verbose #305 > >
00:00:18 verbose #306 > > inl package_dir =
00:00:18 verbose #307 > > arg_matches
00:00:18 verbose #308 > > |> runtime.matches_get_one ((get_args () .fsharp |>
00:00:18 verbose #309 > > snd).package_dir |> fst)
00:00:18 verbose #310 > > |> optionm'.unbox
00:00:18 verbose #311 > > |> optionm.value
00:00:18 verbose #312 > > |> sm'.from_std_string
00:00:18 verbose #313 > >
00:00:18 verbose #314 > > inl args =
00:00:18 verbose #315 > > arg_matches
00:00:18 verbose #316 > > |> runtime.matches_get_one ((get_args () .fsharp |> snd).args |>
00:00:18 verbose #317 > > fst)
00:00:18 verbose #318 > > |> optionm'.unbox
00:00:18 verbose #319 > > |> optionm.map sm'.from_std_string
00:00:18 verbose #320 > >
00:00:18 verbose #321 > > inl result =
00:00:18 verbose #322 > > match args with
00:00:18 verbose #323 > > | Some args =>
00:00:18 verbose #324 > > get_command ()
00:00:18 verbose #325 > > |> runtime.command_get_matches_from ($'$"_ {!args}"' |>
00:00:18 verbose #326 > > runtime.split_args)
00:00:18 verbose #327 > > |> run
00:00:18 verbose #328 > > |> async.block_on
00:00:18 verbose #329 > > |> resultm.unwrap'
00:00:18 verbose #330 > > | None => "{}"
00:00:18 verbose #331 > > |> sm'.deserialize
00:00:18 verbose #332 > > |> resultm.unwrap'
00:00:18 verbose #333 > >
00:00:18 verbose #334 > > inl deps =
00:00:18 verbose #335 > > result
00:00:18 verbose #336 > > |> mapm.get ("deps" |> sm'.to_std_string)
00:00:18 verbose #337 > > |> optionm'.unwrap
00:00:18 verbose #338 > > |> sm'.from_std_string
00:00:18 verbose #339 > > |> sm'.deserialize
00:00:18 verbose #340 > > |> resultm.unwrap'
00:00:18 verbose #341 > >
00:00:18 verbose #342 > > process_fsharp { path package_dir deps }
00:00:18 verbose #343 > >
00:00:18 verbose #344 > > | Some (subcommand, arg_matches)
00:00:18 verbose #345 > > when sm'.from_std_string subcommand = (get_args () .rust |> fst)
00:00:18 verbose #346 > > =>
00:00:18 verbose #347 > > inl deps : am'.vec sm'.std_string =
00:00:18 verbose #348 > > arg_matches
00:00:18 verbose #349 > > |> runtime.matches_get_many ((get_args () .rust |> snd).deps |>
00:00:18 verbose #350 > > fst)
00:00:18 verbose #351 > > |> optionm'.unbox
00:00:18 verbose #352 > > |> optionm'.default_value (;[[]] |> am'.to_vec)
00:00:18 verbose #353 > >
00:00:18 verbose #354 > > ;[[
00:00:18 verbose #355 > > "deps",
00:00:18 verbose #356 > > deps |> sm'.serialize |> resultm.unwrap' |> sm'.from_std_string
00:00:18 verbose #357 > > ]]
00:00:18 verbose #358 > >
00:00:18 verbose #359 > > | Some (subcommand, arg_matches)
00:00:18 verbose #360 > > when sm'.from_std_string subcommand = (get_args () .dib |> fst)
00:00:18 verbose #361 > > =>
00:00:18 verbose #362 > > inl path =
00:00:18 verbose #363 > > arg_matches
00:00:18 verbose #364 > > |> runtime.matches_get_one ((get_args () .dib |> snd).path |>
00:00:18 verbose #365 > > fst)
00:00:18 verbose #366 > > |> optionm'.map'' (
00:00:18 verbose #367 > > sm'.from_std_string
00:00:18 verbose #368 > > >> file_system.absolute_path
00:00:18 verbose #369 > > )
00:00:18 verbose #370 > > |> optionm'.unwrap
00:00:18 verbose #371 > >
00:00:18 verbose #372 > > inl retries =
00:00:18 verbose #373 > > arg_matches
00:00:18 verbose #374 > > |> runtime.matches_get_one ((get_args () .dib |> snd).retries |>
00:00:18 verbose #375 > > fst)
00:00:18 verbose #376 > > |> optionm'.default_value' 1u8
00:00:18 verbose #377 > >
00:00:18 verbose #378 > > inl working_directory : optionm'.option' string =
00:00:18 verbose #379 > > arg_matches
00:00:18 verbose #380 > > |> runtime.matches_get_one ((get_args () .dib |>
00:00:18 verbose #381 > > snd).working_directory |> fst)
00:00:18 verbose #382 > >
00:00:18 verbose #383 > > process_dib { path retries working_directory }
00:00:18 verbose #384 > >
00:00:18 verbose #385 > > | Some (subcommand, arg_matches) =>
00:00:18 verbose #386 > > trace Debug
00:00:18 verbose #387 > > fun () => $'"spiral_builder.run"'
00:00:18 verbose #388 > > fun () => $'$"subcommand: {!subcommand} / {!_locals ()}"'
00:00:18 verbose #389 > >
00:00:18 verbose #390 > > ;[[]]
00:00:18 verbose #391 > > | _ => ;[[]]
00:00:18 verbose #392 > > |> am'.to_vec
00:00:18 verbose #393 > > |> am'.vec_map' fun k, v =>
00:00:18 verbose #394 > > new_pair (sm'.to_std_string k) (sm'.to_std_string v)
00:00:18 verbose #395 > > |> mapm.b_tree_map_from_vec_pairs
00:00:18 verbose #396 > > |> sm'.serialize
00:00:18 verbose #397 > > |> resultm.map_error' (sm'.format' >> sm'.from_std_string)
00:00:18 verbose #398 > > |> resultm.map' sm'.from_std_string
00:00:18 verbose #399 > > |> async.future_init (3, 2) 1
00:00:19 verbose #400 > 00:00:18 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6765e51f83249a315dd31063bd3dc079ae4a49ccc976859ae41b5887c88c4876/main.spi
00:00:19 verbose #401 > >
00:00:19 verbose #402 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 verbose #403 > > //// test
00:00:19 verbose #404 > > ///! rust -d clap encoding_rs encoding_rs_io futures futures-lite regex
00:00:19 verbose #405 > > serde_json
00:00:19 verbose #406 > >
00:00:19 verbose #407 > > types ()
00:00:19 verbose #408 > > get_command ()
00:00:19 verbose #409 > > |> runtime.command_get_matches_from ($'$"_ fsharp -p p -d d -a rust"' |>
00:00:19 verbose #410 > > runtime.split_args)
00:00:19 verbose #411 > > |> run
00:00:19 verbose #412 > > |> async.block_on
00:00:19 verbose #413 > > |> resultm.unwrap'
00:00:19 verbose #414 > > |> _assert_eq (
00:00:19 verbose #415 > > ;[[
00:00:19 verbose #416 > > "cargo_toml_content",
00:00:19 verbose #417 > > get_cargo_toml_content { hash = "d"; deps = "" }
00:00:19 verbose #418 > >
00:00:19 verbose #419 > > "workspace_cargo_toml_content",
00:00:19 verbose #420 > > get_workspace_cargo_toml_content ()
00:00:19 verbose #421 > > ]]
00:00:19 verbose #422 > > |> am'.to_vec
00:00:19 verbose #423 > > |> am'.vec_map' fun k, v =>
00:00:19 verbose #424 > > new_pair (sm'.to_std_string k) (sm'.to_std_string v)
00:00:19 verbose #425 > > |> mapm.b_tree_map_from_vec_pairs
00:00:19 verbose #426 > > |> sm'.serialize
00:00:19 verbose #427 > > |> resultm.unwrap'
00:00:19 verbose #428 > > |> sm'.from_std_string
00:00:19 verbose #429 > > )
00:00:20 verbose #430 > 00:00:19 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/58f04283e1a843d46bd4201868fc02a4699c228af180ea37ae49a844cfde8e25/main.spi
00:00:32 verbose #431 > >
00:00:32 verbose #432 > > ╭─[ 13.39s - return value ]────────────────────────────────────────────────────╮
00:00:32 verbose #433 > > │ assert_eq / actual: "{"cargo_toml_content":"[package]\nname = │
00:00:32 verbose #434 > > │ \"spiral_builder_d\"\nversion = \"0.0.1\"\nedition = \"2021\"\n\n[ │
00:00:32 verbose #435 > > │ dependencies]\nfable_library_rust = { workspace = true │
00:00:32 verbose #436 > > │ }\ninline_colorization = { workspace = true }\n\n\n[[bin]]\nname = │
00:00:32 verbose #437 > > │ \"spiral_builder_d\"\npath = \"spiral_eval.rs\" │
00:00:32 verbose #438 > > │ ","workspace_cargo_toml_content":"[workspace]\nresolver = \"2\"\nmembers = [ │
00:00:32 verbose #439 > > │ \"packages/*\"]\n\n[workspace.dependencies]\nfable_library_rust = { path = │
00:00:32 verbose #440 > > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:00:32 verbose #441 > > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:00:32 verbose #442 > > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" / expected: │
00:00:32 verbose #443 > > │ "{"cargo_toml_content":"[package]\nname = \"spiral_builder_d\"\nversion = │
00:00:32 verbose #444 > > │ \"0.0.1\"\nedition = \"2021\"\n\n[dependencies]\nfable_library_rust = { │
00:00:32 verbose #445 > > │ workspace = true }\ninline_colorization = { workspace = true }\n\n\n[[ │
00:00:32 verbose #446 > > │ bin]]\nname = \"spiral_builder_d\"\npath = \"spiral_eval.rs\" │
00:00:32 verbose #447 > > │ ","workspace_cargo_toml_content":"[workspace]\nresolver = \"2\"\nmembers = [ │
00:00:32 verbose #448 > > │ \"packages/*\"]\n\n[workspace.dependencies]\nfable_library_rust = { path = │
00:00:32 verbose #449 > > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:00:32 verbose #450 > > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:00:32 verbose #451 > > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" │
00:00:32 verbose #452 > > │ │
00:00:32 verbose #453 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 verbose #454 > >
00:00:32 verbose #455 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:32 verbose #456 > > //// test
00:00:32 verbose #457 > > ///! rust -d clap encoding_rs encoding_rs_io futures futures-lite regex
00:00:32 verbose #458 > > serde_json
00:00:32 verbose #459 > >
00:00:32 verbose #460 > > types ()
00:00:32 verbose #461 > > get_command ()
00:00:32 verbose #462 > > |> runtime.command_get_matches_from ($'$"_ fsharp -p p -d d -a \\\"rust --deps a
00:00:32 verbose #463 > > b=\'1\'\\\""' |> runtime.split_args)
00:00:32 verbose #464 > > |> run
00:00:32 verbose #465 > > |> async.block_on
00:00:32 verbose #466 > > |> resultm.unwrap'
00:00:32 verbose #467 > > |> _assert_eq (
00:00:32 verbose #468 > > ;[[
00:00:32 verbose #469 > > "cargo_toml_content",
00:00:32 verbose #470 > > get_cargo_toml_content { hash = "d"; deps = "a=\"*\"\nb=\'1\'" }
00:00:32 verbose #471 > >
00:00:32 verbose #472 > > "workspace_cargo_toml_content",
00:00:32 verbose #473 > > get_workspace_cargo_toml_content ()
00:00:32 verbose #474 > > ]]
00:00:32 verbose #475 > > |> am'.to_vec
00:00:32 verbose #476 > > |> am'.vec_map' fun k, v =>
00:00:32 verbose #477 > > new_pair (sm'.to_std_string k) (sm'.to_std_string v)
00:00:32 verbose #478 > > |> mapm.b_tree_map_from_vec_pairs
00:00:32 verbose #479 > > |> sm'.serialize
00:00:32 verbose #480 > > |> resultm.unwrap'
00:00:32 verbose #481 > > |> sm'.from_std_string
00:00:32 verbose #482 > > )
00:00:33 verbose #483 > 00:00:32 debug #15 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1dd0732d0b9902615916be155068a327456e5ffbc9b0f51dc2fee1f7bf224a6d/main.spi
00:00:42 verbose #484 > >
00:00:42 verbose #485 > > ╭─[ 9.44s - return value ]─────────────────────────────────────────────────────╮
00:00:42 verbose #486 > > │ assert_eq / actual: "{"cargo_toml_content":"[package]\nname = │
00:00:42 verbose #487 > > │ \"spiral_builder_d\"\nversion = \"0.0.1\"\nedition = \"2021\"\n\n[ │
00:00:42 verbose #488 > > │ dependencies]\nfable_library_rust = { workspace = true │
00:00:42 verbose #489 > > │ }\ninline_colorization = { workspace = true }\na=\"*\"\nb='1'\n\n[[ │
00:00:42 verbose #490 > > │ bin]]\nname = \"spiral_builder_d\"\npath = \"spiral_eval.rs\" │
00:00:42 verbose #491 > > │ ","workspace_cargo_toml_content":"[workspace]\nresolver = \"2\"\nmembers = [ │
00:00:42 verbose #492 > > │ \"packages/*\"]\n\n[workspace.dependencies]\nfable_library_rust = { path = │
00:00:42 verbose #493 > > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:00:42 verbose #494 > > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:00:42 verbose #495 > > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" / expected: │
00:00:42 verbose #496 > > │ "{"cargo_toml_content":"[package]\nname = \"spiral_builder_d\"\nversion = │
00:00:42 verbose #497 > > │ \"0.0.1\"\nedition = \"2021\"\n\n[dependencies]\nfable_library_rust = { │
00:00:42 verbose #498 > > │ workspace = true }\ninline_colorization = { workspace = true │
00:00:42 verbose #499 > > │ }\na=\"*\"\nb='1'\n\n[[bin]]\nname = \"spiral_builder_d\"\npath = │
00:00:42 verbose #500 > > │ \"spiral_eval.rs\" ","workspace_cargo_toml_content":"[workspace]\nresolver = │
00:00:42 verbose #501 > > │ \"2\"\nmembers = [\"packages/*\"]\n\n[ │
00:00:42 verbose #502 > > │ workspace.dependencies]\nfable_library_rust = { path = │
00:00:42 verbose #503 > > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:00:42 verbose #504 > > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:00:42 verbose #505 > > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" │
00:00:42 verbose #506 > > │ │
00:00:42 verbose #507 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 verbose #508 > >
00:00:42 verbose #509 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:42 verbose #510 > > //// test
00:00:42 verbose #511 > > ///! rust -d chrono clap encoding_rs encoding_rs_io futures futures-lite regex
00:00:42 verbose #512 > > serde_json
00:00:42 verbose #513 > >
00:00:42 verbose #514 > > types ()
00:00:42 verbose #515 > > inl temp_folder, disposable = file_system.create_temp_directory ()
00:00:42 verbose #516 > > inl file_name = "test.dib"
00:00:42 verbose #517 > > inl path = temp_folder </> file_name |> file_system.normalize_path
00:00:42 verbose #518 > >
00:00:42 verbose #519 > > "#!meta\n\n{\"kernelInfo\":{\"defaultKernelName\":\"fsharp\",\"items\":[[]]}}\n\
00:00:42 verbose #520 > > n#!fsharp\n\n3 - 6"
00:00:42 verbose #521 > > |> file_system.write_all_text path
00:00:42 verbose #522 > >
00:00:42 verbose #523 > > get_command ()
00:00:42 verbose #524 > > |> runtime.command_get_matches_from ($'$"_ dib -p {!path}"' |>
00:00:42 verbose #525 > > runtime.split_args)
00:00:42 verbose #526 > > |> run
00:00:42 verbose #527 > > |> async.block_on
00:00:42 verbose #528 > > |> resultm.unwrap'
00:00:42 verbose #529 > > |> __assert_string_contains false "<pre>-3 "
00:00:42 verbose #530 > >
00:00:42 verbose #531 > > $'$"{!path}.html"'
00:00:42 verbose #532 > > |> file_system.read_all_text
00:00:42 verbose #533 > > |> __assert_string_contains false "\"cell-id=1\""
00:00:42 verbose #534 > >
00:00:42 verbose #535 > > disposable |> use |> ignore
00:00:42 verbose #536 > 00:00:41 debug #16 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7ab26d471dbeb1d852a1fb7f047d58865c2180bf093517a4507cf7f0fa40a532/main.spi
00:01:02 verbose #537 > >
00:01:02 verbose #538 > > ╭─[ 20.46s - return value ]────────────────────────────────────────────────────╮
00:01:02 verbose #539 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:01:02 verbose #540 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_6e476f2b07e223762634541593 │
00:01:02 verbose #541 > > │ bc2f666b9bef23e859eb90402f114f153e8336\20240520-2139-4733-1945-000000db7ee7 │
00:01:02 verbose #542 > > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / │
00:01:02 verbose #543 > > │ arguments: ["repl", "--exit-after-run", "--run", │
00:01:02 verbose #544 > > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_6e476f2b07e22376263454159 │
00:01:02 verbose #545 > > │ 3bc2f666b9bef23e859eb90402f114f153e8336/20240520-2139-4733-1945-000000db7ee7 │
00:01:02 verbose #546 > > │ /test.dib", "--output-path", │
00:01:02 verbose #547 > > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_6e476f2b07e22376263454159 │
00:01:02 verbose #548 > > │ 3bc2f666b9bef23e859eb90402f114f153e8336/20240520-2139-4733-1945-000000db7ee7 │
00:01:02 verbose #549 > > │ /test.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run │
00:01:02 verbose #550 > > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_6e476f2b07e22376263454159 │
00:01:02 verbose #551 > > │ 3bc2f666b9bef23e859eb90402f114f153e8336/20240520-2139-4733-1945-000000db7ee7 │
00:01:02 verbose #552 > > │ /test.dib" --output-path │
00:01:02 verbose #553 > > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_6e476f2b07e22376263454159 │
00:01:02 verbose #554 > > │ 3bc2f666b9bef23e859eb90402f114f153e8336/20240520-2139-4733-1945-000000db7ee7 │
00:01:02 verbose #555 > > │ /test.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, │
00:01:02 verbose #556 > > │ false, None) │
00:01:02 verbose #557 > > │ > │
00:01:02 verbose #558 > > │ > ── fsharp │
00:01:02 verbose #559 > > │ ────────────────────────────────────────────────────────────────────── │
00:01:02 verbose #560 > > │ > 3 - 6 │
00:01:02 verbose #561 > > │ > │
00:01:02 verbose #562 > > │ > ── fsharp - import │
00:01:02 verbose #563 > > │ ───────────────────────────────────────────────────────────── │
00:01:02 verbose #564 > > │ > #r │
00:01:02 verbose #565 > > │ > │
00:01:02 verbose #566 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:02 verbose #567 > > │ ft.A │
00:01:02 verbose #568 > > │ > spNetCore.Html.Abstractions.dll" │
00:01:02 verbose #569 > > │ > #r │
00:01:02 verbose #570 > > │ > "C:/Users/i574n/.nug... │
00:01:02 verbose #571 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:02 verbose #572 > >
00:01:02 verbose #573 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:02 verbose #574 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:02 verbose #575 > > │ ## tests │
00:01:02 verbose #576 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:02 verbose #577 > >
00:01:02 verbose #578 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:02 verbose #579 > > inl tests () =
00:01:02 verbose #580 > > rust.run_tests [[
00:01:02 verbose #581 > > "verify_app", fun _ =>
00:01:02 verbose #582 > > get_command () |> runtime.command_debug_assert
00:01:02 verbose #583 > > ]]
00:01:03 verbose #584 > 00:01:02 debug #17 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/925d92522589948fbb551d314356e21e68d5b776b2d0fea1e0a4ae3c6547691f/main.spi
00:01:03 verbose #585 > >
00:01:03 verbose #586 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:03 verbose #587 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:03 verbose #588 > > │ ## main │
00:01:03 verbose #589 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:03 verbose #590 > >
00:01:03 verbose #591 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:03 verbose #592 > > ///!
00:01:03 verbose #593 > >
00:01:03 verbose #594 > > inl main (args : array_base string) =
00:01:03 verbose #595 > > inl trace_state = get_trace_state_or_init None
00:01:03 verbose #596 > >
00:01:03 verbose #597 > > inl command = get_command ()
00:01:03 verbose #598 > > inl arg_matches = command |> runtime.command_get_matches
00:01:03 verbose #599 > >
00:01:03 verbose #600 > > inl trace_level =
00:01:03 verbose #601 > > arg_matches
00:01:03 verbose #602 > > |> runtime.matches_get_one (get_args () .trace_level |> fst)
00:01:03 verbose #603 > > |> optionm'.unbox
00:01:03 verbose #604 > > |> optionm.map sm'.from_std_string
00:01:03 verbose #605 > >
00:01:03 verbose #606 > > inl trace_state_level = trace_state.level
00:01:03 verbose #607 > > match trace_level with
00:01:03 verbose #608 > > | Some trace_level =>
00:01:03 verbose #609 > > inl trace_state_level = trace_state.level
00:01:03 verbose #610 > > trace_state_level <- trace_level |> of_string
00:01:03 verbose #611 > > | None => ()
00:01:03 verbose #612 > >
00:01:03 verbose #613 > > trace Debug
00:01:03 verbose #614 > > fun () => $'$"spiral_builder.main"'
00:01:03 verbose #615 > > fun () => $'$"args: {!args} / {!_locals ()}"'
00:01:03 verbose #616 > >
00:01:03 verbose #617 > > inl result =
00:01:03 verbose #618 > > arg_matches
00:01:03 verbose #619 > > |> run
00:01:03 verbose #620 > > |> async.block_on
00:01:03 verbose #621 > > |> resultm.unwrap'
00:01:03 verbose #622 > >
00:01:03 verbose #623 > > if *trace_state_level = Info
00:01:03 verbose #624 > > then result |> console.write_line
00:01:03 verbose #625 > >
00:01:03 verbose #626 > > 0i32
00:01:03 verbose #627 > >
00:01:03 verbose #628 > > inl main () =
00:01:03 verbose #629 > > types ()
00:01:03 verbose #630 > > $'let tests () = !tests ()' : ()
00:01:03 verbose #631 > > $'let main args = !main args' : ()
00:01:04 verbose #632 > 00:01:03 debug #18 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5a59cd201dfdaafa875f3eec65024169b411c9437f8d103336cf0a4e8d032982/main.spi
00:01:04 verbose #633 > 00:01:02 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 25864
00:01:04 verbose #634 > 00:01:02 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:06 verbose #635 > 00:01:04 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb to html
00:01:06 verbose #636 > 00:01:04 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:06 verbose #637 > 00:01:04 verbose #7 ! validate(nb)
00:01:08 verbose #638 > 00:01:05 verbose #8 ! [NbConvertApp] Writing 351960 bytes to c:\home\git\polyglot\apps\spiral\builder\spiral_builder.dib.html
00:01:08 verbose #639 > 00:01:06 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 677
00:01:08 verbose #640 > 00:01:06 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 677
00:01:08 verbose #641 > 00:01:06 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:09 verbose #642 > 00:01:07 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:09 verbose #643 > 00:01:07 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:09 verbose #644 > 00:01:07 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 26600
00:01:09 debug #645 execute_with_options_async / exit_code: 0 / output.Length: 30171
00:01:09 debug #3 main / executeCommand / exitCode: 0 / command: ../../../workspace/target/release/spiral_builder.exe dib --path spiral_builder.dib
00:01:09 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:01:09 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Spi / path: spiral_builder.dib
00:00:00 debug #2 parseDibCode / output: Spi / file: spiral_builder.dib
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 500
00:00:02 debug #3 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #4 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 verbose #5 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # spiral_builder\nopen file_system_operators\nopen rust_operators\nopen ...ain args\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi"}} / result:
00:00:02 verbose #6 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi"}} / result:
00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi
00:00:03 debug #7 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #8 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #9 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #10 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]
#endif...8 : (string -> unit) = System.Console.WriteLine
v58 v54
0
let v0 : (unit -> unit) = closure0()
let tests () = v0 ()
let v1 : ((string []) -> int32) = closure1()
let main args = v1 args
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #11 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:06 debug #8 run_with_timeout_async / timeout: 100
00:00:00 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: spiral_builder / hash: / code.Length: 349642
targetDir: C:\home\git\polyglot\target\polyglot\builder\spiral_builder
Fable 4.17.0: F# to Rust compiler (status: alpha)
Thanks to the contributor! @do-wa
Stand with Ukraine! https://standwithukraine.com.ua/
Parsing target\polyglot\builder\spiral_builder\spiral_builder.fsproj...
Retrieving project options from cache, in case of issues run `dotnet fable clean` or try `--noCache` option.
Project and references (13 source files) parsed in 203ms
Started Fable compilation...
Fable compilation finished in 8084ms
.\lib\spiral\async_.fsx(112,0): (112,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\crypto.fsx(490,0): (490,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\threading.fsx(167,0): (167,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(832,0): (832,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(839,0): (839,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\sm.fsx(597,0): (597,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\date_time.fsx(641,0): (641,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2843,0): (2843,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2852,0): (2852,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(711,0): (711,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(714,0): (714,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3838,0): (3838,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3851,0): (3851,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5645,0): (5645,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5684,0): (5684,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust)
Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder)
Finished `release` profile [optimized] target(s) in 24.47s
Running unittests spiral_builder.rs (C:\home\git\polyglot\workspace\target\release\deps\spiral_builder-63068fc9dda37dd2.exe)
running 1 test
test module_7e2cd9e0::Spiral_builder::verify_app ... ok
successes:
successes:
module_7e2cd9e0::Spiral_builder::verify_app
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust)
Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder)
error: failed to remove file `C:\home\git\polyglot\workspace\target\release\spiral_builder.exe`
Caused by:
Access is denied. (os error 5)
# Invoke-Block / $retry: 1/1 / $Location: / Get-Location: C:\home\git\polyglot\apps\spiral\builder / $OnError: Continue / $exitcode: 101 / $EnvVars: null / $Error: '' / $ScriptBlock:
'cargo +nightly build --release'
In [ ]:
{ pwsh ../lib/fsharp/build.ps1 -sequential 1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path Async.dib --retries 3",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Async.dib", "--retries", "3"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/Async.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Async.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:04 verbose #10 > >
00:00:04 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:04 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:04 verbose #13 > > │ # Async (Polyglot) │
00:00:04 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:04 verbose #15 > >
00:00:04 verbose #16 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:04 verbose #17 > > #!import ../../lib/fsharp/Notebooks.dib
00:00:04 verbose #18 > > #!import ../../lib/fsharp/Testing.dib
00:00:04 verbose #19 > >
00:00:04 verbose #20 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:04 verbose #21 > > #r
00:00:04 verbose #22 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:04 verbose #23 > > spNetCore.Html.Abstractions.dll"
00:00:04 verbose #24 > > #r
00:00:04 verbose #25 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #26 > > otNet.Interactive.dll"
00:00:04 verbose #27 > > #r
00:00:04 verbose #28 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #29 > > otNet.Interactive.FSharp.dll"
00:00:04 verbose #30 > > #r
00:00:04 verbose #31 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #32 > > otNet.Interactive.Formatting.dll"
00:00:04 verbose #33 > > open System
00:00:04 verbose #34 > > open System.IO
00:00:04 verbose #35 > > open System.Text
00:00:04 verbose #36 > > open Microsoft.DotNet.Interactive.Formatting
00:00:08 verbose #37 > >
00:00:08 verbose #38 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:08 verbose #39 > > #r
00:00:08 verbose #40 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:08 verbose #41 > > otNet.Interactive.FSharp.dll"
00:00:08 verbose #42 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:08 verbose #43 > > #r
00:00:08 verbose #44 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:08 verbose #45 > > otNet.Interactive.dll"
00:00:08 verbose #46 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:08 verbose #47 > >
00:00:08 verbose #48 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:08 verbose #49 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:00:09 verbose #50 > >
00:00:09 verbose #51 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:09 verbose #52 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:00:09 verbose #53 > > TextWriter)->fprintfn writer "%120A" x)
00:00:09 verbose #54 > >
00:00:09 verbose #55 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:09 verbose #56 > > //// test
00:00:09 verbose #57 > >
00:00:09 verbose #58 > > Formatter.ListExpansionLimit <- 100
00:00:09 verbose #59 > >
00:00:09 verbose #60 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:09 verbose #61 > > #if FABLE_COMPILER
00:00:09 verbose #62 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:09 verbose #63 > > #endif
00:00:09 verbose #64 > > type std_env_VarError = class end
00:00:09 verbose #65 > > #if FABLE_COMPILER
00:00:09 verbose #66 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:09 verbose #67 > > #endif
00:00:09 verbose #68 > > type core_any_Any = class end
00:00:09 verbose #69 > > #if FABLE_COMPILER
00:00:09 verbose #70 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:09 verbose #71 > > #endif
00:00:09 verbose #72 > > type core_ops_Try<'T> = class end
00:00:09 verbose #73 > > #if FABLE_COMPILER
00:00:09 verbose #74 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:09 verbose #75 > > #endif
00:00:09 verbose #76 > > type Func0<'T> = class end
00:00:09 verbose #77 > > #if FABLE_COMPILER
00:00:09 verbose #78 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:09 verbose #79 > > #endif
00:00:09 verbose #80 > > type Func0<'T, 'U> = class end
00:00:09 verbose #81 > > #if FABLE_COMPILER
00:00:09 verbose #82 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:09 verbose #83 > > #endif
00:00:09 verbose #84 > > type Box<'T> = class end
00:00:09 verbose #85 > > #if FABLE_COMPILER
00:00:09 verbose #86 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:09 verbose #87 > > #endif
00:00:09 verbose #88 > > type Dyn<'T> = class end
00:00:09 verbose #89 > > #if FABLE_COMPILER
00:00:09 verbose #90 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:09 verbose #91 > > #endif
00:00:09 verbose #92 > > type Send<'T> = class end
00:00:09 verbose #93 > > #if FABLE_COMPILER
00:00:09 verbose #94 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:09 verbose #95 > > #endif
00:00:09 verbose #96 > > type Fn<'T> = class end
00:00:09 verbose #97 > > #if FABLE_COMPILER
00:00:09 verbose #98 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:09 verbose #99 > > #endif
00:00:09 verbose #100 > > type FnUnit = class end
00:00:09 verbose #101 > > #if FABLE_COMPILER
00:00:09 verbose #102 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:09 verbose #103 > > #endif
00:00:09 verbose #104 > > type FnOnce<'T> = class end
00:00:09 verbose #105 > > #if FABLE_COMPILER
00:00:09 verbose #106 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:09 verbose #107 > > #endif
00:00:09 verbose #108 > > type ActionFn<'T> = class end
00:00:09 verbose #109 > > #if FABLE_COMPILER
00:00:09 verbose #110 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:09 verbose #111 > > #endif
00:00:09 verbose #112 > > type ActionFn2<'T, 'U> = class end
00:00:09 verbose #113 > > #if FABLE_COMPILER
00:00:09 verbose #114 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:09 verbose #115 > > #endif
00:00:09 verbose #116 > > type Impl<'T> = class end
00:00:09 verbose #117 > > #if FABLE_COMPILER
00:00:09 verbose #118 > > [[<Fable...
00:00:11 verbose #119 > >
00:00:11 verbose #120 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:11 verbose #121 > > #if FABLE_COMPILER
00:00:11 verbose #122 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:11 verbose #123 > > #endif
00:00:11 verbose #124 > > type core_any_Any = class end
00:00:11 verbose #125 > > #if FABLE_COMPILER
00:00:11 verbose #126 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:11 verbose #127 > > #endif
00:00:11 verbose #128 > > type core_ops_Try<'T> = class end
00:00:11 verbose #129 > > #if FABLE_COMPILER
00:00:11 verbose #130 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:11 verbose #131 > > #endif
00:00:11 verbose #132 > > type Func0<'T> = class end
00:00:11 verbose #133 > > #if FABLE_COMPILER
00:00:11 verbose #134 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:11 verbose #135 > > #endif
00:00:11 verbose #136 > > type Func0<'T, 'U> = class end
00:00:11 verbose #137 > > #if FABLE_COMPILER
00:00:11 verbose #138 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:11 verbose #139 > > #endif
00:00:11 verbose #140 > > type Box<'T> = class end
00:00:11 verbose #141 > > #if FABLE_COMPILER
00:00:11 verbose #142 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:11 verbose #143 > > #endif
00:00:11 verbose #144 > > type Dyn<'T> = class end
00:00:11 verbose #145 > > #if FABLE_COMPILER
00:00:11 verbose #146 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:11 verbose #147 > > #endif
00:00:11 verbose #148 > > type Send<'T> = class end
00:00:11 verbose #149 > > #if FABLE_COMPILER
00:00:11 verbose #150 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:11 verbose #151 > > #endif
00:00:11 verbose #152 > > type Fn<'T> = class end
00:00:11 verbose #153 > > #if FABLE_COMPILER
00:00:11 verbose #154 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:11 verbose #155 > > #endif
00:00:11 verbose #156 > > type FnUnit = class end
00:00:11 verbose #157 > > #if FABLE_COMPILER
00:00:11 verbose #158 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:11 verbose #159 > > #endif
00:00:11 verbose #160 > > type FnOnce<'T> = class end
00:00:11 verbose #161 > > #if FABLE_COMPILER
00:00:11 verbose #162 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:11 verbose #163 > > #endif
00:00:11 verbose #164 > > type ActionFn<'T> = class end
00:00:11 verbose #165 > > #if FABLE_COMPILER
00:00:11 verbose #166 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:11 verbose #167 > > #endif
00:00:11 verbose #168 > > type ActionFn2<'T, 'U> = class end
00:00:11 verbose #169 > > #if FABLE_COMPILER
00:00:11 verbose #170 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:11 verbose #171 > > #endif
00:00:11 verbose #172 > > type Impl<'T> = class end
00:00:11 verbose #173 > > #if FABLE_COMPILER
00:00:11 verbose #174 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:11 verbose #175 > > #endif
00:00:11 verbose #176 > > type Mut<'T> = class end
00:00:11 verbose #177 > > #if FABLE_COMPILER
00:00:11 verbose #178 > > [[<Fable.Core.Erase; Fable.Co...
00:00:12 verbose #179 > >
00:00:12 verbose #180 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #181 > > #if FABLE_COMPILER
00:00:12 verbose #182 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:00:12 verbose #183 > > #endif
00:00:12 verbose #184 > > type async_std_task_JoinHandle<'T> = class end
00:00:12 verbose #185 > > #if FABLE_COMPILER
00:00:12 verbose #186 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:00:12 verbose #187 > > #endif
00:00:12 verbose #188 > > type std_future_Future<'T> = class end
00:00:12 verbose #189 > > #if FABLE_COMPILER
00:00:12 verbose #190 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:00:12 verbose #191 > > #endif
00:00:12 verbose #192 > > type rayon_vec_IntoIter<'T> = class end
00:00:12 verbose #193 > > #if FABLE_COMPILER
00:00:12 verbose #194 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:00:12 verbose #195 > > #endif
00:00:12 verbose #196 > > type rayon_iter_Map<'T> = class end
00:00:12 verbose #197 > > #if FABLE_COMPILER
00:00:12 verbose #198 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:00:12 verbose #199 > > #endif
00:00:12 verbose #200 > > type futures_lite_stream_StreamExt = class end
00:00:12 verbose #201 > > #if FABLE_COMPILER
00:00:12 verbose #202 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:00:12 verbose #203 > > #endif
00:00:12 verbose #204 > > type futures_future_TryJoinAll<'T> = class end
00:00:12 verbose #205 > > #if FABLE_COMPILER
00:00:12 verbose #206 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:00:12 verbose #207 > > #endif
00:00:12 verbose #208 > > type futures_future_Fuse<'T> = class end
00:00:12 verbose #209 > > #if FABLE_COMPILER
00:00:12 verbose #210 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:00:12 verbose #211 > > #endif
00:00:12 verbose #212 > > type futures_future_JoinAll<'T> = class end
00:00:12 verbose #213 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:00:12 verbose #214 > > Async<System.Threading.CancellationToken> =
00:00:12 verbose #215 > > let v1 : bool = true
00:00:12 verbose #216 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:00:12 verbose #217 > >
00:00:12 verbose #218 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:12 verbose #219 > >
00:00:12 verbose #220 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:12 verbose #221 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:00:12 verbose #222 > > unbox<Async<System...
00:00:12 verbose #223 > >
00:00:12 verbose #224 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #225 > > #if FABLE_COMPILER
00:00:12 verbose #226 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:00:12 verbose #227 > > #endif
00:00:12 verbose #228 > > type std_thread_JoinHandle<'T> = class end
00:00:12 verbose #229 > > #if FABLE_COMPILER
00:00:12 verbose #230 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:00:12 verbose #231 > > #endif
00:00:12 verbose #232 > > type std_sync_Arc<'T> = class end
00:00:12 verbose #233 > > #if FABLE_COMPILER
00:00:12 verbose #234 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:00:12 verbose #235 > > #endif
00:00:12 verbose #236 > > type std_sync_Mutex<'T> = class end
00:00:12 verbose #237 > > #if FABLE_COMPILER
00:00:12 verbose #238 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:00:12 verbose #239 > > #endif
00:00:12 verbose #240 > > type std_sync_MutexGuard<'T> = class end
00:00:12 verbose #241 > > #if FABLE_COMPILER
00:00:12 verbose #242 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:00:12 verbose #243 > > #endif
00:00:12 verbose #244 > > type std_sync_PoisonError<'T> = class end
00:00:12 verbose #245 > > #if FABLE_COMPILER
00:00:12 verbose #246 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:00:12 verbose #247 > > #endif
00:00:12 verbose #248 > > type std_sync_mpsc_Receiver<'T> = class end
00:00:12 verbose #249 > > #if FABLE_COMPILER
00:00:12 verbose #250 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:00:12 verbose #251 > > #endif
00:00:12 verbose #252 > > type std_sync_mpsc_SendError<'T> = class end
00:00:12 verbose #253 > > #if FABLE_COMPILER
00:00:12 verbose #254 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:00:12 verbose #255 > > #endif
00:00:12 verbose #256 > > type std_sync_mpsc_Sender<'T> = class end
00:00:12 verbose #257 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:00:12 verbose #258 > > _.Dispose () = f ()
00:00:12 verbose #259 > > type [[<Struct>]] US0 =
00:00:12 verbose #260 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:00:12 verbose #261 > > | US0_1
00:00:12 verbose #262 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:00:12 verbose #263 > > let v1 : bool = true
00:00:12 verbose #264 > > let mutable _v1 : unit option = None
00:00:12 verbose #265 > >
00:00:12 verbose #266 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:12 verbose #267 > >
00:00:12 verbose #268 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:00:12 verbose #269 > >
00:00:12 verbose #270 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #271 > > #if FABLE_COMPILER
00:00:12 verbose #272 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:00:12 verbose #273 > > #endif
00:00:12 verbose #274 > > type reqwest_Error = class end
00:00:12 verbose #275 > > #if FABLE_COMPILER
00:00:12 verbose #276 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:00:12 verbose #277 > > #endif
00:00:12 verbose #278 > > type reqwest_RequestBuilder = class end
00:00:12 verbose #279 > > #if FABLE_COMPILER
00:00:12 verbose #280 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:00:12 verbose #281 > > #endif
00:00:12 verbose #282 > > type reqwest_Response = class end
00:00:12 verbose #283 > > #if FABLE_COMPILER
00:00:12 verbose #284 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:12 verbose #285 > > #endif
00:00:12 verbose #286 > > type std_env_VarError = class end
00:00:12 verbose #287 > > #if FABLE_COMPILER
00:00:12 verbose #288 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:12 verbose #289 > > #endif
00:00:12 verbose #290 > > type core_any_Any = class end
00:00:12 verbose #291 > > #if FABLE_COMPILER
00:00:12 verbose #292 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:12 verbose #293 > > #endif
00:00:12 verbose #294 > > type core_ops_Try<'T> = class end
00:00:12 verbose #295 > > #if FABLE_COMPILER
00:00:12 verbose #296 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:12 verbose #297 > > #endif
00:00:12 verbose #298 > > type Func0<'T> = class end
00:00:12 verbose #299 > > #if FABLE_COMPILER
00:00:12 verbose #300 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:12 verbose #301 > > #endif
00:00:12 verbose #302 > > type Func0<'T, 'U> = class end
00:00:12 verbose #303 > > #if FABLE_COMPILER
00:00:12 verbose #304 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:12 verbose #305 > > #endif
00:00:12 verbose #306 > > type Box<'T> = class end
00:00:12 verbose #307 > > #if FABLE_COMPILER
00:00:12 verbose #308 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:12 verbose #309 > > #endif
00:00:12 verbose #310 > > type Dyn<'T> = class end
00:00:12 verbose #311 > > #if FABLE_COMPILER
00:00:12 verbose #312 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:12 verbose #313 > > #endif
00:00:12 verbose #314 > > type Send<'T> = class end
00:00:12 verbose #315 > > #if FABLE_COMPILER
00:00:12 verbose #316 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:12 verbose #317 > > #endif
00:00:12 verbose #318 > > type Fn<'T> = class end
00:00:12 verbose #319 > > #if FABLE_COMPILER
00:00:12 verbose #320 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:12 verbose #321 > > #endif
00:00:12 verbose #322 > > type FnUnit = class end
00:00:12 verbose #323 > > #if FABLE_COMPILER
00:00:12 verbose #324 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:12 verbose #325 > > #...
00:00:14 verbose #326 > >
00:00:14 verbose #327 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:14 verbose #328 > > #if FABLE_COMPILER
00:00:14 verbose #329 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:00:14 verbose #330 > > #endif
00:00:14 verbose #331 > > type clap_Arg = class end
00:00:14 verbose #332 > > #if FABLE_COMPILER
00:00:14 verbose #333 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:00:14 verbose #334 > > #endif
00:00:14 verbose #335 > > type clap_ArgAction = class end
00:00:14 verbose #336 > > #if FABLE_COMPILER
00:00:14 verbose #337 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:00:14 verbose #338 > > #endif
00:00:14 verbose #339 > > type clap_Command = class end
00:00:14 verbose #340 > > #if FABLE_COMPILER
00:00:14 verbose #341 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:00:14 verbose #342 > > #endif
00:00:14 verbose #343 > > type clap_ArgMatches = class end
00:00:14 verbose #344 > > #if FABLE_COMPILER
00:00:14 verbose #345 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:00:14 verbose #346 > > #endif
00:00:14 verbose #347 > > type clap_builder_ValueRange = class end
00:00:14 verbose #348 > > #if FABLE_COMPILER
00:00:14 verbose #349 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:00:14 verbose #350 > > #endif
00:00:14 verbose #351 > > type clap_builder_ValueParser = class end
00:00:14 verbose #352 > > #if FABLE_COMPILER
00:00:14 verbose #353 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:00:14 verbose #354 > > #endif
00:00:14 verbose #355 > > type clap_builder_PossibleValue = class end
00:00:14 verbose #356 > > #if FABLE_COMPILER
00:00:14 verbose #357 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:00:14 verbose #358 > > #endif
00:00:14 verbose #359 > > type std_process_Child = class end
00:00:14 verbose #360 > > #if FABLE_COMPILER
00:00:14 verbose #361 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:00:14 verbose #362 > > #endif
00:00:14 verbose #363 > > type std_process_ChildStderr = class end
00:00:14 verbose #364 > > #if FABLE_COMPILER
00:00:14 verbose #365 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:00:14 verbose #366 > > #endif
00:00:14 verbose #367 > > type std_process_ChildStdout = class end
00:00:14 verbose #368 > > #if FABLE_COMPILER
00:00:14 verbose #369 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:00:14 verbose #370 > > #endif
00:00:14 verbose #371 > > type std_process_ChildStdin = class end
00:00:14 verbose #372 > > #if FABLE_COMPILER
00:00:14 verbose #373 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:00:14 verbose #374 > > #endif
00:00:14 verbose #375 > > type std_process_Command = class ...
00:00:17 verbose #376 > >
00:00:17 verbose #377 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:17 verbose #378 > > #if FABLE_COMPILER
00:00:17 verbose #379 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:00:17 verbose #380 > > #endif
00:00:17 verbose #381 > > type std_fs_File = class end
00:00:17 verbose #382 > > #if FABLE_COMPILER
00:00:17 verbose #383 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:00:17 verbose #384 > > #endif
00:00:17 verbose #385 > > type std_fs_FileType = class end
00:00:17 verbose #386 > > #if FABLE_COMPILER
00:00:17 verbose #387 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:00:17 verbose #388 > > #endif
00:00:17 verbose #389 > > type std_path_Display = class end
00:00:17 verbose #390 > > #if FABLE_COMPILER
00:00:17 verbose #391 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:00:17 verbose #392 > > #endif
00:00:17 verbose #393 > > type std_path_Path = class end
00:00:17 verbose #394 > > #if FABLE_COMPILER
00:00:17 verbose #395 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:00:17 verbose #396 > > #endif
00:00:17 verbose #397 > > type std_path_PathBuf = class end
00:00:17 verbose #398 > > #if FABLE_COMPILER
00:00:17 verbose #399 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:00:17 verbose #400 > > #endif
00:00:17 verbose #401 > > type async_walkdir_DirEntry = class end
00:00:17 verbose #402 > > #if FABLE_COMPILER
00:00:17 verbose #403 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:00:17 verbose #404 > > #endif
00:00:17 verbose #405 > > type async_walkdir_Filtering = class end
00:00:17 verbose #406 > > #if FABLE_COMPILER
00:00:17 verbose #407 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:00:17 verbose #408 > > #endif
00:00:17 verbose #409 > > type async_walkdir_WalkDir = class end
00:00:17 verbose #410 > > #if FABLE_COMPILER
00:00:17 verbose #411 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:17 verbose #412 > > #endif
00:00:17 verbose #413 > > type core_any_Any = class end
00:00:17 verbose #414 > > #if FABLE_COMPILER
00:00:17 verbose #415 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:17 verbose #416 > > #endif
00:00:17 verbose #417 > > type core_ops_Try<'T> = class end
00:00:17 verbose #418 > > #if FABLE_COMPILER
00:00:17 verbose #419 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:17 verbose #420 > > #endif
00:00:17 verbose #421 > > type Func0<'T> = class end
00:00:17 verbose #422 > > #if FABLE_COMPILER
00:00:17 verbose #423 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:17 verbose #424 > > #endif
00:00:17 verbose #425 > > type Func0<'T, 'U> = class end
00:00:17 verbose #426 > > #if FABLE_COMPILER
00:00:17 verbose #427 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:17 verbose #428 > > #endif
00:00:17 verbose #429 > > type Box<'T> = clas...
00:00:20 verbose #430 > >
00:00:20 verbose #431 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #432 > > module SpiralTrace =
00:00:20 verbose #433 > > let trace x =
00:00:20 verbose #434 > > #if !INTERACTIVE
00:00:20 verbose #435 > > Trace.trace x
00:00:20 verbose #436 > > #else
00:00:20 verbose #437 > > trace x
00:00:20 verbose #438 > > #endif
00:00:20 verbose #439 > >
00:00:20 verbose #440 > > type TraceLevel =
00:00:20 verbose #441 > > #if !INTERACTIVE
00:00:20 verbose #442 > > Trace.US0
00:00:20 verbose #443 > > #else
00:00:20 verbose #444 > > US0
00:00:20 verbose #445 > > #endif
00:00:20 verbose #446 > >
00:00:20 verbose #447 > > module SpiralCrypto =
00:00:20 verbose #448 > > let hash_text x =
00:00:20 verbose #449 > > #if !INTERACTIVE
00:00:20 verbose #450 > > Crypto.hash_text x
00:00:20 verbose #451 > > #else
00:00:20 verbose #452 > > hash_text x
00:00:20 verbose #453 > > #endif
00:00:20 verbose #454 > >
00:00:20 verbose #455 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:00:20 verbose #456 > >
00:00:20 verbose #457 > > module SpiralAsync =
00:00:20 verbose #458 > > let merge_cancellation_token_with_default_async x =
00:00:20 verbose #459 > > #if !INTERACTIVE
00:00:20 verbose #460 > > Async_.merge_cancellation_token_with_default_async x
00:00:20 verbose #461 > > #else
00:00:20 verbose #462 > > merge_cancellation_token_with_default_async x
00:00:20 verbose #463 > > #endif
00:00:20 verbose #464 > >
00:00:20 verbose #465 > > module SpiralThreading =
00:00:20 verbose #466 > > let new_disposable_token x =
00:00:20 verbose #467 > > #if !INTERACTIVE
00:00:20 verbose #468 > > Threading.new_disposable_token x
00:00:20 verbose #469 > > #else
00:00:20 verbose #470 > > new_disposable_token x
00:00:20 verbose #471 > > #endif
00:00:20 verbose #472 > >
00:00:20 verbose #473 > > module SpiralNetworking =
00:00:20 verbose #474 > > let test_port_open x =
00:00:20 verbose #475 > > #if !INTERACTIVE
00:00:20 verbose #476 > > Networking.test_port_open x
00:00:20 verbose #477 > > #else
00:00:20 verbose #478 > > test_port_open x
00:00:20 verbose #479 > > #endif
00:00:20 verbose #480 > >
00:00:20 verbose #481 > > let test_port_open_timeout x =
00:00:20 verbose #482 > > #if !INTERACTIVE
00:00:20 verbose #483 > > Networking.test_port_open_timeout x
00:00:20 verbose #484 > > #else
00:00:20 verbose #485 > > test_port_open_timeout x
00:00:20 verbose #486 > > #endif
00:00:20 verbose #487 > >
00:00:20 verbose #488 > > let wait_for_port_access x =
00:00:20 verbose #489 > > #if !INTERACTIVE
00:00:20 verbose #490 > > Networking.wait_for_port_access x
00:00:20 verbose #491 > > #else
00:00:20 verbose #492 > > wait_for_port_access x
00:00:20 verbose #493 > > #endif
00:00:20 verbose #494 > >
00:00:20 verbose #495 > > let get_available_port x =
00:00:20 verbose #496 > > #if !INTERACTIVE
00:00:20 verbose #497 > > Networking.get_available_port x
00:00:20 verbose #498 > > #else
00:00:20 verbose #499 > > get_available_port x
00:00:20 verbose #500 > > #endif
00:00:20 verbose #501 > >
00:00:20 verbose #502 > > module SpiralRuntime =
00:00:20 verbose #503 > > let get_executable_suffix () =
00:00:20 verbose #504 > > #if !INTERACTIVE
00:00:20 verbose #505 > > Runtime.get_executable_suffix ()
00:00:20 verbose #506 > > #else
00:00:20 verbose #507 > > get_executable_suffix ()
00:00:20 verbose #508 > > #endif
00:00:20 verbose #509 > >
00:00:20 verbose #510 > > let is_windows () =
00:00:20 verbose #511 > > #if !INTERACTIVE
00:00:20 verbose #512 > > ...
00:00:20 verbose #513 > >
00:00:20 verbose #514 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #515 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:00:20 verbose #516 > >
00:00:20 verbose #517 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #518 > > //// test
00:00:20 verbose #519 > >
00:00:20 verbose #520 > > type AssertExceptionFormatter (ex) =
00:00:20 verbose #521 > > member _.Text =
00:00:20 verbose #522 > > ex.ToString()
00:00:20 verbose #523 > > .Replace("32m", "<span style=\"color: green;\">")
00:00:20 verbose #524 > > .Replace("36m", "</span>")
00:00:20 verbose #525 > > .Replace("31m", "<span style=\"color: red;\">")
00:00:20 verbose #526 > > .Replace("\n", "<br/>\n")
00:00:20 verbose #527 > >
00:00:20 verbose #528 > >
00:00:20 verbose #529 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:00:20 verbose #530 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:00:20 verbose #531 > >
00:00:20 verbose #532 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #533 > > //// test
00:00:20 verbose #534 > >
00:00:20 verbose #535 > > let inline __expect fn log expected actual =
00:00:20 verbose #536 > > if log then printfn $"{actual.ToDisplayString ()}"
00:00:20 verbose #537 > > try
00:00:20 verbose #538 > > "Testing.__expect" |> fn actual expected
00:00:20 verbose #539 > > with :? Expecto.AssertException as ex ->
00:00:20 verbose #540 > > AssertExceptionFormatter(ex).Display () |> ignore
00:00:20 verbose #541 > > failwith (ex.GetType().FullName)
00:00:20 verbose #542 > >
00:00:20 verbose #543 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:00:20 verbose #544 > > expected actual
00:00:20 verbose #545 > > let inline _contains expected actual = __contains true expected actual
00:00:20 verbose #546 > >
00:00:20 verbose #547 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:00:20 verbose #548 > > expected actual
00:00:20 verbose #549 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:00:20 verbose #550 > >
00:00:20 verbose #551 > > let inline __isGreaterThan log expected actual = __expect
00:00:20 verbose #552 > > Expecto.Expect.isGreaterThan log expected actual
00:00:20 verbose #553 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:00:20 verbose #554 > >
00:00:20 verbose #555 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:00:20 verbose #556 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:00:20 verbose #557 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:00:20 verbose #558 > > expected actual
00:00:20 verbose #559 > >
00:00:20 verbose #560 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:00:20 verbose #561 > > log expected actual
00:00:20 verbose #562 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:00:20 verbose #563 > >
00:00:20 verbose #564 > > let inline __isLessThanOrEqual log expected actual = __expect
00:00:20 verbose #565 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:00:20 verbose #566 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:00:20 verbose #567 > > expected actual
00:00:20 verbose #568 > >
00:00:20 verbose #569 > > let inline __sequenceEqual log expected actual = __expe...
00:00:20 verbose #570 > >
00:00:20 verbose #571 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #572 > > //// test
00:00:20 verbose #573 > >
00:00:20 verbose #574 > > let inline __isBetween log a b actual =
00:00:20 verbose #575 > > let inline isBetween actual (a, b) _ =
00:00:20 verbose #576 > > __isGreaterThanOrEqual log a actual
00:00:20 verbose #577 > > __isLessThanOrEqual log b actual
00:00:20 verbose #578 > > __expect isBetween log (a, b) actual
00:00:20 verbose #579 > > let inline _isBetween a b actual = __isBetween true a b actual
00:00:20 verbose #580 > >
00:00:20 verbose #581 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #582 > > #!import ../../lib/fsharp/Common.fs
00:00:20 verbose #583 > >
00:00:20 verbose #584 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #585 > > #if !INTERACTIVE
00:00:20 verbose #586 > > namespace Polyglot
00:00:20 verbose #587 > > #endif
00:00:20 verbose #588 > >
00:00:20 verbose #589 > > module Common =
00:00:20 verbose #590 > >
00:00:20 verbose #591 > > #if !INTERACTIVE
00:00:20 verbose #592 > > open Lib
00:00:20 verbose #593 > > #endif
00:00:20 verbose #594 > >
00:00:20 verbose #595 > > let nl = System.Environment.NewLine
00:00:20 verbose #596 > > let q = @""""
00:00:20 verbose #597 > >
00:00:20 verbose #598 > > let inline cons head tail = head :: tail
00:00:20 verbose #599 > >
00:00:20 verbose #600 > > /// ## memoize
00:00:20 verbose #601 > > let inline memoize fn =
00:00:20 verbose #602 > > let result = lazy fn ()
00:00:20 verbose #603 > > fun () -> result.Value
00:00:20 verbose #604 > >
00:00:20 verbose #605 > > /// ## TraceLevel
00:00:20 verbose #606 > > type TraceLevel =
00:00:20 verbose #607 > > | Verbose
00:00:20 verbose #608 > > | Debug
00:00:20 verbose #609 > > | Info
00:00:20 verbose #610 > > | Warning
00:00:20 verbose #611 > > | Critical
00:00:20 verbose #612 > >
00:00:20 verbose #613 > > let inline _locals () = ""
00:00:20 verbose #614 > >
00:00:20 verbose #615 > > /// ## trace
00:00:20 verbose #616 > > let to_trace_level = function
00:00:20 verbose #617 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:00:20 verbose #618 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:00:20 verbose #619 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:00:20 verbose #620 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:00:20 verbose #621 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:00:20 verbose #622 > >
00:00:20 verbose #623 > > let trace level fn locals =
00:00:20 verbose #624 > > let level = level |> to_trace_level
00:00:20 verbose #625 > > SpiralTrace.trace level fn locals
00:00:20 verbose #626 > >
00:00:20 verbose #627 > >
00:00:20 verbose #628 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #629 > > #if !INTERACTIVE
00:00:20 verbose #630 > > open Lib
00:00:20 verbose #631 > > #endif
00:00:20 verbose #632 > >
00:00:20 verbose #633 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #634 > > open Common
00:00:20 verbose #635 > >
00:00:20 verbose #636 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #637 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #638 > > │ ## choice │
00:00:20 verbose #639 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #640 > >
00:00:20 verbose #641 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #642 > > let inline choice asyncs = async {
00:00:20 verbose #643 > > let e = Event<_> ()
00:00:20 verbose #644 > > use cts = new System.Threading.CancellationTokenSource ()
00:00:20 verbose #645 > > let fn =
00:00:20 verbose #646 > > asyncs
00:00:20 verbose #647 > > |> Seq.map (fun a -> async {
00:00:20 verbose #648 > > let! x = a
00:00:20 verbose #649 > > e.Trigger x
00:00:20 verbose #650 > > })
00:00:20 verbose #651 > > |> Async.Parallel
00:00:20 verbose #652 > > |> Async.Ignore
00:00:20 verbose #653 > > Async.Start (fn, cts.Token)
00:00:20 verbose #654 > > let! result = Async.AwaitEvent e.Publish
00:00:20 verbose #655 > > cts.Cancel ()
00:00:20 verbose #656 > > return result
00:00:20 verbose #657 > > }
00:00:20 verbose #658 > >
00:00:20 verbose #659 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #660 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #661 > > │ ## map │
00:00:20 verbose #662 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #663 > >
00:00:20 verbose #664 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #665 > > let inline map fn a = async {
00:00:20 verbose #666 > > let! x = a
00:00:20 verbose #667 > > return fn x
00:00:20 verbose #668 > > }
00:00:20 verbose #669 > >
00:00:20 verbose #670 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #671 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #672 > > │ ## catch │
00:00:20 verbose #673 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #674 > >
00:00:20 verbose #675 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #676 > > let inline catch a =
00:00:20 verbose #677 > > a
00:00:20 verbose #678 > > |> Async.Catch
00:00:20 verbose #679 > > |> map (function
00:00:20 verbose #680 > > | Choice1Of2 result -> Ok result
00:00:20 verbose #681 > > | Choice2Of2 ex -> Error ex
00:00:20 verbose #682 > > )
00:00:20 verbose #683 > >
00:00:20 verbose #684 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #685 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #686 > > │ ## runWithTimeoutChoiceAsync │
00:00:20 verbose #687 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #688 > >
00:00:20 verbose #689 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #690 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:00:20 verbose #691 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:20 verbose #692 > >
00:00:20 verbose #693 > > let timeoutTask = async {
00:00:20 verbose #694 > > do! Async.Sleep timeout
00:00:20 verbose #695 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:00:20 verbose #696 > > return None
00:00:20 verbose #697 > > }
00:00:20 verbose #698 > >
00:00:20 verbose #699 > > let task = async {
00:00:20 verbose #700 > > try
00:00:20 verbose #701 > > let! result = fn
00:00:20 verbose #702 > > return Some result
00:00:20 verbose #703 > > with
00:00:20 verbose #704 > > | :? System.AggregateException as ex when
00:00:20 verbose #705 > > ex.InnerExceptions
00:00:20 verbose #706 > > |> Seq.exists (function :?
00:00:20 verbose #707 > > System.Threading.Tasks.TaskCanceledException -> true | _ -> false)
00:00:20 verbose #708 > > ->
00:00:20 verbose #709 > > trace Warning
00:00:20 verbose #710 > > (fun () -> "runWithTimeoutChoiceAsync")
00:00:20 verbose #711 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:20 verbose #712 > > ()}")
00:00:20 verbose #713 > > return None
00:00:20 verbose #714 > > | ex ->
00:00:20 verbose #715 > > trace Critical
00:00:20 verbose #716 > > (fun () -> "runWithTimeoutChoiceAsync")
00:00:20 verbose #717 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:20 verbose #718 > > ()}")
00:00:20 verbose #719 > > return None
00:00:20 verbose #720 > > }
00:00:20 verbose #721 > >
00:00:20 verbose #722 > > [[ timeoutTask; task ]]
00:00:20 verbose #723 > > |> choice
00:00:21 verbose #724 > >
00:00:21 verbose #725 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #726 > > let inline runWithTimeoutChoice timeout fn =
00:00:21 verbose #727 > > fn
00:00:21 verbose #728 > > |> runWithTimeoutChoiceAsync timeout
00:00:21 verbose #729 > > |> Async.RunSynchronously
00:00:21 verbose #730 > >
00:00:21 verbose #731 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #732 > > //// test
00:00:21 verbose #733 > >
00:00:21 verbose #734 > > Async.Sleep 120
00:00:21 verbose #735 > > |> runWithTimeoutChoice 10
00:00:21 verbose #736 > > |> _assertEqual None
00:00:21 verbose #737 > >
00:00:21 verbose #738 > > ╭─[ 274.78ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 verbose #739 > > │ 00:00:01 debug #1 runWithTimeoutChoiceAsync / timeout: 10 │
00:00:21 verbose #740 > > │ <null> │
00:00:21 verbose #741 > > │ │
00:00:21 verbose #742 > > │ │
00:00:21 verbose #743 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #744 > >
00:00:21 verbose #745 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #746 > > //// test
00:00:21 verbose #747 > >
00:00:21 verbose #748 > > Async.Sleep 10
00:00:21 verbose #749 > > |> runWithTimeoutChoice 60
00:00:21 verbose #750 > > |> _assertEqual (Some ())
00:00:21 verbose #751 > >
00:00:21 verbose #752 > > ╭─[ 204.32ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 verbose #753 > > │ Some () │
00:00:21 verbose #754 > > │ │
00:00:21 verbose #755 > > │ │
00:00:21 verbose #756 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #757 > >
00:00:21 verbose #758 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #759 > > //// test
00:00:21 verbose #760 > >
00:00:21 verbose #761 > > async {
00:00:21 verbose #762 > > raise (exn "error")
00:00:21 verbose #763 > > }
00:00:21 verbose #764 > > |> runWithTimeoutChoice 60
00:00:21 verbose #765 > > |> _assertEqual None
00:00:21 verbose #766 > >
00:00:21 verbose #767 > > ╭─[ 154.36ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 verbose #768 > > │ 00:00:01 critical #2 runWithTimeoutChoiceAsync / ex: System.Exception: error │
00:00:21 verbose #769 > > │ / timeout: 60 │
00:00:21 verbose #770 > > │ <null> │
00:00:21 verbose #771 > > │ │
00:00:21 verbose #772 > > │ │
00:00:21 verbose #773 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #774 > >
00:00:21 verbose #775 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #776 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #777 > > │ ## runWithTimeoutAsync │
00:00:21 verbose #778 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #779 > >
00:00:21 verbose #780 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #781 > > let inline runWithTimeoutAsync (timeout : int) fn = async {
00:00:21 verbose #782 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:21 verbose #783 > > let! child = Async.StartChild (fn, timeout)
00:00:21 verbose #784 > > return!
00:00:21 verbose #785 > > child
00:00:21 verbose #786 > > |> catch
00:00:21 verbose #787 > > |> map (function
00:00:21 verbose #788 > > | Ok result -> Some result
00:00:21 verbose #789 > > | Error (:? System.TimeoutException as ex) ->
00:00:21 verbose #790 > > trace Debug (fun () -> $"runWithTimeoutAsync") _locals
00:00:21 verbose #791 > > None
00:00:21 verbose #792 > > | Error ex ->
00:00:21 verbose #793 > > trace Critical (fun () -> $"runWithTimeoutAsync** / ex: %A{ex}")
00:00:21 verbose #794 > > _locals
00:00:21 verbose #795 > > None
00:00:21 verbose #796 > > )
00:00:21 verbose #797 > > }
00:00:22 verbose #798 > >
00:00:22 verbose #799 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #800 > > let inline runWithTimeout timeout fn =
00:00:22 verbose #801 > > fn
00:00:22 verbose #802 > > |> runWithTimeoutAsync timeout
00:00:22 verbose #803 > > |> Async.RunSynchronously
00:00:22 verbose #804 > >
00:00:22 verbose #805 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #806 > > //// test
00:00:22 verbose #807 > >
00:00:22 verbose #808 > > Async.Sleep 60
00:00:22 verbose #809 > > |> runWithTimeout 10
00:00:22 verbose #810 > > |> _assertEqual None
00:00:22 verbose #811 > >
00:00:22 verbose #812 > > ╭─[ 111.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 verbose #813 > > │ 00:00:02 debug #3 runWithTimeoutAsync / timeout: 10 │
00:00:22 verbose #814 > > │ <null> │
00:00:22 verbose #815 > > │ │
00:00:22 verbose #816 > > │ │
00:00:22 verbose #817 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #818 > >
00:00:22 verbose #819 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #820 > > //// test
00:00:22 verbose #821 > >
00:00:22 verbose #822 > > Async.Sleep 10
00:00:22 verbose #823 > > |> runWithTimeout 60
00:00:22 verbose #824 > > |> _assertEqual (Some ())
00:00:22 verbose #825 > >
00:00:22 verbose #826 > > ╭─[ 88.11ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:22 verbose #827 > > │ Some () │
00:00:22 verbose #828 > > │ │
00:00:22 verbose #829 > > │ │
00:00:22 verbose #830 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #831 > >
00:00:22 verbose #832 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #833 > > //// test
00:00:22 verbose #834 > >
00:00:22 verbose #835 > > async {
00:00:22 verbose #836 > > raise (exn "error")
00:00:22 verbose #837 > > }
00:00:22 verbose #838 > > |> runWithTimeout 60
00:00:22 verbose #839 > > |> _assertEqual None
00:00:22 verbose #840 > >
00:00:22 verbose #841 > > ╭─[ 117.86ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 verbose #842 > > │ 00:00:02 critical #4 runWithTimeoutAsync** / ex: System.Exception: error │
00:00:22 verbose #843 > > │ at FSI_0035.it@4-119.Invoke(Unit unitVar) │
00:00:22 verbose #844 > > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │
00:00:22 verbose #845 > > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │
00:00:22 verbose #846 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │
00:00:22 verbose #847 > > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │
00:00:22 verbose #848 > > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 │
00:00:22 verbose #849 > > │ --- End of stack trace from previous location --- │
00:00:22 verbose #850 > > │ at Microsoft.FSharp.Control.AsyncResult`1.Commit() in │
00:00:22 verbose #851 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 454 │
00:00:22 verbose #852 > > │ at │
00:00:22 verbose #853 > > │ <StartupCode$FSharp-Core>.$Async.AwaitAndBindChildResult@1962-4.Invoke(Unit │
00:00:22 verbose #854 > > │ unitVar) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1964 │
00:00:22 verbose #855 > > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │
00:00:22 verbose #856 > > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │
00:00:22 verbose #857 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │
00:00:22 verbose #858 > > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │
00:00:22 verbose #859 > > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 / timeout: 60 │
00:00:22 verbose #860 > > │ <null> │
00:00:22 verbose #861 > > │ │
00:00:22 verbose #862 > > │ │
00:00:22 verbose #863 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #864 > >
00:00:22 verbose #865 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:22 verbose #866 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:22 verbose #867 > > │ ## runWithTimeoutStrict │
00:00:22 verbose #868 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #869 > >
00:00:22 verbose #870 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #871 > > let inline runWithTimeoutStrict (timeout : int) fn =
00:00:22 verbose #872 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:22 verbose #873 > >
00:00:22 verbose #874 > > let timeoutTask = async {
00:00:22 verbose #875 > > do! Async.Sleep timeout
00:00:22 verbose #876 > > return None, _locals
00:00:22 verbose #877 > > }
00:00:22 verbose #878 > >
00:00:22 verbose #879 > > let task = async {
00:00:22 verbose #880 > > try
00:00:22 verbose #881 > > return Async.RunSynchronously (fn, timeout) |> Some, _locals
00:00:22 verbose #882 > > with
00:00:22 verbose #883 > > | :? System.TimeoutException as ex ->
00:00:22 verbose #884 > > let _locals () = $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:22 verbose #885 > > ()}"
00:00:22 verbose #886 > > return None, _locals
00:00:22 verbose #887 > > | ex ->
00:00:22 verbose #888 > > trace Critical
00:00:22 verbose #889 > > (fun () -> "runWithTimeoutStrict / async error")
00:00:22 verbose #890 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:22 verbose #891 > > ()}")
00:00:22 verbose #892 > > return raise ex
00:00:22 verbose #893 > > }
00:00:22 verbose #894 > >
00:00:22 verbose #895 > > try
00:00:22 verbose #896 > > [[| timeoutTask; task |]]
00:00:22 verbose #897 > > |> Array.map Async.StartAsTask
00:00:22 verbose #898 > > |> System.Threading.Tasks.Task.WhenAny
00:00:22 verbose #899 > > |> fun task ->
00:00:22 verbose #900 > > match task.Result.Result with
00:00:22 verbose #901 > > | None, _locals ->
00:00:22 verbose #902 > > trace Debug (fun () -> "runWithTimeoutStrict") _locals
00:00:22 verbose #903 > > None
00:00:22 verbose #904 > > | result, _ -> result
00:00:22 verbose #905 > > with
00:00:22 verbose #906 > > | :? System.AggregateException as ex when
00:00:22 verbose #907 > > ex.InnerExceptions
00:00:22 verbose #908 > > |> Seq.exists (function :? System.Threading.Tasks.TaskCanceledException
00:00:22 verbose #909 > > -> true | _ -> false)
00:00:22 verbose #910 > > ->
00:00:22 verbose #911 > > trace Warning
00:00:22 verbose #912 > > (fun () -> "runWithTimeoutStrict")
00:00:22 verbose #913 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals ()}")
00:00:22 verbose #914 > > None
00:00:22 verbose #915 > > | ex ->
00:00:22 verbose #916 > > trace Critical
00:00:22 verbose #917 > > (fun () -> "runWithTimeoutStrict / task error")
00:00:22 verbose #918 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals ()}")
00:00:22 verbose #919 > > None
00:00:22 verbose #920 > >
00:00:22 verbose #921 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #922 > > //// test
00:00:22 verbose #923 > >
00:00:22 verbose #924 > > Async.Sleep 60
00:00:22 verbose #925 > > |> runWithTimeoutStrict 10
00:00:22 verbose #926 > > |> _assertEqual None
00:00:22 verbose #927 > >
00:00:22 verbose #928 > > ╭─[ 126.21ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 verbose #929 > > │ 00:00:02 debug #5 runWithTimeoutStrict / timeout: 10 │
00:00:22 verbose #930 > > │ <null> │
00:00:22 verbose #931 > > │ │
00:00:22 verbose #932 > > │ │
00:00:22 verbose #933 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #934 > >
00:00:22 verbose #935 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #936 > > //// test
00:00:22 verbose #937 > >
00:00:22 verbose #938 > > Async.Sleep 10
00:00:22 verbose #939 > > |> runWithTimeoutStrict 60
00:00:22 verbose #940 > > |> _assertEqual (Some ())
00:00:22 verbose #941 > >
00:00:22 verbose #942 > > ╭─[ 124.07ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 verbose #943 > > │ Some () │
00:00:22 verbose #944 > > │ │
00:00:22 verbose #945 > > │ │
00:00:22 verbose #946 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #947 > >
00:00:22 verbose #948 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #949 > > //// test
00:00:22 verbose #950 > >
00:00:22 verbose #951 > > async {
00:00:22 verbose #952 > > raise (exn "error")
00:00:22 verbose #953 > > }
00:00:22 verbose #954 > > |> runWithTimeoutStrict 60
00:00:22 verbose #955 > > |> _assertEqual None
00:00:23 verbose #956 > >
00:00:23 verbose #957 > > ╭─[ 149.45ms - stdout ]────────────────────────────────────────────────────────╮
00:00:23 verbose #958 > > │ 00:00:02 critical #6 runWithTimeoutStrict / async error / ex: │
00:00:23 verbose #959 > > │ System.Exception: error / timeout: 60 │
00:00:23 verbose #960 > > │ 00:00:02 critical #7 runWithTimeoutStrict / task error / ex: │
00:00:23 verbose #961 > > │ System.AggregateException: One or more errors occurred. (error) / timeout: │
00:00:23 verbose #962 > > │ 60 │
00:00:23 verbose #963 > > │ <null> │
00:00:23 verbose #964 > > │ │
00:00:23 verbose #965 > > │ │
00:00:23 verbose #966 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #967 > >
00:00:23 verbose #968 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:23 verbose #969 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:23 verbose #970 > > │ ## awaitValueTask │
00:00:23 verbose #971 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #972 > >
00:00:23 verbose #973 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #974 > > let inline awaitValueTaskUnit (task : System.Threading.Tasks.ValueTask) =
00:00:23 verbose #975 > > task.AsTask () |> Async.AwaitTask
00:00:23 verbose #976 > >
00:00:23 verbose #977 > > let inline awaitValueTask (task : System.Threading.Tasks.ValueTask<_>) =
00:00:23 verbose #978 > > task.AsTask () |> Async.AwaitTask
00:00:23 verbose #979 > >
00:00:23 verbose #980 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:23 verbose #981 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:23 verbose #982 > > │ ## init │
00:00:23 verbose #983 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #984 > >
00:00:23 verbose #985 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #986 > > let inline init x = async {
00:00:23 verbose #987 > > return x
00:00:23 verbose #988 > > }
00:00:23 verbose #989 > >
00:00:23 verbose #990 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #991 > > //// test
00:00:23 verbose #992 > >
00:00:23 verbose #993 > > init 1
00:00:23 verbose #994 > > |> Async.RunSynchronously
00:00:23 verbose #995 > > |> _assertEqual 1
00:00:23 verbose #996 > >
00:00:23 verbose #997 > > ╭─[ 32.62ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:23 verbose #998 > > │ 1 │
00:00:23 verbose #999 > > │ │
00:00:23 verbose #1000 > > │ │
00:00:23 verbose #1001 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #1002 > >
00:00:23 verbose #1003 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:23 verbose #1004 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:23 verbose #1005 > > │ ## withCancellationToken │
00:00:23 verbose #1006 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #1007 > >
00:00:23 verbose #1008 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #1009 > > let inline withCancellationToken (ct : System.Threading.CancellationToken) fn =
00:00:23 verbose #1010 > > Async.StartImmediateAsTask (fn, ct)
00:00:23 verbose #1011 > > |> Async.AwaitTask
00:00:23 verbose #1012 > >
00:00:23 verbose #1013 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #1014 > > //// test
00:00:23 verbose #1015 > >
00:00:23 verbose #1016 > > let cts = new System.Threading.CancellationTokenSource ()
00:00:23 verbose #1017 > >
00:00:23 verbose #1018 > > async {
00:00:23 verbose #1019 > > let run = async {
00:00:23 verbose #1020 > > do! Async.Sleep 100
00:00:23 verbose #1021 > > return 1
00:00:23 verbose #1022 > > }
00:00:23 verbose #1023 > >
00:00:23 verbose #1024 > > let! child =
00:00:23 verbose #1025 > > run
00:00:23 verbose #1026 > > |> withCancellationToken cts.Token
00:00:23 verbose #1027 > > |> catch
00:00:23 verbose #1028 > > |> Async.StartChild
00:00:23 verbose #1029 > >
00:00:23 verbose #1030 > > do! Async.Sleep 50
00:00:23 verbose #1031 > > cts.Cancel ()
00:00:23 verbose #1032 > > return! child
00:00:23 verbose #1033 > > }
00:00:23 verbose #1034 > > |> Async.RunSynchronously
00:00:23 verbose #1035 > > |> Result.mapError _.Message
00:00:23 verbose #1036 > > |> _assertEqual (Error ("A task was canceled."))
00:00:23 verbose #1037 > >
00:00:23 verbose #1038 > > ╭─[ 212.12ms - stdout ]────────────────────────────────────────────────────────╮
00:00:23 verbose #1039 > > │ Error "A task was canceled." │
00:00:23 verbose #1040 > > │ │
00:00:23 verbose #1041 > > │ │
00:00:23 verbose #1042 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #1043 > >
00:00:23 verbose #1044 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:23 verbose #1045 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:23 verbose #1046 > > │ ## retryAsync │
00:00:23 verbose #1047 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #1048 > >
00:00:23 verbose #1049 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #1050 > > let inline retryAsync retries fn =
00:00:23 verbose #1051 > > let rec loop retry lastError = async {
00:00:23 verbose #1052 > > try
00:00:23 verbose #1053 > > return!
00:00:23 verbose #1054 > > if retry <= retries
00:00:23 verbose #1055 > > then fn |> map Ok
00:00:23 verbose #1056 > > else lastError |> Error |> init
00:00:23 verbose #1057 > > with ex ->
00:00:23 verbose #1058 > > trace Debug (fun () -> $"Async.retryAsync / retry: {retry}/{retries}
00:00:23 verbose #1059 > > / ex: {ex |> SpiralSm.format_exception}") _locals
00:00:23 verbose #1060 > > do! Async.Sleep 1
00:00:23 verbose #1061 > > return! loop (retry + 1) (ex |> SpiralSm.format_exception)
00:00:23 verbose #1062 > > }
00:00:23 verbose #1063 > > loop 1 "Async.retryAsync / invalid retries / retries: {retries}"
00:00:23 verbose #1064 > >
00:00:23 verbose #1065 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #1066 > > //// test
00:00:23 verbose #1067 > >
00:00:23 verbose #1068 > > let retry_fn_test = ref 0
00:00:23 verbose #1069 > > async {
00:00:23 verbose #1070 > > retry_fn_test.Value <- retry_fn_test.Value + 1
00:00:23 verbose #1071 > > return retry_fn_test.Value
00:00:23 verbose #1072 > > }
00:00:23 verbose #1073 > > |> retryAsync 3
00:00:23 verbose #1074 > > |> Async.RunSynchronously
00:00:23 verbose #1075 > > |> _assertEqual (Ok 1)
00:00:23 verbose #1076 > >
00:00:23 verbose #1077 > > ╭─[ 111.32ms - stdout ]────────────────────────────────────────────────────────╮
00:00:23 verbose #1078 > > │ Ok 1 │
00:00:23 verbose #1079 > > │ │
00:00:23 verbose #1080 > > │ │
00:00:23 verbose #1081 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #1082 > >
00:00:23 verbose #1083 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #1084 > > //// test
00:00:23 verbose #1085 > >
00:00:23 verbose #1086 > > let retry_fn_test = ref 0
00:00:23 verbose #1087 > > async {
00:00:23 verbose #1088 > > return
00:00:23 verbose #1089 > > if retry_fn_test.Value >= 2
00:00:23 verbose #1090 > > then retry_fn_test.Value
00:00:23 verbose #1091 > > else
00:00:23 verbose #1092 > > retry_fn_test.Value <- retry_fn_test.Value + 1
00:00:23 verbose #1093 > > failwith "test"
00:00:23 verbose #1094 > > }
00:00:23 verbose #1095 > > |> retryAsync 3
00:00:23 verbose #1096 > > |> Async.RunSynchronously
00:00:23 verbose #1097 > > |> _assertEqual (Ok 2)
00:00:23 verbose #1098 > >
00:00:23 verbose #1099 > > ╭─[ 132.58ms - stdout ]────────────────────────────────────────────────────────╮
00:00:23 verbose #1100 > > │ 00:00:03 debug #8 Async.retryAsync / retry: 1/3 / ex: System.Exception: │
00:00:23 verbose #1101 > > │ test │
00:00:23 verbose #1102 > > │ 00:00:03 debug #9 Async.retryAsync / retry: 2/3 / ex: System.Exception: │
00:00:23 verbose #1103 > > │ test │
00:00:23 verbose #1104 > > │ Ok 2 │
00:00:23 verbose #1105 > > │ │
00:00:23 verbose #1106 > > │ │
00:00:23 verbose #1107 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #1108 > 00:00:21 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 38698
00:00:23 verbose #1109 > 00:00:21 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:25 verbose #1110 > 00:00:23 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb to html
00:00:25 verbose #1111 > 00:00:23 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:25 verbose #1112 > 00:00:23 verbose #7 ! validate(nb)
00:00:27 verbose #1113 > 00:00:25 verbose #8 ! [NbConvertApp] Writing 329914 bytes to c:\home\git\polyglot\lib\fsharp\Async.dib.html
00:00:27 verbose #1114 > 00:00:25 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 641
00:00:27 verbose #1115 > 00:00:25 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 641
00:00:27 verbose #1116 > 00:00:25 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:29 verbose #1117 > 00:00:26 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:29 verbose #1118 > 00:00:26 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:29 verbose #1119 > 00:00:27 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 39398
00:00:29 debug #1120 execute_with_options_async / exit_code: 0 / output.Length: 43814
00:00:29 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Async.dib --retries 3
00:00:29 debug #1121 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path AsyncSeq.dib --retries 3",
[||], None, None, true, None)
00:00:29 verbose #1122 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "AsyncSeq.dib", "--retries", "3"])
00:00:29 verbose #1123 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib" --output-path "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:32 verbose #1124 > >
00:00:32 verbose #1125 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:32 verbose #1126 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:32 verbose #1127 > > │ # AsyncSeq (Polyglot) │
00:00:32 verbose #1128 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 verbose #1129 > >
00:00:32 verbose #1130 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:32 verbose #1131 > > #!import ../../lib/fsharp/Notebooks.dib
00:00:32 verbose #1132 > > #!import ../../lib/fsharp/Testing.dib
00:00:32 verbose #1133 > >
00:00:32 verbose #1134 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:32 verbose #1135 > > #r
00:00:32 verbose #1136 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:32 verbose #1137 > > spNetCore.Html.Abstractions.dll"
00:00:32 verbose #1138 > > #r
00:00:32 verbose #1139 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:32 verbose #1140 > > otNet.Interactive.dll"
00:00:32 verbose #1141 > > #r
00:00:32 verbose #1142 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:32 verbose #1143 > > otNet.Interactive.FSharp.dll"
00:00:32 verbose #1144 > > #r
00:00:32 verbose #1145 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:32 verbose #1146 > > otNet.Interactive.Formatting.dll"
00:00:32 verbose #1147 > > open System
00:00:32 verbose #1148 > > open System.IO
00:00:32 verbose #1149 > > open System.Text
00:00:32 verbose #1150 > > open Microsoft.DotNet.Interactive.Formatting
00:00:36 verbose #1151 > >
00:00:36 verbose #1152 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:36 verbose #1153 > > #r
00:00:36 verbose #1154 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:36 verbose #1155 > > otNet.Interactive.FSharp.dll"
00:00:36 verbose #1156 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:36 verbose #1157 > > #r
00:00:36 verbose #1158 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:36 verbose #1159 > > otNet.Interactive.dll"
00:00:36 verbose #1160 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:36 verbose #1161 > >
00:00:36 verbose #1162 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:36 verbose #1163 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:00:37 verbose #1164 > >
00:00:37 verbose #1165 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:37 verbose #1166 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:00:37 verbose #1167 > > TextWriter)->fprintfn writer "%120A" x)
00:00:37 verbose #1168 > >
00:00:37 verbose #1169 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:37 verbose #1170 > > //// test
00:00:37 verbose #1171 > >
00:00:37 verbose #1172 > > Formatter.ListExpansionLimit <- 100
00:00:37 verbose #1173 > >
00:00:37 verbose #1174 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:37 verbose #1175 > > #if FABLE_COMPILER
00:00:37 verbose #1176 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:37 verbose #1177 > > #endif
00:00:37 verbose #1178 > > type std_env_VarError = class end
00:00:37 verbose #1179 > > #if FABLE_COMPILER
00:00:37 verbose #1180 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:37 verbose #1181 > > #endif
00:00:37 verbose #1182 > > type core_any_Any = class end
00:00:37 verbose #1183 > > #if FABLE_COMPILER
00:00:37 verbose #1184 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:37 verbose #1185 > > #endif
00:00:37 verbose #1186 > > type core_ops_Try<'T> = class end
00:00:37 verbose #1187 > > #if FABLE_COMPILER
00:00:37 verbose #1188 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:37 verbose #1189 > > #endif
00:00:37 verbose #1190 > > type Func0<'T> = class end
00:00:37 verbose #1191 > > #if FABLE_COMPILER
00:00:37 verbose #1192 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:37 verbose #1193 > > #endif
00:00:37 verbose #1194 > > type Func0<'T, 'U> = class end
00:00:37 verbose #1195 > > #if FABLE_COMPILER
00:00:37 verbose #1196 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:37 verbose #1197 > > #endif
00:00:37 verbose #1198 > > type Box<'T> = class end
00:00:37 verbose #1199 > > #if FABLE_COMPILER
00:00:37 verbose #1200 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:37 verbose #1201 > > #endif
00:00:37 verbose #1202 > > type Dyn<'T> = class end
00:00:37 verbose #1203 > > #if FABLE_COMPILER
00:00:37 verbose #1204 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:37 verbose #1205 > > #endif
00:00:37 verbose #1206 > > type Send<'T> = class end
00:00:37 verbose #1207 > > #if FABLE_COMPILER
00:00:37 verbose #1208 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:37 verbose #1209 > > #endif
00:00:37 verbose #1210 > > type Fn<'T> = class end
00:00:37 verbose #1211 > > #if FABLE_COMPILER
00:00:37 verbose #1212 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:37 verbose #1213 > > #endif
00:00:37 verbose #1214 > > type FnUnit = class end
00:00:37 verbose #1215 > > #if FABLE_COMPILER
00:00:37 verbose #1216 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:37 verbose #1217 > > #endif
00:00:37 verbose #1218 > > type FnOnce<'T> = class end
00:00:37 verbose #1219 > > #if FABLE_COMPILER
00:00:37 verbose #1220 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:37 verbose #1221 > > #endif
00:00:37 verbose #1222 > > type ActionFn<'T> = class end
00:00:37 verbose #1223 > > #if FABLE_COMPILER
00:00:37 verbose #1224 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:37 verbose #1225 > > #endif
00:00:37 verbose #1226 > > type ActionFn2<'T, 'U> = class end
00:00:37 verbose #1227 > > #if FABLE_COMPILER
00:00:37 verbose #1228 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:37 verbose #1229 > > #endif
00:00:37 verbose #1230 > > type Impl<'T> = class end
00:00:37 verbose #1231 > > #if FABLE_COMPILER
00:00:37 verbose #1232 > > [[<Fable...
00:00:39 verbose #1233 > >
00:00:39 verbose #1234 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:39 verbose #1235 > > #if FABLE_COMPILER
00:00:39 verbose #1236 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:39 verbose #1237 > > #endif
00:00:39 verbose #1238 > > type core_any_Any = class end
00:00:39 verbose #1239 > > #if FABLE_COMPILER
00:00:39 verbose #1240 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:39 verbose #1241 > > #endif
00:00:39 verbose #1242 > > type core_ops_Try<'T> = class end
00:00:39 verbose #1243 > > #if FABLE_COMPILER
00:00:39 verbose #1244 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:39 verbose #1245 > > #endif
00:00:39 verbose #1246 > > type Func0<'T> = class end
00:00:39 verbose #1247 > > #if FABLE_COMPILER
00:00:39 verbose #1248 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:39 verbose #1249 > > #endif
00:00:39 verbose #1250 > > type Func0<'T, 'U> = class end
00:00:39 verbose #1251 > > #if FABLE_COMPILER
00:00:39 verbose #1252 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:39 verbose #1253 > > #endif
00:00:39 verbose #1254 > > type Box<'T> = class end
00:00:39 verbose #1255 > > #if FABLE_COMPILER
00:00:39 verbose #1256 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:39 verbose #1257 > > #endif
00:00:39 verbose #1258 > > type Dyn<'T> = class end
00:00:39 verbose #1259 > > #if FABLE_COMPILER
00:00:39 verbose #1260 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:39 verbose #1261 > > #endif
00:00:39 verbose #1262 > > type Send<'T> = class end
00:00:39 verbose #1263 > > #if FABLE_COMPILER
00:00:39 verbose #1264 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:39 verbose #1265 > > #endif
00:00:39 verbose #1266 > > type Fn<'T> = class end
00:00:39 verbose #1267 > > #if FABLE_COMPILER
00:00:39 verbose #1268 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:39 verbose #1269 > > #endif
00:00:39 verbose #1270 > > type FnUnit = class end
00:00:39 verbose #1271 > > #if FABLE_COMPILER
00:00:39 verbose #1272 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:39 verbose #1273 > > #endif
00:00:39 verbose #1274 > > type FnOnce<'T> = class end
00:00:39 verbose #1275 > > #if FABLE_COMPILER
00:00:39 verbose #1276 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:39 verbose #1277 > > #endif
00:00:39 verbose #1278 > > type ActionFn<'T> = class end
00:00:39 verbose #1279 > > #if FABLE_COMPILER
00:00:39 verbose #1280 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:39 verbose #1281 > > #endif
00:00:39 verbose #1282 > > type ActionFn2<'T, 'U> = class end
00:00:39 verbose #1283 > > #if FABLE_COMPILER
00:00:39 verbose #1284 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:39 verbose #1285 > > #endif
00:00:39 verbose #1286 > > type Impl<'T> = class end
00:00:39 verbose #1287 > > #if FABLE_COMPILER
00:00:39 verbose #1288 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:39 verbose #1289 > > #endif
00:00:39 verbose #1290 > > type Mut<'T> = class end
00:00:39 verbose #1291 > > #if FABLE_COMPILER
00:00:39 verbose #1292 > > [[<Fable.Core.Erase; Fable.Co...
00:00:40 verbose #1293 > >
00:00:40 verbose #1294 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:40 verbose #1295 > > #if FABLE_COMPILER
00:00:40 verbose #1296 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:00:40 verbose #1297 > > #endif
00:00:40 verbose #1298 > > type async_std_task_JoinHandle<'T> = class end
00:00:40 verbose #1299 > > #if FABLE_COMPILER
00:00:40 verbose #1300 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:00:40 verbose #1301 > > #endif
00:00:40 verbose #1302 > > type std_future_Future<'T> = class end
00:00:40 verbose #1303 > > #if FABLE_COMPILER
00:00:40 verbose #1304 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:00:40 verbose #1305 > > #endif
00:00:40 verbose #1306 > > type rayon_vec_IntoIter<'T> = class end
00:00:40 verbose #1307 > > #if FABLE_COMPILER
00:00:40 verbose #1308 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:00:40 verbose #1309 > > #endif
00:00:40 verbose #1310 > > type rayon_iter_Map<'T> = class end
00:00:40 verbose #1311 > > #if FABLE_COMPILER
00:00:40 verbose #1312 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:00:40 verbose #1313 > > #endif
00:00:40 verbose #1314 > > type futures_lite_stream_StreamExt = class end
00:00:40 verbose #1315 > > #if FABLE_COMPILER
00:00:40 verbose #1316 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:00:40 verbose #1317 > > #endif
00:00:40 verbose #1318 > > type futures_future_TryJoinAll<'T> = class end
00:00:40 verbose #1319 > > #if FABLE_COMPILER
00:00:40 verbose #1320 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:00:40 verbose #1321 > > #endif
00:00:40 verbose #1322 > > type futures_future_Fuse<'T> = class end
00:00:40 verbose #1323 > > #if FABLE_COMPILER
00:00:40 verbose #1324 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:00:40 verbose #1325 > > #endif
00:00:40 verbose #1326 > > type futures_future_JoinAll<'T> = class end
00:00:40 verbose #1327 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:00:40 verbose #1328 > > Async<System.Threading.CancellationToken> =
00:00:40 verbose #1329 > > let v1 : bool = true
00:00:40 verbose #1330 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:00:40 verbose #1331 > >
00:00:40 verbose #1332 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:40 verbose #1333 > >
00:00:40 verbose #1334 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:40 verbose #1335 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:00:40 verbose #1336 > > unbox<Async<System...
00:00:41 verbose #1337 > >
00:00:41 verbose #1338 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:41 verbose #1339 > > #if FABLE_COMPILER
00:00:41 verbose #1340 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:00:41 verbose #1341 > > #endif
00:00:41 verbose #1342 > > type std_thread_JoinHandle<'T> = class end
00:00:41 verbose #1343 > > #if FABLE_COMPILER
00:00:41 verbose #1344 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:00:41 verbose #1345 > > #endif
00:00:41 verbose #1346 > > type std_sync_Arc<'T> = class end
00:00:41 verbose #1347 > > #if FABLE_COMPILER
00:00:41 verbose #1348 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:00:41 verbose #1349 > > #endif
00:00:41 verbose #1350 > > type std_sync_Mutex<'T> = class end
00:00:41 verbose #1351 > > #if FABLE_COMPILER
00:00:41 verbose #1352 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:00:41 verbose #1353 > > #endif
00:00:41 verbose #1354 > > type std_sync_MutexGuard<'T> = class end
00:00:41 verbose #1355 > > #if FABLE_COMPILER
00:00:41 verbose #1356 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:00:41 verbose #1357 > > #endif
00:00:41 verbose #1358 > > type std_sync_PoisonError<'T> = class end
00:00:41 verbose #1359 > > #if FABLE_COMPILER
00:00:41 verbose #1360 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:00:41 verbose #1361 > > #endif
00:00:41 verbose #1362 > > type std_sync_mpsc_Receiver<'T> = class end
00:00:41 verbose #1363 > > #if FABLE_COMPILER
00:00:41 verbose #1364 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:00:41 verbose #1365 > > #endif
00:00:41 verbose #1366 > > type std_sync_mpsc_SendError<'T> = class end
00:00:41 verbose #1367 > > #if FABLE_COMPILER
00:00:41 verbose #1368 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:00:41 verbose #1369 > > #endif
00:00:41 verbose #1370 > > type std_sync_mpsc_Sender<'T> = class end
00:00:41 verbose #1371 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:00:41 verbose #1372 > > _.Dispose () = f ()
00:00:41 verbose #1373 > > type [[<Struct>]] US0 =
00:00:41 verbose #1374 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:00:41 verbose #1375 > > | US0_1
00:00:41 verbose #1376 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:00:41 verbose #1377 > > let v1 : bool = true
00:00:41 verbose #1378 > > let mutable _v1 : unit option = None
00:00:41 verbose #1379 > >
00:00:41 verbose #1380 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:41 verbose #1381 > >
00:00:41 verbose #1382 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:00:41 verbose #1383 > >
00:00:41 verbose #1384 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:41 verbose #1385 > > #if FABLE_COMPILER
00:00:41 verbose #1386 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:00:41 verbose #1387 > > #endif
00:00:41 verbose #1388 > > type reqwest_Error = class end
00:00:41 verbose #1389 > > #if FABLE_COMPILER
00:00:41 verbose #1390 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:00:41 verbose #1391 > > #endif
00:00:41 verbose #1392 > > type reqwest_RequestBuilder = class end
00:00:41 verbose #1393 > > #if FABLE_COMPILER
00:00:41 verbose #1394 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:00:41 verbose #1395 > > #endif
00:00:41 verbose #1396 > > type reqwest_Response = class end
00:00:41 verbose #1397 > > #if FABLE_COMPILER
00:00:41 verbose #1398 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:41 verbose #1399 > > #endif
00:00:41 verbose #1400 > > type std_env_VarError = class end
00:00:41 verbose #1401 > > #if FABLE_COMPILER
00:00:41 verbose #1402 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:41 verbose #1403 > > #endif
00:00:41 verbose #1404 > > type core_any_Any = class end
00:00:41 verbose #1405 > > #if FABLE_COMPILER
00:00:41 verbose #1406 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:41 verbose #1407 > > #endif
00:00:41 verbose #1408 > > type core_ops_Try<'T> = class end
00:00:41 verbose #1409 > > #if FABLE_COMPILER
00:00:41 verbose #1410 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:41 verbose #1411 > > #endif
00:00:41 verbose #1412 > > type Func0<'T> = class end
00:00:41 verbose #1413 > > #if FABLE_COMPILER
00:00:41 verbose #1414 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:41 verbose #1415 > > #endif
00:00:41 verbose #1416 > > type Func0<'T, 'U> = class end
00:00:41 verbose #1417 > > #if FABLE_COMPILER
00:00:41 verbose #1418 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:41 verbose #1419 > > #endif
00:00:41 verbose #1420 > > type Box<'T> = class end
00:00:41 verbose #1421 > > #if FABLE_COMPILER
00:00:41 verbose #1422 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:41 verbose #1423 > > #endif
00:00:41 verbose #1424 > > type Dyn<'T> = class end
00:00:41 verbose #1425 > > #if FABLE_COMPILER
00:00:41 verbose #1426 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:41 verbose #1427 > > #endif
00:00:41 verbose #1428 > > type Send<'T> = class end
00:00:41 verbose #1429 > > #if FABLE_COMPILER
00:00:41 verbose #1430 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:41 verbose #1431 > > #endif
00:00:41 verbose #1432 > > type Fn<'T> = class end
00:00:41 verbose #1433 > > #if FABLE_COMPILER
00:00:41 verbose #1434 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:41 verbose #1435 > > #endif
00:00:41 verbose #1436 > > type FnUnit = class end
00:00:41 verbose #1437 > > #if FABLE_COMPILER
00:00:41 verbose #1438 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:41 verbose #1439 > > #...
00:00:43 verbose #1440 > >
00:00:43 verbose #1441 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:43 verbose #1442 > > #if FABLE_COMPILER
00:00:43 verbose #1443 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:00:43 verbose #1444 > > #endif
00:00:43 verbose #1445 > > type clap_Arg = class end
00:00:43 verbose #1446 > > #if FABLE_COMPILER
00:00:43 verbose #1447 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:00:43 verbose #1448 > > #endif
00:00:43 verbose #1449 > > type clap_ArgAction = class end
00:00:43 verbose #1450 > > #if FABLE_COMPILER
00:00:43 verbose #1451 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:00:43 verbose #1452 > > #endif
00:00:43 verbose #1453 > > type clap_Command = class end
00:00:43 verbose #1454 > > #if FABLE_COMPILER
00:00:43 verbose #1455 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:00:43 verbose #1456 > > #endif
00:00:43 verbose #1457 > > type clap_ArgMatches = class end
00:00:43 verbose #1458 > > #if FABLE_COMPILER
00:00:43 verbose #1459 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:00:43 verbose #1460 > > #endif
00:00:43 verbose #1461 > > type clap_builder_ValueRange = class end
00:00:43 verbose #1462 > > #if FABLE_COMPILER
00:00:43 verbose #1463 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:00:43 verbose #1464 > > #endif
00:00:43 verbose #1465 > > type clap_builder_ValueParser = class end
00:00:43 verbose #1466 > > #if FABLE_COMPILER
00:00:43 verbose #1467 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:00:43 verbose #1468 > > #endif
00:00:43 verbose #1469 > > type clap_builder_PossibleValue = class end
00:00:43 verbose #1470 > > #if FABLE_COMPILER
00:00:43 verbose #1471 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:00:43 verbose #1472 > > #endif
00:00:43 verbose #1473 > > type std_process_Child = class end
00:00:43 verbose #1474 > > #if FABLE_COMPILER
00:00:43 verbose #1475 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:00:43 verbose #1476 > > #endif
00:00:43 verbose #1477 > > type std_process_ChildStderr = class end
00:00:43 verbose #1478 > > #if FABLE_COMPILER
00:00:43 verbose #1479 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:00:43 verbose #1480 > > #endif
00:00:43 verbose #1481 > > type std_process_ChildStdout = class end
00:00:43 verbose #1482 > > #if FABLE_COMPILER
00:00:43 verbose #1483 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:00:43 verbose #1484 > > #endif
00:00:43 verbose #1485 > > type std_process_ChildStdin = class end
00:00:43 verbose #1486 > > #if FABLE_COMPILER
00:00:43 verbose #1487 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:00:43 verbose #1488 > > #endif
00:00:43 verbose #1489 > > type std_process_Command = class ...
00:00:45 verbose #1490 > >
00:00:45 verbose #1491 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:45 verbose #1492 > > #if FABLE_COMPILER
00:00:45 verbose #1493 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:00:45 verbose #1494 > > #endif
00:00:45 verbose #1495 > > type std_fs_File = class end
00:00:45 verbose #1496 > > #if FABLE_COMPILER
00:00:45 verbose #1497 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:00:45 verbose #1498 > > #endif
00:00:45 verbose #1499 > > type std_fs_FileType = class end
00:00:45 verbose #1500 > > #if FABLE_COMPILER
00:00:45 verbose #1501 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:00:45 verbose #1502 > > #endif
00:00:45 verbose #1503 > > type std_path_Display = class end
00:00:45 verbose #1504 > > #if FABLE_COMPILER
00:00:45 verbose #1505 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:00:45 verbose #1506 > > #endif
00:00:45 verbose #1507 > > type std_path_Path = class end
00:00:45 verbose #1508 > > #if FABLE_COMPILER
00:00:45 verbose #1509 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:00:45 verbose #1510 > > #endif
00:00:45 verbose #1511 > > type std_path_PathBuf = class end
00:00:45 verbose #1512 > > #if FABLE_COMPILER
00:00:45 verbose #1513 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:00:45 verbose #1514 > > #endif
00:00:45 verbose #1515 > > type async_walkdir_DirEntry = class end
00:00:45 verbose #1516 > > #if FABLE_COMPILER
00:00:45 verbose #1517 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:00:45 verbose #1518 > > #endif
00:00:45 verbose #1519 > > type async_walkdir_Filtering = class end
00:00:45 verbose #1520 > > #if FABLE_COMPILER
00:00:45 verbose #1521 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:00:45 verbose #1522 > > #endif
00:00:45 verbose #1523 > > type async_walkdir_WalkDir = class end
00:00:45 verbose #1524 > > #if FABLE_COMPILER
00:00:45 verbose #1525 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:45 verbose #1526 > > #endif
00:00:45 verbose #1527 > > type core_any_Any = class end
00:00:45 verbose #1528 > > #if FABLE_COMPILER
00:00:45 verbose #1529 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:45 verbose #1530 > > #endif
00:00:45 verbose #1531 > > type core_ops_Try<'T> = class end
00:00:45 verbose #1532 > > #if FABLE_COMPILER
00:00:45 verbose #1533 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:45 verbose #1534 > > #endif
00:00:45 verbose #1535 > > type Func0<'T> = class end
00:00:45 verbose #1536 > > #if FABLE_COMPILER
00:00:45 verbose #1537 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:45 verbose #1538 > > #endif
00:00:45 verbose #1539 > > type Func0<'T, 'U> = class end
00:00:45 verbose #1540 > > #if FABLE_COMPILER
00:00:45 verbose #1541 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:45 verbose #1542 > > #endif
00:00:45 verbose #1543 > > type Box<'T> = clas...
00:00:47 verbose #1544 > >
00:00:47 verbose #1545 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:47 verbose #1546 > > module SpiralTrace =
00:00:47 verbose #1547 > > let trace x =
00:00:47 verbose #1548 > > #if !INTERACTIVE
00:00:47 verbose #1549 > > Trace.trace x
00:00:47 verbose #1550 > > #else
00:00:47 verbose #1551 > > trace x
00:00:47 verbose #1552 > > #endif
00:00:47 verbose #1553 > >
00:00:47 verbose #1554 > > type TraceLevel =
00:00:47 verbose #1555 > > #if !INTERACTIVE
00:00:47 verbose #1556 > > Trace.US0
00:00:47 verbose #1557 > > #else
00:00:47 verbose #1558 > > US0
00:00:47 verbose #1559 > > #endif
00:00:47 verbose #1560 > >
00:00:47 verbose #1561 > > module SpiralCrypto =
00:00:47 verbose #1562 > > let hash_text x =
00:00:47 verbose #1563 > > #if !INTERACTIVE
00:00:47 verbose #1564 > > Crypto.hash_text x
00:00:47 verbose #1565 > > #else
00:00:47 verbose #1566 > > hash_text x
00:00:47 verbose #1567 > > #endif
00:00:47 verbose #1568 > >
00:00:47 verbose #1569 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:00:47 verbose #1570 > >
00:00:47 verbose #1571 > > module SpiralAsync =
00:00:47 verbose #1572 > > let merge_cancellation_token_with_default_async x =
00:00:47 verbose #1573 > > #if !INTERACTIVE
00:00:47 verbose #1574 > > Async_.merge_cancellation_token_with_default_async x
00:00:47 verbose #1575 > > #else
00:00:47 verbose #1576 > > merge_cancellation_token_with_default_async x
00:00:47 verbose #1577 > > #endif
00:00:47 verbose #1578 > >
00:00:47 verbose #1579 > > module SpiralThreading =
00:00:47 verbose #1580 > > let new_disposable_token x =
00:00:47 verbose #1581 > > #if !INTERACTIVE
00:00:47 verbose #1582 > > Threading.new_disposable_token x
00:00:47 verbose #1583 > > #else
00:00:47 verbose #1584 > > new_disposable_token x
00:00:47 verbose #1585 > > #endif
00:00:47 verbose #1586 > >
00:00:47 verbose #1587 > > module SpiralNetworking =
00:00:47 verbose #1588 > > let test_port_open x =
00:00:47 verbose #1589 > > #if !INTERACTIVE
00:00:47 verbose #1590 > > Networking.test_port_open x
00:00:47 verbose #1591 > > #else
00:00:47 verbose #1592 > > test_port_open x
00:00:47 verbose #1593 > > #endif
00:00:47 verbose #1594 > >
00:00:47 verbose #1595 > > let test_port_open_timeout x =
00:00:47 verbose #1596 > > #if !INTERACTIVE
00:00:47 verbose #1597 > > Networking.test_port_open_timeout x
00:00:47 verbose #1598 > > #else
00:00:47 verbose #1599 > > test_port_open_timeout x
00:00:47 verbose #1600 > > #endif
00:00:47 verbose #1601 > >
00:00:47 verbose #1602 > > let wait_for_port_access x =
00:00:47 verbose #1603 > > #if !INTERACTIVE
00:00:47 verbose #1604 > > Networking.wait_for_port_access x
00:00:47 verbose #1605 > > #else
00:00:47 verbose #1606 > > wait_for_port_access x
00:00:47 verbose #1607 > > #endif
00:00:47 verbose #1608 > >
00:00:47 verbose #1609 > > let get_available_port x =
00:00:47 verbose #1610 > > #if !INTERACTIVE
00:00:47 verbose #1611 > > Networking.get_available_port x
00:00:47 verbose #1612 > > #else
00:00:47 verbose #1613 > > get_available_port x
00:00:47 verbose #1614 > > #endif
00:00:47 verbose #1615 > >
00:00:47 verbose #1616 > > module SpiralRuntime =
00:00:47 verbose #1617 > > let get_executable_suffix () =
00:00:47 verbose #1618 > > #if !INTERACTIVE
00:00:47 verbose #1619 > > Runtime.get_executable_suffix ()
00:00:47 verbose #1620 > > #else
00:00:47 verbose #1621 > > get_executable_suffix ()
00:00:47 verbose #1622 > > #endif
00:00:47 verbose #1623 > >
00:00:47 verbose #1624 > > let is_windows () =
00:00:47 verbose #1625 > > #if !INTERACTIVE
00:00:47 verbose #1626 > > ...
00:00:48 verbose #1627 > >
00:00:48 verbose #1628 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:48 verbose #1629 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:00:48 verbose #1630 > >
00:00:48 verbose #1631 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:48 verbose #1632 > > //// test
00:00:48 verbose #1633 > >
00:00:48 verbose #1634 > > type AssertExceptionFormatter (ex) =
00:00:48 verbose #1635 > > member _.Text =
00:00:48 verbose #1636 > > ex.ToString()
00:00:48 verbose #1637 > > .Replace("32m", "<span style=\"color: green;\">")
00:00:48 verbose #1638 > > .Replace("36m", "</span>")
00:00:48 verbose #1639 > > .Replace("31m", "<span style=\"color: red;\">")
00:00:48 verbose #1640 > > .Replace("\n", "<br/>\n")
00:00:48 verbose #1641 > >
00:00:48 verbose #1642 > >
00:00:48 verbose #1643 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:00:48 verbose #1644 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:00:48 verbose #1645 > >
00:00:48 verbose #1646 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:48 verbose #1647 > > //// test
00:00:48 verbose #1648 > >
00:00:48 verbose #1649 > > let inline __expect fn log expected actual =
00:00:48 verbose #1650 > > if log then printfn $"{actual.ToDisplayString ()}"
00:00:48 verbose #1651 > > try
00:00:48 verbose #1652 > > "Testing.__expect" |> fn actual expected
00:00:48 verbose #1653 > > with :? Expecto.AssertException as ex ->
00:00:48 verbose #1654 > > AssertExceptionFormatter(ex).Display () |> ignore
00:00:48 verbose #1655 > > failwith (ex.GetType().FullName)
00:00:48 verbose #1656 > >
00:00:48 verbose #1657 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:00:48 verbose #1658 > > expected actual
00:00:48 verbose #1659 > > let inline _contains expected actual = __contains true expected actual
00:00:48 verbose #1660 > >
00:00:48 verbose #1661 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:00:48 verbose #1662 > > expected actual
00:00:48 verbose #1663 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:00:48 verbose #1664 > >
00:00:48 verbose #1665 > > let inline __isGreaterThan log expected actual = __expect
00:00:48 verbose #1666 > > Expecto.Expect.isGreaterThan log expected actual
00:00:48 verbose #1667 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:00:48 verbose #1668 > >
00:00:48 verbose #1669 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:00:48 verbose #1670 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:00:48 verbose #1671 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:00:48 verbose #1672 > > expected actual
00:00:48 verbose #1673 > >
00:00:48 verbose #1674 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:00:48 verbose #1675 > > log expected actual
00:00:48 verbose #1676 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:00:48 verbose #1677 > >
00:00:48 verbose #1678 > > let inline __isLessThanOrEqual log expected actual = __expect
00:00:48 verbose #1679 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:00:48 verbose #1680 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:00:48 verbose #1681 > > expected actual
00:00:48 verbose #1682 > >
00:00:48 verbose #1683 > > let inline __sequenceEqual log expected actual = __expe...
00:00:48 verbose #1684 > >
00:00:48 verbose #1685 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:48 verbose #1686 > > //// test
00:00:48 verbose #1687 > >
00:00:48 verbose #1688 > > let inline __isBetween log a b actual =
00:00:48 verbose #1689 > > let inline isBetween actual (a, b) _ =
00:00:48 verbose #1690 > > __isGreaterThanOrEqual log a actual
00:00:48 verbose #1691 > > __isLessThanOrEqual log b actual
00:00:48 verbose #1692 > > __expect isBetween log (a, b) actual
00:00:48 verbose #1693 > > let inline _isBetween a b actual = __isBetween true a b actual
00:00:48 verbose #1694 > >
00:00:48 verbose #1695 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:48 verbose #1696 > > #r
00:00:48 verbose #1697 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:00:48 verbose #1698 > > dard2.1/FSharp.Control.AsyncSeq.dll"
00:00:48 verbose #1699 > > #r
00:00:48 verbose #1700 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:00:48 verbose #1701 > > 0/System.Reactive.dll"
00:00:48 verbose #1702 > > #r
00:00:48 verbose #1703 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:00:48 verbose #1704 > > netstandard2.0/System.Reactive.Linq.dll"
00:00:48 verbose #1705 > >
00:00:48 verbose #1706 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:48 verbose #1707 > > #!import ../../lib/fsharp/Common.fs
00:00:48 verbose #1708 > > #!import ../../lib/fsharp/Async.fs
00:00:48 verbose #1709 > >
00:00:48 verbose #1710 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:48 verbose #1711 > > #if !INTERACTIVE
00:00:48 verbose #1712 > > namespace Polyglot
00:00:48 verbose #1713 > > #endif
00:00:48 verbose #1714 > >
00:00:48 verbose #1715 > > module Common =
00:00:48 verbose #1716 > >
00:00:48 verbose #1717 > > #if !INTERACTIVE
00:00:48 verbose #1718 > > open Lib
00:00:48 verbose #1719 > > #endif
00:00:48 verbose #1720 > >
00:00:48 verbose #1721 > > let nl = System.Environment.NewLine
00:00:48 verbose #1722 > > let q = @""""
00:00:48 verbose #1723 > >
00:00:48 verbose #1724 > > let inline cons head tail = head :: tail
00:00:48 verbose #1725 > >
00:00:48 verbose #1726 > > /// ## memoize
00:00:48 verbose #1727 > > let inline memoize fn =
00:00:48 verbose #1728 > > let result = lazy fn ()
00:00:48 verbose #1729 > > fun () -> result.Value
00:00:48 verbose #1730 > >
00:00:48 verbose #1731 > > /// ## TraceLevel
00:00:48 verbose #1732 > > type TraceLevel =
00:00:48 verbose #1733 > > | Verbose
00:00:48 verbose #1734 > > | Debug
00:00:48 verbose #1735 > > | Info
00:00:48 verbose #1736 > > | Warning
00:00:48 verbose #1737 > > | Critical
00:00:48 verbose #1738 > >
00:00:48 verbose #1739 > > let inline _locals () = ""
00:00:48 verbose #1740 > >
00:00:48 verbose #1741 > > /// ## trace
00:00:48 verbose #1742 > > let to_trace_level = function
00:00:48 verbose #1743 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:00:48 verbose #1744 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:00:48 verbose #1745 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:00:48 verbose #1746 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:00:48 verbose #1747 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:00:48 verbose #1748 > >
00:00:48 verbose #1749 > > let trace level fn locals =
00:00:48 verbose #1750 > > let level = level |> to_trace_level
00:00:48 verbose #1751 > > SpiralTrace.trace level fn locals
00:00:48 verbose #1752 > >
00:00:48 verbose #1753 > >
00:00:48 verbose #1754 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:48 verbose #1755 > > #if !INTERACTIVE
00:00:48 verbose #1756 > > namespace Polyglot
00:00:48 verbose #1757 > > #endif
00:00:48 verbose #1758 > >
00:00:48 verbose #1759 > > module Async =
00:00:48 verbose #1760 > >
00:00:48 verbose #1761 > > #if !INTERACTIVE
00:00:48 verbose #1762 > > open Lib
00:00:48 verbose #1763 > > #endif
00:00:48 verbose #1764 > >
00:00:48 verbose #1765 > > open Common
00:00:48 verbose #1766 > >
00:00:48 verbose #1767 > > /// ## choice
00:00:48 verbose #1768 > > let inline choice asyncs = async {
00:00:48 verbose #1769 > > let e = Event<_> ()
00:00:48 verbose #1770 > > use cts = new System.Threading.CancellationTokenSource ()
00:00:48 verbose #1771 > > let fn =
00:00:48 verbose #1772 > > asyncs
00:00:48 verbose #1773 > > |> Seq.map (fun a -> async {
00:00:48 verbose #1774 > > let! x = a
00:00:48 verbose #1775 > > e.Trigger x
00:00:48 verbose #1776 > > })
00:00:48 verbose #1777 > > |> Async.Parallel
00:00:48 verbose #1778 > > |> Async.Ignore
00:00:48 verbose #1779 > > Async.Start (fn, cts.Token)
00:00:48 verbose #1780 > > let! result = Async.AwaitEvent e.Publish
00:00:48 verbose #1781 > > cts.Cancel ()
00:00:48 verbose #1782 > > return result
00:00:48 verbose #1783 > > }
00:00:48 verbose #1784 > >
00:00:48 verbose #1785 > > /// ## map
00:00:48 verbose #1786 > > let inline map fn a = async {
00:00:48 verbose #1787 > > let! x = a
00:00:48 verbose #1788 > > return fn x
00:00:48 verbose #1789 > > }
00:00:48 verbose #1790 > >
00:00:48 verbose #1791 > > /// ## catch
00:00:48 verbose #1792 > > let inline catch a =
00:00:48 verbose #1793 > > a
00:00:48 verbose #1794 > > |> Async.Catch
00:00:48 verbose #1795 > > |> map (function
00:00:48 verbose #1796 > > | Choice1Of2 result -> Ok result
00:00:48 verbose #1797 > > | Choice2Of2 ex -> Error ex
00:00:48 verbose #1798 > > )
00:00:48 verbose #1799 > >
00:00:48 verbose #1800 > > /// ## runWithTimeoutChoiceAsync
00:00:48 verbose #1801 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:00:48 verbose #1802 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:48 verbose #1803 > >
00:00:48 verbose #1804 > > let timeoutTask = async {
00:00:48 verbose #1805 > > do! Async.Sleep timeout
00:00:48 verbose #1806 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:00:48 verbose #1807 > > return None
00:00:48 verbose #1808 > > }
00:00:48 verbose #1809 > >
00:00:48 verbose #1810 > > let task = async {
00:00:48 verbose #1811 > > try
00:00:48 verbose #1812 > > let! result = fn
00:00:48 verbose #1813 > > return Some result
00:00:48 verbose #1814 > > with
00:00:48 verbose #1815 > > | :? System.AggregateException as ex when
00:00:48 verbose #1816 > > ex.InnerExceptions
00:00:48 verbose #1817 > > |> Seq.exists (function :? Sys...
00:00:49 verbose #1818 > >
00:00:49 verbose #1819 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:49 verbose #1820 > > #if !INTERACTIVE
00:00:49 verbose #1821 > > open Lib
00:00:49 verbose #1822 > > #endif
00:00:49 verbose #1823 > >
00:00:49 verbose #1824 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:49 verbose #1825 > > open Common
00:00:49 verbose #1826 > >
00:00:49 verbose #1827 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:49 verbose #1828 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:49 verbose #1829 > > │ ## subscribeEvent │
00:00:49 verbose #1830 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:49 verbose #1831 > >
00:00:49 verbose #1832 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:49 verbose #1833 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:00:49 verbose #1834 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:00:49 verbose #1835 > > 'A>(event.AddHandler, event.RemoveHandler)
00:00:49 verbose #1836 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:00:49 verbose #1837 > > event.EventArgs)
00:00:49 verbose #1838 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:00:49 verbose #1839 > >
00:00:49 verbose #1840 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:49 verbose #1841 > > //// test
00:00:49 verbose #1842 > >
00:00:49 verbose #1843 > > type TestEvent () as self =
00:00:49 verbose #1844 > > member val Calls = [[]] with get, set
00:00:49 verbose #1845 > > member val Event = Event<ErrorEventHandler, ErrorEventArgs> () with get
00:00:49 verbose #1846 > >
00:00:49 verbose #1847 > > member _.AddCall text =
00:00:49 verbose #1848 > > self.Calls <- self.Calls @ [[ text ]]
00:00:49 verbose #1849 > >
00:00:49 verbose #1850 > > member _.EventInterface =
00:00:49 verbose #1851 > > { new IEvent<ErrorEventHandler, ErrorEventArgs> with
00:00:49 verbose #1852 > > member _.AddHandler handler =
00:00:49 verbose #1853 > > self.AddCall "AddHandler"
00:00:49 verbose #1854 > > self.Event.Publish.AddHandler handler
00:00:49 verbose #1855 > >
00:00:49 verbose #1856 > > member _.RemoveHandler handler =
00:00:49 verbose #1857 > > self.AddCall "RemoveHandler"
00:00:49 verbose #1858 > > self.Event.Publish.RemoveHandler handler
00:00:49 verbose #1859 > >
00:00:49 verbose #1860 > > member _.Subscribe observer =
00:00:49 verbose #1861 > > self.AddCall "IObservable.Subscribe"
00:00:49 verbose #1862 > > let disposable = self.Event.Publish.Subscribe observer
00:00:49 verbose #1863 > > new_disposable (fun () ->
00:00:49 verbose #1864 > > self.AddCall "IObservable.Dispose"
00:00:49 verbose #1865 > > disposable.Dispose ()
00:00:49 verbose #1866 > > )
00:00:49 verbose #1867 > > }
00:00:49 verbose #1868 > >
00:00:49 verbose #1869 > > member _.Subscribe () =
00:00:49 verbose #1870 > > subscribeEvent
00:00:49 verbose #1871 > > self.EventInterface
00:00:49 verbose #1872 > > (fun args ->
00:00:49 verbose #1873 > > let result = args.GetException () |> SpiralSm.format_exception
00:00:49 verbose #1874 > > self.AddCall $"TestEvent.Subscribe({result})"
00:00:49 verbose #1875 > > result
00:00:49 verbose #1876 > > )
00:00:49 verbose #1877 > >
00:00:49 verbose #1878 > > member _.Iter subscription =
00:00:49 verbose #1879 > > subscription
00:00:49 verbose #1880 > > |> FSharp.Control.AsyncSeq.iteriAsync (fun i error -> async {
00:00:49 verbose #1881 > > self.AddCall $"TestEvent.Iter({i}: {error})"
00:00:49 verbose #1882 > > })
00:00:49 verbose #1883 > >
00:00:49 verbose #1884 > > member _.WaitCall text = async {
00:00:49 verbose #1885 > > while self.Calls |> List.last <> text do
00:00:49 verbose #1886 > > do! Async.SwitchToThreadPool ()
00:00:49 verbose #1887 > > }
00:00:49 verbose #1888 > >
00:00:49 verbose #1889 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:49 verbose #1890 > > //// test
00:00:49 verbose #1891 > >
00:00:49 verbose #1892 > > let testEvent = TestEvent ()
00:00:49 verbose #1893 > >
00:00:49 verbose #1894 > > async {
00:00:49 verbose #1895 > > testEvent.AddCall "1"
00:00:49 verbose #1896 > > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
00:00:49 verbose #1897 > > do! testEvent.WaitCall "AddHandler"
00:00:49 verbose #1898 > > testEvent.AddCall "2"
00:00:49 verbose #1899 > > do! child
00:00:49 verbose #1900 > > testEvent.AddCall "3"
00:00:49 verbose #1901 > > }
00:00:49 verbose #1902 > > |> Async.runWithTimeout 300
00:00:49 verbose #1903 > > |> _assertEqual None
00:00:49 verbose #1904 > >
00:00:49 verbose #1905 > > testEvent.Calls
00:00:49 verbose #1906 > > |> Seq.toList
00:00:49 verbose #1907 > > |> _assertEqual [[ "1"; "AddHandler"; "2"; "RemoveHandler" ]]
00:00:50 verbose #1908 > >
00:00:50 verbose #1909 > > ╭─[ 507.77ms - stdout ]────────────────────────────────────────────────────────╮
00:00:50 verbose #1910 > > │ 00:00:02 debug #1 runWithTimeoutAsync / timeout: 300 │
00:00:50 verbose #1911 > > │ <null> │
00:00:50 verbose #1912 > > │ │
00:00:50 verbose #1913 > > │ ["1"; "AddHandler"; "2"; "RemoveHandler"] │
00:00:50 verbose #1914 > > │ │
00:00:50 verbose #1915 > > │ │
00:00:50 verbose #1916 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:50 verbose #1917 > >
00:00:50 verbose #1918 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:50 verbose #1919 > > //// test
00:00:50 verbose #1920 > >
00:00:50 verbose #1921 > > let testEvent = TestEvent ()
00:00:50 verbose #1922 > >
00:00:50 verbose #1923 > > async {
00:00:50 verbose #1924 > > testEvent.AddCall "1"
00:00:50 verbose #1925 > > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
00:00:50 verbose #1926 > > do! testEvent.WaitCall "AddHandler"
00:00:50 verbose #1927 > > testEvent.AddCall "2"
00:00:50 verbose #1928 > > use _ = testEvent.EventInterface.Subscribe (fun args ->
00:00:50 verbose #1929 > > testEvent.AddCall $"testEvent.EventInterface.Subscribe({args})"
00:00:50 verbose #1930 > > )
00:00:50 verbose #1931 > > testEvent.AddCall "3"
00:00:50 verbose #1932 > > do! child
00:00:50 verbose #1933 > > testEvent.AddCall "4"
00:00:50 verbose #1934 > > }
00:00:50 verbose #1935 > > |> Async.runWithTimeout 300
00:00:50 verbose #1936 > > |> _assertEqual None
00:00:50 verbose #1937 > >
00:00:50 verbose #1938 > > testEvent.Calls
00:00:50 verbose #1939 > > |> _assertEqual [[ "1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3";
00:00:50 verbose #1940 > > "RemoveHandler"; "IObservable.Dispose" ]]
00:00:50 verbose #1941 > >
00:00:50 verbose #1942 > > ╭─[ 449.95ms - stdout ]────────────────────────────────────────────────────────╮
00:00:50 verbose #1943 > > │ 00:00:02 debug #2 runWithTimeoutAsync / timeout: 300 │
00:00:50 verbose #1944 > > │ <null> │
00:00:50 verbose #1945 > > │ │
00:00:50 verbose #1946 > > │ ["1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3"; "RemoveHandler"; │
00:00:50 verbose #1947 > > │ "IObservable.Dispose"] │
00:00:50 verbose #1948 > > │ │
00:00:50 verbose #1949 > > │ │
00:00:50 verbose #1950 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:50 verbose #1951 > >
00:00:50 verbose #1952 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:50 verbose #1953 > > //// test
00:00:50 verbose #1954 > >
00:00:50 verbose #1955 > > let testEvent = TestEvent ()
00:00:50 verbose #1956 > >
00:00:50 verbose #1957 > > async {
00:00:50 verbose #1958 > > testEvent.AddCall "1"
00:00:50 verbose #1959 > > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
00:00:50 verbose #1960 > > do! testEvent.WaitCall "AddHandler"
00:00:50 verbose #1961 > > testEvent.AddCall "2"
00:00:50 verbose #1962 > > use _ = testEvent.EventInterface.Subscribe (fun args ->
00:00:50 verbose #1963 > > async {
00:00:50 verbose #1964 > > do! testEvent.WaitCall "TestEvent.Iter(0: System.Exception: error)"
00:00:50 verbose #1965 > > testEvent.AddCall
00:00:50 verbose #1966 > > $"testEvent.EventInterface.Subscribe({args.GetException () |>
00:00:50 verbose #1967 > > SpiralSm.format_exception})"
00:00:50 verbose #1968 > > }
00:00:50 verbose #1969 > > |> Async.RunSynchronously
00:00:50 verbose #1970 > > )
00:00:50 verbose #1971 > > testEvent.AddCall "3"
00:00:50 verbose #1972 > > testEvent.Event.Trigger (null, ErrorEventArgs (Exception "error"))
00:00:50 verbose #1973 > > testEvent.AddCall "4"
00:00:50 verbose #1974 > > do! child
00:00:50 verbose #1975 > > testEvent.AddCall "5"
00:00:50 verbose #1976 > > }
00:00:50 verbose #1977 > > |> Async.runWithTimeout 300
00:00:50 verbose #1978 > > |> _assertEqual None
00:00:50 verbose #1979 > >
00:00:50 verbose #1980 > > testEvent.Calls
00:00:50 verbose #1981 > > |> _assertEqual [[
00:00:50 verbose #1982 > > "1"
00:00:50 verbose #1983 > > "AddHandler"
00:00:50 verbose #1984 > > "2"
00:00:50 verbose #1985 > > "IObservable.Subscribe"
00:00:50 verbose #1986 > > "3"
00:00:50 verbose #1987 > > "TestEvent.Subscribe(System.Exception: error)"
00:00:50 verbose #1988 > > "TestEvent.Iter(0: System.Exception: error)"
00:00:50 verbose #1989 > > "testEvent.EventInterface.Subscribe(System.Exception: error)"
00:00:50 verbose #1990 > > "4"
00:00:50 verbose #1991 > > "RemoveHandler"
00:00:50 verbose #1992 > > "IObservable.Dispose"
00:00:50 verbose #1993 > > ]]
00:00:50 verbose #1994 > >
00:00:50 verbose #1995 > > ╭─[ 452.03ms - stdout ]────────────────────────────────────────────────────────╮
00:00:50 verbose #1996 > > │ 00:00:03 debug #3 runWithTimeoutAsync / timeout: 300 │
00:00:50 verbose #1997 > > │ <null> │
00:00:50 verbose #1998 > > │ │
00:00:50 verbose #1999 > > │ ["1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3"; │
00:00:50 verbose #2000 > > │ "TestEvent.Subscribe(System.Exception: error)"; │
00:00:50 verbose #2001 > > │ "TestEvent.Iter(0: System.Exception: error)"; │
00:00:50 verbose #2002 > > │ "testEvent.EventInterface.Subscribe(System.Exception: error)"; "4"; │
00:00:50 verbose #2003 > > │ "RemoveHandler"; "IObservable.Dispose"] │
00:00:50 verbose #2004 > > │ │
00:00:50 verbose #2005 > > │ │
00:00:50 verbose #2006 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:50 verbose #2007 > >
00:00:50 verbose #2008 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:50 verbose #2009 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:50 verbose #2010 > > │ ## subscribeToken │
00:00:50 verbose #2011 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:50 verbose #2012 > >
00:00:50 verbose #2013 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:50 verbose #2014 > > let subscribeToken (token : System.Threading.CancellationToken) =
00:00:50 verbose #2015 > > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:00:50 verbose #2016 > > System.Action tcs.SetResult |> token.Register |> ignore
00:00:50 verbose #2017 > > let start = System.DateTime.Now.Ticks
00:00:50 verbose #2018 > > FSharp.Control.AsyncSeq.unfoldAsync
00:00:50 verbose #2019 > > (fun () -> async {
00:00:50 verbose #2020 > > do! tcs.Task |> Async.AwaitTask
00:00:50 verbose #2021 > > return Some (System.DateTime.Now.Ticks - start, ())
00:00:50 verbose #2022 > > })
00:00:50 verbose #2023 > > ()
00:00:51 verbose #2024 > >
00:00:51 verbose #2025 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:51 verbose #2026 > > //// test
00:00:51 verbose #2027 > >
00:00:51 verbose #2028 > > let cts = new System.Threading.CancellationTokenSource ()
00:00:51 verbose #2029 > >
00:00:51 verbose #2030 > > async {
00:00:51 verbose #2031 > > let! child =
00:00:51 verbose #2032 > > cts.Token
00:00:51 verbose #2033 > > |> subscribeToken
00:00:51 verbose #2034 > > |> FSharp.Control.AsyncSeq.tryFirst
00:00:51 verbose #2035 > > |> Async.StartChild
00:00:51 verbose #2036 > >
00:00:51 verbose #2037 > > do! Async.Sleep 100
00:00:51 verbose #2038 > > cts.Cancel ()
00:00:51 verbose #2039 > > return! child
00:00:51 verbose #2040 > > }
00:00:51 verbose #2041 > > |> Async.RunSynchronously
00:00:51 verbose #2042 > > |> Option.get
00:00:51 verbose #2043 > > |> _isGreaterThan 900000
00:00:51 verbose #2044 > >
00:00:51 verbose #2045 > > ╭─[ 188.28ms - stdout ]────────────────────────────────────────────────────────╮
00:00:51 verbose #2046 > > │ 1130076L │
00:00:51 verbose #2047 > > │ │
00:00:51 verbose #2048 > > │ │
00:00:51 verbose #2049 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:51 verbose #2050 > 00:00:21 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 29568
00:00:51 verbose #2051 > 00:00:21 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:53 verbose #2052 > 00:00:23 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb to html
00:00:53 verbose #2053 > 00:00:23 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:53 verbose #2054 > 00:00:23 verbose #7 ! validate(nb)
00:00:54 verbose #2055 > 00:00:24 verbose #8 ! [NbConvertApp] Writing 302561 bytes to c:\home\git\polyglot\lib\fsharp\AsyncSeq.dib.html
00:00:54 verbose #2056 > 00:00:25 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 647
00:00:54 verbose #2057 > 00:00:25 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 647
00:00:54 verbose #2058 > 00:00:25 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:55 verbose #2059 > 00:00:26 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:55 verbose #2060 > 00:00:26 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:56 verbose #2061 > 00:00:26 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 30274
00:00:56 debug #2062 execute_with_options_async / exit_code: 0 / output.Length: 34373
00:00:56 debug #4 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path AsyncSeq.dib --retries 3
00:00:56 debug #2063 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path Common.dib --retries 3",
[||], None, None, true, None)
00:00:56 verbose #2064 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Common.dib", "--retries", "3"])
00:00:56 verbose #2065 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/Common.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Common.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:58 verbose #2066 > >
00:00:58 verbose #2067 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:58 verbose #2068 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:58 verbose #2069 > > │ # Common (Polyglot) │
00:00:58 verbose #2070 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:58 verbose #2071 > >
00:00:58 verbose #2072 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:58 verbose #2073 > > #!import ../../lib/fsharp/Notebooks.dib
00:00:58 verbose #2074 > > #!import ../../lib/fsharp/Testing.dib
00:00:58 verbose #2075 > >
00:00:58 verbose #2076 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:58 verbose #2077 > > #r
00:00:58 verbose #2078 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:58 verbose #2079 > > spNetCore.Html.Abstractions.dll"
00:00:58 verbose #2080 > > #r
00:00:58 verbose #2081 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:58 verbose #2082 > > otNet.Interactive.dll"
00:00:58 verbose #2083 > > #r
00:00:58 verbose #2084 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:58 verbose #2085 > > otNet.Interactive.FSharp.dll"
00:00:58 verbose #2086 > > #r
00:00:58 verbose #2087 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:58 verbose #2088 > > otNet.Interactive.Formatting.dll"
00:00:58 verbose #2089 > > open System
00:00:58 verbose #2090 > > open System.IO
00:00:58 verbose #2091 > > open System.Text
00:00:58 verbose #2092 > > open Microsoft.DotNet.Interactive.Formatting
00:01:02 verbose #2093 > >
00:01:02 verbose #2094 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:02 verbose #2095 > > #r
00:01:02 verbose #2096 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:02 verbose #2097 > > otNet.Interactive.FSharp.dll"
00:01:02 verbose #2098 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:01:02 verbose #2099 > > #r
00:01:02 verbose #2100 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:02 verbose #2101 > > otNet.Interactive.dll"
00:01:02 verbose #2102 > > open type Microsoft.DotNet.Interactive.Kernel
00:01:02 verbose #2103 > >
00:01:02 verbose #2104 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:02 verbose #2105 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:01:03 verbose #2106 > >
00:01:03 verbose #2107 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:03 verbose #2108 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:01:03 verbose #2109 > > TextWriter)->fprintfn writer "%120A" x)
00:01:03 verbose #2110 > >
00:01:03 verbose #2111 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:03 verbose #2112 > > //// test
00:01:03 verbose #2113 > >
00:01:03 verbose #2114 > > Formatter.ListExpansionLimit <- 100
00:01:03 verbose #2115 > >
00:01:03 verbose #2116 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:03 verbose #2117 > > #if FABLE_COMPILER
00:01:03 verbose #2118 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:03 verbose #2119 > > #endif
00:01:03 verbose #2120 > > type std_env_VarError = class end
00:01:03 verbose #2121 > > #if FABLE_COMPILER
00:01:03 verbose #2122 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:03 verbose #2123 > > #endif
00:01:03 verbose #2124 > > type core_any_Any = class end
00:01:03 verbose #2125 > > #if FABLE_COMPILER
00:01:03 verbose #2126 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:03 verbose #2127 > > #endif
00:01:03 verbose #2128 > > type core_ops_Try<'T> = class end
00:01:03 verbose #2129 > > #if FABLE_COMPILER
00:01:03 verbose #2130 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:03 verbose #2131 > > #endif
00:01:03 verbose #2132 > > type Func0<'T> = class end
00:01:03 verbose #2133 > > #if FABLE_COMPILER
00:01:03 verbose #2134 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:03 verbose #2135 > > #endif
00:01:03 verbose #2136 > > type Func0<'T, 'U> = class end
00:01:03 verbose #2137 > > #if FABLE_COMPILER
00:01:03 verbose #2138 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:03 verbose #2139 > > #endif
00:01:03 verbose #2140 > > type Box<'T> = class end
00:01:03 verbose #2141 > > #if FABLE_COMPILER
00:01:03 verbose #2142 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:03 verbose #2143 > > #endif
00:01:03 verbose #2144 > > type Dyn<'T> = class end
00:01:03 verbose #2145 > > #if FABLE_COMPILER
00:01:03 verbose #2146 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:03 verbose #2147 > > #endif
00:01:03 verbose #2148 > > type Send<'T> = class end
00:01:03 verbose #2149 > > #if FABLE_COMPILER
00:01:03 verbose #2150 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:03 verbose #2151 > > #endif
00:01:03 verbose #2152 > > type Fn<'T> = class end
00:01:03 verbose #2153 > > #if FABLE_COMPILER
00:01:03 verbose #2154 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:03 verbose #2155 > > #endif
00:01:03 verbose #2156 > > type FnUnit = class end
00:01:03 verbose #2157 > > #if FABLE_COMPILER
00:01:03 verbose #2158 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:03 verbose #2159 > > #endif
00:01:03 verbose #2160 > > type FnOnce<'T> = class end
00:01:03 verbose #2161 > > #if FABLE_COMPILER
00:01:03 verbose #2162 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:03 verbose #2163 > > #endif
00:01:03 verbose #2164 > > type ActionFn<'T> = class end
00:01:03 verbose #2165 > > #if FABLE_COMPILER
00:01:03 verbose #2166 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:03 verbose #2167 > > #endif
00:01:03 verbose #2168 > > type ActionFn2<'T, 'U> = class end
00:01:03 verbose #2169 > > #if FABLE_COMPILER
00:01:03 verbose #2170 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:03 verbose #2171 > > #endif
00:01:03 verbose #2172 > > type Impl<'T> = class end
00:01:03 verbose #2173 > > #if FABLE_COMPILER
00:01:03 verbose #2174 > > [[<Fable...
00:01:04 verbose #2175 > >
00:01:04 verbose #2176 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:04 verbose #2177 > > #if FABLE_COMPILER
00:01:04 verbose #2178 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:04 verbose #2179 > > #endif
00:01:04 verbose #2180 > > type core_any_Any = class end
00:01:04 verbose #2181 > > #if FABLE_COMPILER
00:01:04 verbose #2182 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:04 verbose #2183 > > #endif
00:01:04 verbose #2184 > > type core_ops_Try<'T> = class end
00:01:04 verbose #2185 > > #if FABLE_COMPILER
00:01:04 verbose #2186 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:04 verbose #2187 > > #endif
00:01:04 verbose #2188 > > type Func0<'T> = class end
00:01:04 verbose #2189 > > #if FABLE_COMPILER
00:01:04 verbose #2190 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:04 verbose #2191 > > #endif
00:01:04 verbose #2192 > > type Func0<'T, 'U> = class end
00:01:04 verbose #2193 > > #if FABLE_COMPILER
00:01:04 verbose #2194 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:04 verbose #2195 > > #endif
00:01:04 verbose #2196 > > type Box<'T> = class end
00:01:04 verbose #2197 > > #if FABLE_COMPILER
00:01:04 verbose #2198 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:04 verbose #2199 > > #endif
00:01:04 verbose #2200 > > type Dyn<'T> = class end
00:01:04 verbose #2201 > > #if FABLE_COMPILER
00:01:04 verbose #2202 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:04 verbose #2203 > > #endif
00:01:04 verbose #2204 > > type Send<'T> = class end
00:01:04 verbose #2205 > > #if FABLE_COMPILER
00:01:04 verbose #2206 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:04 verbose #2207 > > #endif
00:01:04 verbose #2208 > > type Fn<'T> = class end
00:01:04 verbose #2209 > > #if FABLE_COMPILER
00:01:04 verbose #2210 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:04 verbose #2211 > > #endif
00:01:04 verbose #2212 > > type FnUnit = class end
00:01:04 verbose #2213 > > #if FABLE_COMPILER
00:01:04 verbose #2214 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:04 verbose #2215 > > #endif
00:01:04 verbose #2216 > > type FnOnce<'T> = class end
00:01:04 verbose #2217 > > #if FABLE_COMPILER
00:01:04 verbose #2218 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:04 verbose #2219 > > #endif
00:01:04 verbose #2220 > > type ActionFn<'T> = class end
00:01:04 verbose #2221 > > #if FABLE_COMPILER
00:01:04 verbose #2222 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:04 verbose #2223 > > #endif
00:01:04 verbose #2224 > > type ActionFn2<'T, 'U> = class end
00:01:04 verbose #2225 > > #if FABLE_COMPILER
00:01:04 verbose #2226 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:04 verbose #2227 > > #endif
00:01:04 verbose #2228 > > type Impl<'T> = class end
00:01:04 verbose #2229 > > #if FABLE_COMPILER
00:01:04 verbose #2230 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:04 verbose #2231 > > #endif
00:01:04 verbose #2232 > > type Mut<'T> = class end
00:01:04 verbose #2233 > > #if FABLE_COMPILER
00:01:04 verbose #2234 > > [[<Fable.Core.Erase; Fable.Co...
00:01:05 verbose #2235 > >
00:01:05 verbose #2236 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2237 > > #if FABLE_COMPILER
00:01:05 verbose #2238 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:01:05 verbose #2239 > > #endif
00:01:05 verbose #2240 > > type async_std_task_JoinHandle<'T> = class end
00:01:05 verbose #2241 > > #if FABLE_COMPILER
00:01:05 verbose #2242 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:01:05 verbose #2243 > > #endif
00:01:05 verbose #2244 > > type std_future_Future<'T> = class end
00:01:05 verbose #2245 > > #if FABLE_COMPILER
00:01:05 verbose #2246 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:01:05 verbose #2247 > > #endif
00:01:05 verbose #2248 > > type rayon_vec_IntoIter<'T> = class end
00:01:05 verbose #2249 > > #if FABLE_COMPILER
00:01:05 verbose #2250 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:01:05 verbose #2251 > > #endif
00:01:05 verbose #2252 > > type rayon_iter_Map<'T> = class end
00:01:05 verbose #2253 > > #if FABLE_COMPILER
00:01:05 verbose #2254 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:01:05 verbose #2255 > > #endif
00:01:05 verbose #2256 > > type futures_lite_stream_StreamExt = class end
00:01:05 verbose #2257 > > #if FABLE_COMPILER
00:01:05 verbose #2258 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:01:05 verbose #2259 > > #endif
00:01:05 verbose #2260 > > type futures_future_TryJoinAll<'T> = class end
00:01:05 verbose #2261 > > #if FABLE_COMPILER
00:01:05 verbose #2262 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:01:05 verbose #2263 > > #endif
00:01:05 verbose #2264 > > type futures_future_Fuse<'T> = class end
00:01:05 verbose #2265 > > #if FABLE_COMPILER
00:01:05 verbose #2266 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:01:05 verbose #2267 > > #endif
00:01:05 verbose #2268 > > type futures_future_JoinAll<'T> = class end
00:01:05 verbose #2269 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:01:05 verbose #2270 > > Async<System.Threading.CancellationToken> =
00:01:05 verbose #2271 > > let v1 : bool = true
00:01:05 verbose #2272 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:01:05 verbose #2273 > >
00:01:05 verbose #2274 > > #if FABLE_COMPILER || WASM || CONTRACT
00:01:05 verbose #2275 > >
00:01:05 verbose #2276 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:05 verbose #2277 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:01:05 verbose #2278 > > unbox<Async<System...
00:01:06 verbose #2279 > >
00:01:06 verbose #2280 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:06 verbose #2281 > > #if FABLE_COMPILER
00:01:06 verbose #2282 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:01:06 verbose #2283 > > #endif
00:01:06 verbose #2284 > > type std_thread_JoinHandle<'T> = class end
00:01:06 verbose #2285 > > #if FABLE_COMPILER
00:01:06 verbose #2286 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:01:06 verbose #2287 > > #endif
00:01:06 verbose #2288 > > type std_sync_Arc<'T> = class end
00:01:06 verbose #2289 > > #if FABLE_COMPILER
00:01:06 verbose #2290 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:01:06 verbose #2291 > > #endif
00:01:06 verbose #2292 > > type std_sync_Mutex<'T> = class end
00:01:06 verbose #2293 > > #if FABLE_COMPILER
00:01:06 verbose #2294 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:01:06 verbose #2295 > > #endif
00:01:06 verbose #2296 > > type std_sync_MutexGuard<'T> = class end
00:01:06 verbose #2297 > > #if FABLE_COMPILER
00:01:06 verbose #2298 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:01:06 verbose #2299 > > #endif
00:01:06 verbose #2300 > > type std_sync_PoisonError<'T> = class end
00:01:06 verbose #2301 > > #if FABLE_COMPILER
00:01:06 verbose #2302 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:01:06 verbose #2303 > > #endif
00:01:06 verbose #2304 > > type std_sync_mpsc_Receiver<'T> = class end
00:01:06 verbose #2305 > > #if FABLE_COMPILER
00:01:06 verbose #2306 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:01:06 verbose #2307 > > #endif
00:01:06 verbose #2308 > > type std_sync_mpsc_SendError<'T> = class end
00:01:06 verbose #2309 > > #if FABLE_COMPILER
00:01:06 verbose #2310 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:01:06 verbose #2311 > > #endif
00:01:06 verbose #2312 > > type std_sync_mpsc_Sender<'T> = class end
00:01:06 verbose #2313 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:01:06 verbose #2314 > > _.Dispose () = f ()
00:01:06 verbose #2315 > > type [[<Struct>]] US0 =
00:01:06 verbose #2316 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:01:06 verbose #2317 > > | US0_1
00:01:06 verbose #2318 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:01:06 verbose #2319 > > let v1 : bool = true
00:01:06 verbose #2320 > > let mutable _v1 : unit option = None
00:01:06 verbose #2321 > >
00:01:06 verbose #2322 > > #if FABLE_COMPILER || WASM || CONTRACT
00:01:06 verbose #2323 > >
00:01:06 verbose #2324 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:01:06 verbose #2325 > >
00:01:06 verbose #2326 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:06 verbose #2327 > > #if FABLE_COMPILER
00:01:06 verbose #2328 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:01:06 verbose #2329 > > #endif
00:01:06 verbose #2330 > > type reqwest_Error = class end
00:01:06 verbose #2331 > > #if FABLE_COMPILER
00:01:06 verbose #2332 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:01:06 verbose #2333 > > #endif
00:01:06 verbose #2334 > > type reqwest_RequestBuilder = class end
00:01:06 verbose #2335 > > #if FABLE_COMPILER
00:01:06 verbose #2336 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:01:06 verbose #2337 > > #endif
00:01:06 verbose #2338 > > type reqwest_Response = class end
00:01:06 verbose #2339 > > #if FABLE_COMPILER
00:01:06 verbose #2340 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:06 verbose #2341 > > #endif
00:01:06 verbose #2342 > > type std_env_VarError = class end
00:01:06 verbose #2343 > > #if FABLE_COMPILER
00:01:06 verbose #2344 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:06 verbose #2345 > > #endif
00:01:06 verbose #2346 > > type core_any_Any = class end
00:01:06 verbose #2347 > > #if FABLE_COMPILER
00:01:06 verbose #2348 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:06 verbose #2349 > > #endif
00:01:06 verbose #2350 > > type core_ops_Try<'T> = class end
00:01:06 verbose #2351 > > #if FABLE_COMPILER
00:01:06 verbose #2352 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:06 verbose #2353 > > #endif
00:01:06 verbose #2354 > > type Func0<'T> = class end
00:01:06 verbose #2355 > > #if FABLE_COMPILER
00:01:06 verbose #2356 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:06 verbose #2357 > > #endif
00:01:06 verbose #2358 > > type Func0<'T, 'U> = class end
00:01:06 verbose #2359 > > #if FABLE_COMPILER
00:01:06 verbose #2360 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:06 verbose #2361 > > #endif
00:01:06 verbose #2362 > > type Box<'T> = class end
00:01:06 verbose #2363 > > #if FABLE_COMPILER
00:01:06 verbose #2364 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:06 verbose #2365 > > #endif
00:01:06 verbose #2366 > > type Dyn<'T> = class end
00:01:06 verbose #2367 > > #if FABLE_COMPILER
00:01:06 verbose #2368 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:06 verbose #2369 > > #endif
00:01:06 verbose #2370 > > type Send<'T> = class end
00:01:06 verbose #2371 > > #if FABLE_COMPILER
00:01:06 verbose #2372 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:06 verbose #2373 > > #endif
00:01:06 verbose #2374 > > type Fn<'T> = class end
00:01:06 verbose #2375 > > #if FABLE_COMPILER
00:01:06 verbose #2376 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:06 verbose #2377 > > #endif
00:01:06 verbose #2378 > > type FnUnit = class end
00:01:06 verbose #2379 > > #if FABLE_COMPILER
00:01:06 verbose #2380 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:06 verbose #2381 > > #...
00:01:07 verbose #2382 > >
00:01:07 verbose #2383 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:07 verbose #2384 > > #if FABLE_COMPILER
00:01:07 verbose #2385 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:01:07 verbose #2386 > > #endif
00:01:07 verbose #2387 > > type clap_Arg = class end
00:01:07 verbose #2388 > > #if FABLE_COMPILER
00:01:07 verbose #2389 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:01:07 verbose #2390 > > #endif
00:01:07 verbose #2391 > > type clap_ArgAction = class end
00:01:07 verbose #2392 > > #if FABLE_COMPILER
00:01:07 verbose #2393 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:01:07 verbose #2394 > > #endif
00:01:07 verbose #2395 > > type clap_Command = class end
00:01:07 verbose #2396 > > #if FABLE_COMPILER
00:01:07 verbose #2397 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:01:07 verbose #2398 > > #endif
00:01:07 verbose #2399 > > type clap_ArgMatches = class end
00:01:07 verbose #2400 > > #if FABLE_COMPILER
00:01:07 verbose #2401 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:01:07 verbose #2402 > > #endif
00:01:07 verbose #2403 > > type clap_builder_ValueRange = class end
00:01:07 verbose #2404 > > #if FABLE_COMPILER
00:01:07 verbose #2405 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:01:07 verbose #2406 > > #endif
00:01:07 verbose #2407 > > type clap_builder_ValueParser = class end
00:01:07 verbose #2408 > > #if FABLE_COMPILER
00:01:07 verbose #2409 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:01:07 verbose #2410 > > #endif
00:01:07 verbose #2411 > > type clap_builder_PossibleValue = class end
00:01:07 verbose #2412 > > #if FABLE_COMPILER
00:01:07 verbose #2413 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:01:07 verbose #2414 > > #endif
00:01:07 verbose #2415 > > type std_process_Child = class end
00:01:07 verbose #2416 > > #if FABLE_COMPILER
00:01:07 verbose #2417 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:01:07 verbose #2418 > > #endif
00:01:07 verbose #2419 > > type std_process_ChildStderr = class end
00:01:07 verbose #2420 > > #if FABLE_COMPILER
00:01:07 verbose #2421 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:01:07 verbose #2422 > > #endif
00:01:07 verbose #2423 > > type std_process_ChildStdout = class end
00:01:07 verbose #2424 > > #if FABLE_COMPILER
00:01:07 verbose #2425 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:01:07 verbose #2426 > > #endif
00:01:07 verbose #2427 > > type std_process_ChildStdin = class end
00:01:07 verbose #2428 > > #if FABLE_COMPILER
00:01:07 verbose #2429 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:01:07 verbose #2430 > > #endif
00:01:07 verbose #2431 > > type std_process_Command = class ...
00:01:09 verbose #2432 > >
00:01:09 verbose #2433 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:09 verbose #2434 > > #if FABLE_COMPILER
00:01:09 verbose #2435 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:01:09 verbose #2436 > > #endif
00:01:09 verbose #2437 > > type std_fs_File = class end
00:01:09 verbose #2438 > > #if FABLE_COMPILER
00:01:09 verbose #2439 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:01:09 verbose #2440 > > #endif
00:01:09 verbose #2441 > > type std_fs_FileType = class end
00:01:09 verbose #2442 > > #if FABLE_COMPILER
00:01:09 verbose #2443 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:01:09 verbose #2444 > > #endif
00:01:09 verbose #2445 > > type std_path_Display = class end
00:01:09 verbose #2446 > > #if FABLE_COMPILER
00:01:09 verbose #2447 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:01:09 verbose #2448 > > #endif
00:01:09 verbose #2449 > > type std_path_Path = class end
00:01:09 verbose #2450 > > #if FABLE_COMPILER
00:01:09 verbose #2451 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:01:09 verbose #2452 > > #endif
00:01:09 verbose #2453 > > type std_path_PathBuf = class end
00:01:09 verbose #2454 > > #if FABLE_COMPILER
00:01:09 verbose #2455 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:01:09 verbose #2456 > > #endif
00:01:09 verbose #2457 > > type async_walkdir_DirEntry = class end
00:01:09 verbose #2458 > > #if FABLE_COMPILER
00:01:09 verbose #2459 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:01:09 verbose #2460 > > #endif
00:01:09 verbose #2461 > > type async_walkdir_Filtering = class end
00:01:09 verbose #2462 > > #if FABLE_COMPILER
00:01:09 verbose #2463 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:01:09 verbose #2464 > > #endif
00:01:09 verbose #2465 > > type async_walkdir_WalkDir = class end
00:01:09 verbose #2466 > > #if FABLE_COMPILER
00:01:09 verbose #2467 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:09 verbose #2468 > > #endif
00:01:09 verbose #2469 > > type core_any_Any = class end
00:01:09 verbose #2470 > > #if FABLE_COMPILER
00:01:09 verbose #2471 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:09 verbose #2472 > > #endif
00:01:09 verbose #2473 > > type core_ops_Try<'T> = class end
00:01:09 verbose #2474 > > #if FABLE_COMPILER
00:01:09 verbose #2475 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:09 verbose #2476 > > #endif
00:01:09 verbose #2477 > > type Func0<'T> = class end
00:01:09 verbose #2478 > > #if FABLE_COMPILER
00:01:09 verbose #2479 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:09 verbose #2480 > > #endif
00:01:09 verbose #2481 > > type Func0<'T, 'U> = class end
00:01:09 verbose #2482 > > #if FABLE_COMPILER
00:01:09 verbose #2483 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:09 verbose #2484 > > #endif
00:01:09 verbose #2485 > > type Box<'T> = clas...
00:01:12 verbose #2486 > >
00:01:12 verbose #2487 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:12 verbose #2488 > > module SpiralTrace =
00:01:12 verbose #2489 > > let trace x =
00:01:12 verbose #2490 > > #if !INTERACTIVE
00:01:12 verbose #2491 > > Trace.trace x
00:01:12 verbose #2492 > > #else
00:01:12 verbose #2493 > > trace x
00:01:12 verbose #2494 > > #endif
00:01:12 verbose #2495 > >
00:01:12 verbose #2496 > > type TraceLevel =
00:01:12 verbose #2497 > > #if !INTERACTIVE
00:01:12 verbose #2498 > > Trace.US0
00:01:12 verbose #2499 > > #else
00:01:12 verbose #2500 > > US0
00:01:12 verbose #2501 > > #endif
00:01:12 verbose #2502 > >
00:01:12 verbose #2503 > > module SpiralCrypto =
00:01:12 verbose #2504 > > let hash_text x =
00:01:12 verbose #2505 > > #if !INTERACTIVE
00:01:12 verbose #2506 > > Crypto.hash_text x
00:01:12 verbose #2507 > > #else
00:01:12 verbose #2508 > > hash_text x
00:01:12 verbose #2509 > > #endif
00:01:12 verbose #2510 > >
00:01:12 verbose #2511 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:01:12 verbose #2512 > >
00:01:12 verbose #2513 > > module SpiralAsync =
00:01:12 verbose #2514 > > let merge_cancellation_token_with_default_async x =
00:01:12 verbose #2515 > > #if !INTERACTIVE
00:01:12 verbose #2516 > > Async_.merge_cancellation_token_with_default_async x
00:01:12 verbose #2517 > > #else
00:01:12 verbose #2518 > > merge_cancellation_token_with_default_async x
00:01:12 verbose #2519 > > #endif
00:01:12 verbose #2520 > >
00:01:12 verbose #2521 > > module SpiralThreading =
00:01:12 verbose #2522 > > let new_disposable_token x =
00:01:12 verbose #2523 > > #if !INTERACTIVE
00:01:12 verbose #2524 > > Threading.new_disposable_token x
00:01:12 verbose #2525 > > #else
00:01:12 verbose #2526 > > new_disposable_token x
00:01:12 verbose #2527 > > #endif
00:01:12 verbose #2528 > >
00:01:12 verbose #2529 > > module SpiralNetworking =
00:01:12 verbose #2530 > > let test_port_open x =
00:01:12 verbose #2531 > > #if !INTERACTIVE
00:01:12 verbose #2532 > > Networking.test_port_open x
00:01:12 verbose #2533 > > #else
00:01:12 verbose #2534 > > test_port_open x
00:01:12 verbose #2535 > > #endif
00:01:12 verbose #2536 > >
00:01:12 verbose #2537 > > let test_port_open_timeout x =
00:01:12 verbose #2538 > > #if !INTERACTIVE
00:01:12 verbose #2539 > > Networking.test_port_open_timeout x
00:01:12 verbose #2540 > > #else
00:01:12 verbose #2541 > > test_port_open_timeout x
00:01:12 verbose #2542 > > #endif
00:01:12 verbose #2543 > >
00:01:12 verbose #2544 > > let wait_for_port_access x =
00:01:12 verbose #2545 > > #if !INTERACTIVE
00:01:12 verbose #2546 > > Networking.wait_for_port_access x
00:01:12 verbose #2547 > > #else
00:01:12 verbose #2548 > > wait_for_port_access x
00:01:12 verbose #2549 > > #endif
00:01:12 verbose #2550 > >
00:01:12 verbose #2551 > > let get_available_port x =
00:01:12 verbose #2552 > > #if !INTERACTIVE
00:01:12 verbose #2553 > > Networking.get_available_port x
00:01:12 verbose #2554 > > #else
00:01:12 verbose #2555 > > get_available_port x
00:01:12 verbose #2556 > > #endif
00:01:12 verbose #2557 > >
00:01:12 verbose #2558 > > module SpiralRuntime =
00:01:12 verbose #2559 > > let get_executable_suffix () =
00:01:12 verbose #2560 > > #if !INTERACTIVE
00:01:12 verbose #2561 > > Runtime.get_executable_suffix ()
00:01:12 verbose #2562 > > #else
00:01:12 verbose #2563 > > get_executable_suffix ()
00:01:12 verbose #2564 > > #endif
00:01:12 verbose #2565 > >
00:01:12 verbose #2566 > > let is_windows () =
00:01:12 verbose #2567 > > #if !INTERACTIVE
00:01:12 verbose #2568 > > ...
00:01:12 verbose #2569 > >
00:01:12 verbose #2570 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:12 verbose #2571 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:01:12 verbose #2572 > >
00:01:12 verbose #2573 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:12 verbose #2574 > > //// test
00:01:12 verbose #2575 > >
00:01:12 verbose #2576 > > type AssertExceptionFormatter (ex) =
00:01:12 verbose #2577 > > member _.Text =
00:01:12 verbose #2578 > > ex.ToString()
00:01:12 verbose #2579 > > .Replace("32m", "<span style=\"color: green;\">")
00:01:12 verbose #2580 > > .Replace("36m", "</span>")
00:01:12 verbose #2581 > > .Replace("31m", "<span style=\"color: red;\">")
00:01:12 verbose #2582 > > .Replace("\n", "<br/>\n")
00:01:12 verbose #2583 > >
00:01:12 verbose #2584 > >
00:01:12 verbose #2585 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:01:12 verbose #2586 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:01:12 verbose #2587 > >
00:01:12 verbose #2588 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:12 verbose #2589 > > //// test
00:01:12 verbose #2590 > >
00:01:12 verbose #2591 > > let inline __expect fn log expected actual =
00:01:12 verbose #2592 > > if log then printfn $"{actual.ToDisplayString ()}"
00:01:12 verbose #2593 > > try
00:01:12 verbose #2594 > > "Testing.__expect" |> fn actual expected
00:01:12 verbose #2595 > > with :? Expecto.AssertException as ex ->
00:01:12 verbose #2596 > > AssertExceptionFormatter(ex).Display () |> ignore
00:01:12 verbose #2597 > > failwith (ex.GetType().FullName)
00:01:12 verbose #2598 > >
00:01:12 verbose #2599 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:01:12 verbose #2600 > > expected actual
00:01:12 verbose #2601 > > let inline _contains expected actual = __contains true expected actual
00:01:12 verbose #2602 > >
00:01:12 verbose #2603 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:01:12 verbose #2604 > > expected actual
00:01:12 verbose #2605 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:01:12 verbose #2606 > >
00:01:12 verbose #2607 > > let inline __isGreaterThan log expected actual = __expect
00:01:12 verbose #2608 > > Expecto.Expect.isGreaterThan log expected actual
00:01:12 verbose #2609 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:01:12 verbose #2610 > >
00:01:12 verbose #2611 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:01:12 verbose #2612 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:01:12 verbose #2613 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:01:12 verbose #2614 > > expected actual
00:01:12 verbose #2615 > >
00:01:12 verbose #2616 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:01:12 verbose #2617 > > log expected actual
00:01:12 verbose #2618 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:01:12 verbose #2619 > >
00:01:12 verbose #2620 > > let inline __isLessThanOrEqual log expected actual = __expect
00:01:12 verbose #2621 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:01:12 verbose #2622 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:01:12 verbose #2623 > > expected actual
00:01:12 verbose #2624 > >
00:01:12 verbose #2625 > > let inline __sequenceEqual log expected actual = __expe...
00:01:12 verbose #2626 > >
00:01:12 verbose #2627 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:12 verbose #2628 > > //// test
00:01:12 verbose #2629 > >
00:01:12 verbose #2630 > > let inline __isBetween log a b actual =
00:01:12 verbose #2631 > > let inline isBetween actual (a, b) _ =
00:01:12 verbose #2632 > > __isGreaterThanOrEqual log a actual
00:01:12 verbose #2633 > > __isLessThanOrEqual log b actual
00:01:12 verbose #2634 > > __expect isBetween log (a, b) actual
00:01:12 verbose #2635 > > let inline _isBetween a b actual = __isBetween true a b actual
00:01:12 verbose #2636 > >
00:01:12 verbose #2637 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:12 verbose #2638 > > #if !INTERACTIVE
00:01:12 verbose #2639 > > open Lib
00:01:12 verbose #2640 > > #endif
00:01:12 verbose #2641 > >
00:01:12 verbose #2642 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:12 verbose #2643 > > let nl = System.Environment.NewLine
00:01:12 verbose #2644 > > let q = @""""
00:01:13 verbose #2645 > >
00:01:13 verbose #2646 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:13 verbose #2647 > > let inline cons head tail = head :: tail
00:01:13 verbose #2648 > >
00:01:13 verbose #2649 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:13 verbose #2650 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:13 verbose #2651 > > │ ## memoize │
00:01:13 verbose #2652 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:13 verbose #2653 > >
00:01:13 verbose #2654 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:13 verbose #2655 > > let inline memoize fn =
00:01:13 verbose #2656 > > let result = lazy fn ()
00:01:13 verbose #2657 > > fun () -> result.Value
00:01:13 verbose #2658 > >
00:01:13 verbose #2659 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:13 verbose #2660 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:13 verbose #2661 > > │ ## TraceLevel │
00:01:13 verbose #2662 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:13 verbose #2663 > >
00:01:13 verbose #2664 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:13 verbose #2665 > > type TraceLevel =
00:01:13 verbose #2666 > > | Verbose
00:01:13 verbose #2667 > > | Debug
00:01:13 verbose #2668 > > | Info
00:01:13 verbose #2669 > > | Warning
00:01:13 verbose #2670 > > | Critical
00:01:13 verbose #2671 > >
00:01:13 verbose #2672 > > let inline _locals () = ""
00:01:13 verbose #2673 > >
00:01:13 verbose #2674 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:13 verbose #2675 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:13 verbose #2676 > > │ ## trace │
00:01:13 verbose #2677 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:13 verbose #2678 > >
00:01:13 verbose #2679 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:13 verbose #2680 > > let to_trace_level = function
00:01:13 verbose #2681 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:01:13 verbose #2682 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:01:13 verbose #2683 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:01:13 verbose #2684 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:01:13 verbose #2685 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:01:13 verbose #2686 > >
00:01:13 verbose #2687 > > let trace level fn locals =
00:01:13 verbose #2688 > > let level = level |> to_trace_level
00:01:13 verbose #2689 > > SpiralTrace.trace level fn locals
00:01:13 verbose #2690 > >
00:01:13 verbose #2691 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:13 verbose #2692 > > //// test
00:01:13 verbose #2693 > >
00:01:13 verbose #2694 > > trace Debug (fun () -> "test") _locals
00:01:13 verbose #2695 > >
00:01:13 verbose #2696 > > ╭─[ 22.58ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:13 verbose #2697 > > │ 00:00:00 debug #1 test │
00:01:13 verbose #2698 > > │ │
00:01:13 verbose #2699 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:13 verbose #2700 > 00:00:16 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 20078
00:01:13 verbose #2701 > 00:00:16 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:15 verbose #2702 > 00:00:18 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb to html
00:01:15 verbose #2703 > 00:00:18 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:15 verbose #2704 > 00:00:18 verbose #7 ! validate(nb)
00:01:16 verbose #2705 > 00:00:19 verbose #8 ! [NbConvertApp] Writing 280692 bytes to c:\home\git\polyglot\lib\fsharp\Common.dib.html
00:01:16 verbose #2706 > 00:00:20 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643
00:01:16 verbose #2707 > 00:00:20 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643
00:01:16 verbose #2708 > 00:00:20 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:17 verbose #2709 > 00:00:21 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:17 verbose #2710 > 00:00:21 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:17 verbose #2711 > 00:00:21 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 20780
00:01:17 debug #2712 execute_with_options_async / exit_code: 0 / output.Length: 24277
00:01:17 debug #5 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Common.dib --retries 3
00:01:17 debug #2713 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path CommonFSharp.dib --retries 3",
[||], None, None, true, None)
00:01:17 verbose #2714 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "CommonFSharp.dib", "--retries", "3"])
00:01:17 verbose #2715 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib" --output-path "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:19 verbose #2716 > >
00:01:19 verbose #2717 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:19 verbose #2718 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:19 verbose #2719 > > │ # CommonFSharp (Polyglot) │
00:01:19 verbose #2720 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:20 verbose #2721 > >
00:01:20 verbose #2722 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:20 verbose #2723 > > #!import ../../lib/fsharp/Notebooks.dib
00:01:20 verbose #2724 > > #!import ../../lib/fsharp/Testing.dib
00:01:20 verbose #2725 > >
00:01:20 verbose #2726 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:20 verbose #2727 > > #r
00:01:20 verbose #2728 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:01:20 verbose #2729 > > spNetCore.Html.Abstractions.dll"
00:01:20 verbose #2730 > > #r
00:01:20 verbose #2731 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:20 verbose #2732 > > otNet.Interactive.dll"
00:01:20 verbose #2733 > > #r
00:01:20 verbose #2734 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:20 verbose #2735 > > otNet.Interactive.FSharp.dll"
00:01:20 verbose #2736 > > #r
00:01:20 verbose #2737 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:20 verbose #2738 > > otNet.Interactive.Formatting.dll"
00:01:20 verbose #2739 > > open System
00:01:20 verbose #2740 > > open System.IO
00:01:20 verbose #2741 > > open System.Text
00:01:20 verbose #2742 > > open Microsoft.DotNet.Interactive.Formatting
00:01:23 verbose #2743 > >
00:01:23 verbose #2744 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:23 verbose #2745 > > #r
00:01:23 verbose #2746 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:23 verbose #2747 > > otNet.Interactive.FSharp.dll"
00:01:23 verbose #2748 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:01:23 verbose #2749 > > #r
00:01:23 verbose #2750 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:23 verbose #2751 > > otNet.Interactive.dll"
00:01:23 verbose #2752 > > open type Microsoft.DotNet.Interactive.Kernel
00:01:23 verbose #2753 > >
00:01:23 verbose #2754 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:23 verbose #2755 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:01:24 verbose #2756 > >
00:01:24 verbose #2757 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:24 verbose #2758 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:01:24 verbose #2759 > > TextWriter)->fprintfn writer "%120A" x)
00:01:24 verbose #2760 > >
00:01:24 verbose #2761 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:24 verbose #2762 > > //// test
00:01:24 verbose #2763 > >
00:01:24 verbose #2764 > > Formatter.ListExpansionLimit <- 100
00:01:24 verbose #2765 > >
00:01:24 verbose #2766 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:24 verbose #2767 > > #if FABLE_COMPILER
00:01:24 verbose #2768 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:24 verbose #2769 > > #endif
00:01:24 verbose #2770 > > type std_env_VarError = class end
00:01:24 verbose #2771 > > #if FABLE_COMPILER
00:01:24 verbose #2772 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:24 verbose #2773 > > #endif
00:01:24 verbose #2774 > > type core_any_Any = class end
00:01:24 verbose #2775 > > #if FABLE_COMPILER
00:01:24 verbose #2776 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:24 verbose #2777 > > #endif
00:01:24 verbose #2778 > > type core_ops_Try<'T> = class end
00:01:24 verbose #2779 > > #if FABLE_COMPILER
00:01:24 verbose #2780 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:24 verbose #2781 > > #endif
00:01:24 verbose #2782 > > type Func0<'T> = class end
00:01:24 verbose #2783 > > #if FABLE_COMPILER
00:01:24 verbose #2784 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:24 verbose #2785 > > #endif
00:01:24 verbose #2786 > > type Func0<'T, 'U> = class end
00:01:24 verbose #2787 > > #if FABLE_COMPILER
00:01:24 verbose #2788 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:24 verbose #2789 > > #endif
00:01:24 verbose #2790 > > type Box<'T> = class end
00:01:24 verbose #2791 > > #if FABLE_COMPILER
00:01:24 verbose #2792 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:24 verbose #2793 > > #endif
00:01:24 verbose #2794 > > type Dyn<'T> = class end
00:01:24 verbose #2795 > > #if FABLE_COMPILER
00:01:24 verbose #2796 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:24 verbose #2797 > > #endif
00:01:24 verbose #2798 > > type Send<'T> = class end
00:01:24 verbose #2799 > > #if FABLE_COMPILER
00:01:24 verbose #2800 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:24 verbose #2801 > > #endif
00:01:24 verbose #2802 > > type Fn<'T> = class end
00:01:24 verbose #2803 > > #if FABLE_COMPILER
00:01:24 verbose #2804 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:24 verbose #2805 > > #endif
00:01:24 verbose #2806 > > type FnUnit = class end
00:01:24 verbose #2807 > > #if FABLE_COMPILER
00:01:24 verbose #2808 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:24 verbose #2809 > > #endif
00:01:24 verbose #2810 > > type FnOnce<'T> = class end
00:01:24 verbose #2811 > > #if FABLE_COMPILER
00:01:24 verbose #2812 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:24 verbose #2813 > > #endif
00:01:24 verbose #2814 > > type ActionFn<'T> = class end
00:01:24 verbose #2815 > > #if FABLE_COMPILER
00:01:24 verbose #2816 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:24 verbose #2817 > > #endif
00:01:24 verbose #2818 > > type ActionFn2<'T, 'U> = class end
00:01:24 verbose #2819 > > #if FABLE_COMPILER
00:01:24 verbose #2820 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:24 verbose #2821 > > #endif
00:01:24 verbose #2822 > > type Impl<'T> = class end
00:01:24 verbose #2823 > > #if FABLE_COMPILER
00:01:24 verbose #2824 > > [[<Fable...
00:01:26 verbose #2825 > >
00:01:26 verbose #2826 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2827 > > #if FABLE_COMPILER
00:01:26 verbose #2828 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:26 verbose #2829 > > #endif
00:01:26 verbose #2830 > > type core_any_Any = class end
00:01:26 verbose #2831 > > #if FABLE_COMPILER
00:01:26 verbose #2832 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:26 verbose #2833 > > #endif
00:01:26 verbose #2834 > > type core_ops_Try<'T> = class end
00:01:26 verbose #2835 > > #if FABLE_COMPILER
00:01:26 verbose #2836 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:26 verbose #2837 > > #endif
00:01:26 verbose #2838 > > type Func0<'T> = class end
00:01:26 verbose #2839 > > #if FABLE_COMPILER
00:01:26 verbose #2840 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:26 verbose #2841 > > #endif
00:01:26 verbose #2842 > > type Func0<'T, 'U> = class end
00:01:26 verbose #2843 > > #if FABLE_COMPILER
00:01:26 verbose #2844 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:26 verbose #2845 > > #endif
00:01:26 verbose #2846 > > type Box<'T> = class end
00:01:26 verbose #2847 > > #if FABLE_COMPILER
00:01:26 verbose #2848 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:26 verbose #2849 > > #endif
00:01:26 verbose #2850 > > type Dyn<'T> = class end
00:01:26 verbose #2851 > > #if FABLE_COMPILER
00:01:26 verbose #2852 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:26 verbose #2853 > > #endif
00:01:26 verbose #2854 > > type Send<'T> = class end
00:01:26 verbose #2855 > > #if FABLE_COMPILER
00:01:26 verbose #2856 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:26 verbose #2857 > > #endif
00:01:26 verbose #2858 > > type Fn<'T> = class end
00:01:26 verbose #2859 > > #if FABLE_COMPILER
00:01:26 verbose #2860 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:26 verbose #2861 > > #endif
00:01:26 verbose #2862 > > type FnUnit = class end
00:01:26 verbose #2863 > > #if FABLE_COMPILER
00:01:26 verbose #2864 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:26 verbose #2865 > > #endif
00:01:26 verbose #2866 > > type FnOnce<'T> = class end
00:01:26 verbose #2867 > > #if FABLE_COMPILER
00:01:26 verbose #2868 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:26 verbose #2869 > > #endif
00:01:26 verbose #2870 > > type ActionFn<'T> = class end
00:01:26 verbose #2871 > > #if FABLE_COMPILER
00:01:26 verbose #2872 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:26 verbose #2873 > > #endif
00:01:26 verbose #2874 > > type ActionFn2<'T, 'U> = class end
00:01:26 verbose #2875 > > #if FABLE_COMPILER
00:01:26 verbose #2876 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:26 verbose #2877 > > #endif
00:01:26 verbose #2878 > > type Impl<'T> = class end
00:01:26 verbose #2879 > > #if FABLE_COMPILER
00:01:26 verbose #2880 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:26 verbose #2881 > > #endif
00:01:26 verbose #2882 > > type Mut<'T> = class end
00:01:26 verbose #2883 > > #if FABLE_COMPILER
00:01:26 verbose #2884 > > [[<Fable.Core.Erase; Fable.Co...
00:01:27 verbose #2885 > >
00:01:27 verbose #2886 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:27 verbose #2887 > > #if FABLE_COMPILER
00:01:27 verbose #2888 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:01:27 verbose #2889 > > #endif
00:01:27 verbose #2890 > > type async_std_task_JoinHandle<'T> = class end
00:01:27 verbose #2891 > > #if FABLE_COMPILER
00:01:27 verbose #2892 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:01:27 verbose #2893 > > #endif
00:01:27 verbose #2894 > > type std_future_Future<'T> = class end
00:01:27 verbose #2895 > > #if FABLE_COMPILER
00:01:27 verbose #2896 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:01:27 verbose #2897 > > #endif
00:01:27 verbose #2898 > > type rayon_vec_IntoIter<'T> = class end
00:01:27 verbose #2899 > > #if FABLE_COMPILER
00:01:27 verbose #2900 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:01:27 verbose #2901 > > #endif
00:01:27 verbose #2902 > > type rayon_iter_Map<'T> = class end
00:01:27 verbose #2903 > > #if FABLE_COMPILER
00:01:27 verbose #2904 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:01:27 verbose #2905 > > #endif
00:01:27 verbose #2906 > > type futures_lite_stream_StreamExt = class end
00:01:27 verbose #2907 > > #if FABLE_COMPILER
00:01:27 verbose #2908 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:01:27 verbose #2909 > > #endif
00:01:27 verbose #2910 > > type futures_future_TryJoinAll<'T> = class end
00:01:27 verbose #2911 > > #if FABLE_COMPILER
00:01:27 verbose #2912 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:01:27 verbose #2913 > > #endif
00:01:27 verbose #2914 > > type futures_future_Fuse<'T> = class end
00:01:27 verbose #2915 > > #if FABLE_COMPILER
00:01:27 verbose #2916 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:01:27 verbose #2917 > > #endif
00:01:27 verbose #2918 > > type futures_future_JoinAll<'T> = class end
00:01:27 verbose #2919 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:01:27 verbose #2920 > > Async<System.Threading.CancellationToken> =
00:01:27 verbose #2921 > > let v1 : bool = true
00:01:27 verbose #2922 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:01:27 verbose #2923 > >
00:01:27 verbose #2924 > > #if FABLE_COMPILER || WASM || CONTRACT
00:01:27 verbose #2925 > >
00:01:27 verbose #2926 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:27 verbose #2927 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:01:27 verbose #2928 > > unbox<Async<System...
00:01:27 verbose #2929 > >
00:01:27 verbose #2930 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:27 verbose #2931 > > #if FABLE_COMPILER
00:01:27 verbose #2932 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:01:27 verbose #2933 > > #endif
00:01:27 verbose #2934 > > type std_thread_JoinHandle<'T> = class end
00:01:27 verbose #2935 > > #if FABLE_COMPILER
00:01:27 verbose #2936 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:01:27 verbose #2937 > > #endif
00:01:27 verbose #2938 > > type std_sync_Arc<'T> = class end
00:01:27 verbose #2939 > > #if FABLE_COMPILER
00:01:27 verbose #2940 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:01:27 verbose #2941 > > #endif
00:01:27 verbose #2942 > > type std_sync_Mutex<'T> = class end
00:01:27 verbose #2943 > > #if FABLE_COMPILER
00:01:27 verbose #2944 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:01:27 verbose #2945 > > #endif
00:01:27 verbose #2946 > > type std_sync_MutexGuard<'T> = class end
00:01:27 verbose #2947 > > #if FABLE_COMPILER
00:01:27 verbose #2948 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:01:27 verbose #2949 > > #endif
00:01:27 verbose #2950 > > type std_sync_PoisonError<'T> = class end
00:01:27 verbose #2951 > > #if FABLE_COMPILER
00:01:27 verbose #2952 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:01:27 verbose #2953 > > #endif
00:01:27 verbose #2954 > > type std_sync_mpsc_Receiver<'T> = class end
00:01:27 verbose #2955 > > #if FABLE_COMPILER
00:01:27 verbose #2956 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:01:27 verbose #2957 > > #endif
00:01:27 verbose #2958 > > type std_sync_mpsc_SendError<'T> = class end
00:01:27 verbose #2959 > > #if FABLE_COMPILER
00:01:27 verbose #2960 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:01:27 verbose #2961 > > #endif
00:01:27 verbose #2962 > > type std_sync_mpsc_Sender<'T> = class end
00:01:27 verbose #2963 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:01:27 verbose #2964 > > _.Dispose () = f ()
00:01:27 verbose #2965 > > type [[<Struct>]] US0 =
00:01:27 verbose #2966 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:01:27 verbose #2967 > > | US0_1
00:01:27 verbose #2968 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:01:27 verbose #2969 > > let v1 : bool = true
00:01:27 verbose #2970 > > let mutable _v1 : unit option = None
00:01:27 verbose #2971 > >
00:01:27 verbose #2972 > > #if FABLE_COMPILER || WASM || CONTRACT
00:01:27 verbose #2973 > >
00:01:27 verbose #2974 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:01:27 verbose #2975 > >
00:01:27 verbose #2976 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:27 verbose #2977 > > #if FABLE_COMPILER
00:01:27 verbose #2978 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:01:27 verbose #2979 > > #endif
00:01:27 verbose #2980 > > type reqwest_Error = class end
00:01:27 verbose #2981 > > #if FABLE_COMPILER
00:01:27 verbose #2982 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:01:27 verbose #2983 > > #endif
00:01:27 verbose #2984 > > type reqwest_RequestBuilder = class end
00:01:27 verbose #2985 > > #if FABLE_COMPILER
00:01:27 verbose #2986 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:01:27 verbose #2987 > > #endif
00:01:27 verbose #2988 > > type reqwest_Response = class end
00:01:27 verbose #2989 > > #if FABLE_COMPILER
00:01:27 verbose #2990 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:27 verbose #2991 > > #endif
00:01:27 verbose #2992 > > type std_env_VarError = class end
00:01:27 verbose #2993 > > #if FABLE_COMPILER
00:01:27 verbose #2994 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:27 verbose #2995 > > #endif
00:01:27 verbose #2996 > > type core_any_Any = class end
00:01:27 verbose #2997 > > #if FABLE_COMPILER
00:01:27 verbose #2998 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:27 verbose #2999 > > #endif
00:01:27 verbose #3000 > > type core_ops_Try<'T> = class end
00:01:27 verbose #3001 > > #if FABLE_COMPILER
00:01:27 verbose #3002 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:27 verbose #3003 > > #endif
00:01:27 verbose #3004 > > type Func0<'T> = class end
00:01:27 verbose #3005 > > #if FABLE_COMPILER
00:01:27 verbose #3006 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:27 verbose #3007 > > #endif
00:01:27 verbose #3008 > > type Func0<'T, 'U> = class end
00:01:27 verbose #3009 > > #if FABLE_COMPILER
00:01:27 verbose #3010 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:27 verbose #3011 > > #endif
00:01:27 verbose #3012 > > type Box<'T> = class end
00:01:27 verbose #3013 > > #if FABLE_COMPILER
00:01:27 verbose #3014 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:27 verbose #3015 > > #endif
00:01:27 verbose #3016 > > type Dyn<'T> = class end
00:01:27 verbose #3017 > > #if FABLE_COMPILER
00:01:27 verbose #3018 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:27 verbose #3019 > > #endif
00:01:27 verbose #3020 > > type Send<'T> = class end
00:01:27 verbose #3021 > > #if FABLE_COMPILER
00:01:27 verbose #3022 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:27 verbose #3023 > > #endif
00:01:27 verbose #3024 > > type Fn<'T> = class end
00:01:27 verbose #3025 > > #if FABLE_COMPILER
00:01:27 verbose #3026 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:27 verbose #3027 > > #endif
00:01:27 verbose #3028 > > type FnUnit = class end
00:01:27 verbose #3029 > > #if FABLE_COMPILER
00:01:27 verbose #3030 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:27 verbose #3031 > > #...
00:01:29 verbose #3032 > >
00:01:29 verbose #3033 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:29 verbose #3034 > > #if FABLE_COMPILER
00:01:29 verbose #3035 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:01:29 verbose #3036 > > #endif
00:01:29 verbose #3037 > > type clap_Arg = class end
00:01:29 verbose #3038 > > #if FABLE_COMPILER
00:01:29 verbose #3039 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:01:29 verbose #3040 > > #endif
00:01:29 verbose #3041 > > type clap_ArgAction = class end
00:01:29 verbose #3042 > > #if FABLE_COMPILER
00:01:29 verbose #3043 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:01:29 verbose #3044 > > #endif
00:01:29 verbose #3045 > > type clap_Command = class end
00:01:29 verbose #3046 > > #if FABLE_COMPILER
00:01:29 verbose #3047 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:01:29 verbose #3048 > > #endif
00:01:29 verbose #3049 > > type clap_ArgMatches = class end
00:01:29 verbose #3050 > > #if FABLE_COMPILER
00:01:29 verbose #3051 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:01:29 verbose #3052 > > #endif
00:01:29 verbose #3053 > > type clap_builder_ValueRange = class end
00:01:29 verbose #3054 > > #if FABLE_COMPILER
00:01:29 verbose #3055 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:01:29 verbose #3056 > > #endif
00:01:29 verbose #3057 > > type clap_builder_ValueParser = class end
00:01:29 verbose #3058 > > #if FABLE_COMPILER
00:01:29 verbose #3059 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:01:29 verbose #3060 > > #endif
00:01:29 verbose #3061 > > type clap_builder_PossibleValue = class end
00:01:29 verbose #3062 > > #if FABLE_COMPILER
00:01:29 verbose #3063 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:01:29 verbose #3064 > > #endif
00:01:29 verbose #3065 > > type std_process_Child = class end
00:01:29 verbose #3066 > > #if FABLE_COMPILER
00:01:29 verbose #3067 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:01:29 verbose #3068 > > #endif
00:01:29 verbose #3069 > > type std_process_ChildStderr = class end
00:01:29 verbose #3070 > > #if FABLE_COMPILER
00:01:29 verbose #3071 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:01:29 verbose #3072 > > #endif
00:01:29 verbose #3073 > > type std_process_ChildStdout = class end
00:01:29 verbose #3074 > > #if FABLE_COMPILER
00:01:29 verbose #3075 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:01:29 verbose #3076 > > #endif
00:01:29 verbose #3077 > > type std_process_ChildStdin = class end
00:01:29 verbose #3078 > > #if FABLE_COMPILER
00:01:29 verbose #3079 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:01:29 verbose #3080 > > #endif
00:01:29 verbose #3081 > > type std_process_Command = class ...
00:01:31 verbose #3082 > >
00:01:31 verbose #3083 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:31 verbose #3084 > > #if FABLE_COMPILER
00:01:31 verbose #3085 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:01:31 verbose #3086 > > #endif
00:01:31 verbose #3087 > > type std_fs_File = class end
00:01:31 verbose #3088 > > #if FABLE_COMPILER
00:01:31 verbose #3089 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:01:31 verbose #3090 > > #endif
00:01:31 verbose #3091 > > type std_fs_FileType = class end
00:01:31 verbose #3092 > > #if FABLE_COMPILER
00:01:31 verbose #3093 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:01:31 verbose #3094 > > #endif
00:01:31 verbose #3095 > > type std_path_Display = class end
00:01:31 verbose #3096 > > #if FABLE_COMPILER
00:01:31 verbose #3097 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:01:31 verbose #3098 > > #endif
00:01:31 verbose #3099 > > type std_path_Path = class end
00:01:31 verbose #3100 > > #if FABLE_COMPILER
00:01:31 verbose #3101 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:01:31 verbose #3102 > > #endif
00:01:31 verbose #3103 > > type std_path_PathBuf = class end
00:01:31 verbose #3104 > > #if FABLE_COMPILER
00:01:31 verbose #3105 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:01:31 verbose #3106 > > #endif
00:01:31 verbose #3107 > > type async_walkdir_DirEntry = class end
00:01:31 verbose #3108 > > #if FABLE_COMPILER
00:01:31 verbose #3109 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:01:31 verbose #3110 > > #endif
00:01:31 verbose #3111 > > type async_walkdir_Filtering = class end
00:01:31 verbose #3112 > > #if FABLE_COMPILER
00:01:31 verbose #3113 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:01:31 verbose #3114 > > #endif
00:01:31 verbose #3115 > > type async_walkdir_WalkDir = class end
00:01:31 verbose #3116 > > #if FABLE_COMPILER
00:01:31 verbose #3117 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:31 verbose #3118 > > #endif
00:01:31 verbose #3119 > > type core_any_Any = class end
00:01:31 verbose #3120 > > #if FABLE_COMPILER
00:01:31 verbose #3121 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:31 verbose #3122 > > #endif
00:01:31 verbose #3123 > > type core_ops_Try<'T> = class end
00:01:31 verbose #3124 > > #if FABLE_COMPILER
00:01:31 verbose #3125 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:31 verbose #3126 > > #endif
00:01:31 verbose #3127 > > type Func0<'T> = class end
00:01:31 verbose #3128 > > #if FABLE_COMPILER
00:01:31 verbose #3129 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:31 verbose #3130 > > #endif
00:01:31 verbose #3131 > > type Func0<'T, 'U> = class end
00:01:31 verbose #3132 > > #if FABLE_COMPILER
00:01:31 verbose #3133 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:31 verbose #3134 > > #endif
00:01:31 verbose #3135 > > type Box<'T> = clas...
00:01:34 verbose #3136 > >
00:01:34 verbose #3137 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:34 verbose #3138 > > module SpiralTrace =
00:01:34 verbose #3139 > > let trace x =
00:01:34 verbose #3140 > > #if !INTERACTIVE
00:01:34 verbose #3141 > > Trace.trace x
00:01:34 verbose #3142 > > #else
00:01:34 verbose #3143 > > trace x
00:01:34 verbose #3144 > > #endif
00:01:34 verbose #3145 > >
00:01:34 verbose #3146 > > type TraceLevel =
00:01:34 verbose #3147 > > #if !INTERACTIVE
00:01:34 verbose #3148 > > Trace.US0
00:01:34 verbose #3149 > > #else
00:01:34 verbose #3150 > > US0
00:01:34 verbose #3151 > > #endif
00:01:34 verbose #3152 > >
00:01:34 verbose #3153 > > module SpiralCrypto =
00:01:34 verbose #3154 > > let hash_text x =
00:01:34 verbose #3155 > > #if !INTERACTIVE
00:01:34 verbose #3156 > > Crypto.hash_text x
00:01:34 verbose #3157 > > #else
00:01:34 verbose #3158 > > hash_text x
00:01:34 verbose #3159 > > #endif
00:01:34 verbose #3160 > >
00:01:34 verbose #3161 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:01:34 verbose #3162 > >
00:01:34 verbose #3163 > > module SpiralAsync =
00:01:34 verbose #3164 > > let merge_cancellation_token_with_default_async x =
00:01:34 verbose #3165 > > #if !INTERACTIVE
00:01:34 verbose #3166 > > Async_.merge_cancellation_token_with_default_async x
00:01:34 verbose #3167 > > #else
00:01:34 verbose #3168 > > merge_cancellation_token_with_default_async x
00:01:34 verbose #3169 > > #endif
00:01:34 verbose #3170 > >
00:01:34 verbose #3171 > > module SpiralThreading =
00:01:34 verbose #3172 > > let new_disposable_token x =
00:01:34 verbose #3173 > > #if !INTERACTIVE
00:01:34 verbose #3174 > > Threading.new_disposable_token x
00:01:34 verbose #3175 > > #else
00:01:34 verbose #3176 > > new_disposable_token x
00:01:34 verbose #3177 > > #endif
00:01:34 verbose #3178 > >
00:01:34 verbose #3179 > > module SpiralNetworking =
00:01:34 verbose #3180 > > let test_port_open x =
00:01:34 verbose #3181 > > #if !INTERACTIVE
00:01:34 verbose #3182 > > Networking.test_port_open x
00:01:34 verbose #3183 > > #else
00:01:34 verbose #3184 > > test_port_open x
00:01:34 verbose #3185 > > #endif
00:01:34 verbose #3186 > >
00:01:34 verbose #3187 > > let test_port_open_timeout x =
00:01:34 verbose #3188 > > #if !INTERACTIVE
00:01:34 verbose #3189 > > Networking.test_port_open_timeout x
00:01:34 verbose #3190 > > #else
00:01:34 verbose #3191 > > test_port_open_timeout x
00:01:34 verbose #3192 > > #endif
00:01:34 verbose #3193 > >
00:01:34 verbose #3194 > > let wait_for_port_access x =
00:01:34 verbose #3195 > > #if !INTERACTIVE
00:01:34 verbose #3196 > > Networking.wait_for_port_access x
00:01:34 verbose #3197 > > #else
00:01:34 verbose #3198 > > wait_for_port_access x
00:01:34 verbose #3199 > > #endif
00:01:34 verbose #3200 > >
00:01:34 verbose #3201 > > let get_available_port x =
00:01:34 verbose #3202 > > #if !INTERACTIVE
00:01:34 verbose #3203 > > Networking.get_available_port x
00:01:34 verbose #3204 > > #else
00:01:34 verbose #3205 > > get_available_port x
00:01:34 verbose #3206 > > #endif
00:01:34 verbose #3207 > >
00:01:34 verbose #3208 > > module SpiralRuntime =
00:01:34 verbose #3209 > > let get_executable_suffix () =
00:01:34 verbose #3210 > > #if !INTERACTIVE
00:01:34 verbose #3211 > > Runtime.get_executable_suffix ()
00:01:34 verbose #3212 > > #else
00:01:34 verbose #3213 > > get_executable_suffix ()
00:01:34 verbose #3214 > > #endif
00:01:34 verbose #3215 > >
00:01:34 verbose #3216 > > let is_windows () =
00:01:34 verbose #3217 > > #if !INTERACTIVE
00:01:34 verbose #3218 > > ...
00:01:34 verbose #3219 > >
00:01:34 verbose #3220 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:34 verbose #3221 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:01:34 verbose #3222 > >
00:01:34 verbose #3223 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:34 verbose #3224 > > //// test
00:01:34 verbose #3225 > >
00:01:34 verbose #3226 > > type AssertExceptionFormatter (ex) =
00:01:34 verbose #3227 > > member _.Text =
00:01:34 verbose #3228 > > ex.ToString()
00:01:34 verbose #3229 > > .Replace("32m", "<span style=\"color: green;\">")
00:01:34 verbose #3230 > > .Replace("36m", "</span>")
00:01:34 verbose #3231 > > .Replace("31m", "<span style=\"color: red;\">")
00:01:34 verbose #3232 > > .Replace("\n", "<br/>\n")
00:01:34 verbose #3233 > >
00:01:34 verbose #3234 > >
00:01:34 verbose #3235 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:01:34 verbose #3236 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:01:34 verbose #3237 > >
00:01:34 verbose #3238 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:34 verbose #3239 > > //// test
00:01:34 verbose #3240 > >
00:01:34 verbose #3241 > > let inline __expect fn log expected actual =
00:01:34 verbose #3242 > > if log then printfn $"{actual.ToDisplayString ()}"
00:01:34 verbose #3243 > > try
00:01:34 verbose #3244 > > "Testing.__expect" |> fn actual expected
00:01:34 verbose #3245 > > with :? Expecto.AssertException as ex ->
00:01:34 verbose #3246 > > AssertExceptionFormatter(ex).Display () |> ignore
00:01:34 verbose #3247 > > failwith (ex.GetType().FullName)
00:01:34 verbose #3248 > >
00:01:34 verbose #3249 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:01:34 verbose #3250 > > expected actual
00:01:34 verbose #3251 > > let inline _contains expected actual = __contains true expected actual
00:01:34 verbose #3252 > >
00:01:34 verbose #3253 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:01:34 verbose #3254 > > expected actual
00:01:34 verbose #3255 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:01:34 verbose #3256 > >
00:01:34 verbose #3257 > > let inline __isGreaterThan log expected actual = __expect
00:01:34 verbose #3258 > > Expecto.Expect.isGreaterThan log expected actual
00:01:34 verbose #3259 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:01:34 verbose #3260 > >
00:01:34 verbose #3261 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:01:34 verbose #3262 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:01:34 verbose #3263 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:01:34 verbose #3264 > > expected actual
00:01:34 verbose #3265 > >
00:01:34 verbose #3266 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:01:34 verbose #3267 > > log expected actual
00:01:34 verbose #3268 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:01:34 verbose #3269 > >
00:01:34 verbose #3270 > > let inline __isLessThanOrEqual log expected actual = __expect
00:01:34 verbose #3271 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:01:34 verbose #3272 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:01:34 verbose #3273 > > expected actual
00:01:34 verbose #3274 > >
00:01:34 verbose #3275 > > let inline __sequenceEqual log expected actual = __expe...
00:01:34 verbose #3276 > >
00:01:34 verbose #3277 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:34 verbose #3278 > > //// test
00:01:34 verbose #3279 > >
00:01:34 verbose #3280 > > let inline __isBetween log a b actual =
00:01:34 verbose #3281 > > let inline isBetween actual (a, b) _ =
00:01:34 verbose #3282 > > __isGreaterThanOrEqual log a actual
00:01:34 verbose #3283 > > __isLessThanOrEqual log b actual
00:01:34 verbose #3284 > > __expect isBetween log (a, b) actual
00:01:34 verbose #3285 > > let inline _isBetween a b actual = __isBetween true a b actual
00:01:34 verbose #3286 > >
00:01:34 verbose #3287 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:34 verbose #3288 > > #!import ../../lib/fsharp/Common.fs
00:01:34 verbose #3289 > >
00:01:34 verbose #3290 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:34 verbose #3291 > > #if !INTERACTIVE
00:01:34 verbose #3292 > > namespace Polyglot
00:01:34 verbose #3293 > > #endif
00:01:34 verbose #3294 > >
00:01:34 verbose #3295 > > module Common =
00:01:34 verbose #3296 > >
00:01:34 verbose #3297 > > #if !INTERACTIVE
00:01:34 verbose #3298 > > open Lib
00:01:34 verbose #3299 > > #endif
00:01:34 verbose #3300 > >
00:01:34 verbose #3301 > > let nl = System.Environment.NewLine
00:01:34 verbose #3302 > > let q = @""""
00:01:34 verbose #3303 > >
00:01:34 verbose #3304 > > let inline cons head tail = head :: tail
00:01:34 verbose #3305 > >
00:01:34 verbose #3306 > > /// ## memoize
00:01:34 verbose #3307 > > let inline memoize fn =
00:01:34 verbose #3308 > > let result = lazy fn ()
00:01:34 verbose #3309 > > fun () -> result.Value
00:01:34 verbose #3310 > >
00:01:34 verbose #3311 > > /// ## TraceLevel
00:01:34 verbose #3312 > > type TraceLevel =
00:01:34 verbose #3313 > > | Verbose
00:01:34 verbose #3314 > > | Debug
00:01:34 verbose #3315 > > | Info
00:01:34 verbose #3316 > > | Warning
00:01:34 verbose #3317 > > | Critical
00:01:34 verbose #3318 > >
00:01:34 verbose #3319 > > let inline _locals () = ""
00:01:34 verbose #3320 > >
00:01:34 verbose #3321 > > /// ## trace
00:01:34 verbose #3322 > > let to_trace_level = function
00:01:34 verbose #3323 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:01:34 verbose #3324 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:01:34 verbose #3325 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:01:34 verbose #3326 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:01:34 verbose #3327 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:01:34 verbose #3328 > >
00:01:34 verbose #3329 > > let trace level fn locals =
00:01:34 verbose #3330 > > let level = level |> to_trace_level
00:01:34 verbose #3331 > > SpiralTrace.trace level fn locals
00:01:34 verbose #3332 > >
00:01:34 verbose #3333 > >
00:01:34 verbose #3334 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:34 verbose #3335 > > open Common
00:01:34 verbose #3336 > >
00:01:34 verbose #3337 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:34 verbose #3338 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:34 verbose #3339 > > │ ## getUnionCaseName │
00:01:34 verbose #3340 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:34 verbose #3341 > >
00:01:34 verbose #3342 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:34 verbose #3343 > > let inline getUnionCaseName<'T> (x: 'T) =
00:01:34 verbose #3344 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:01:34 verbose #3345 > > | case, _ -> case.Name
00:01:34 verbose #3346 > >
00:01:34 verbose #3347 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:34 verbose #3348 > > //// test
00:01:34 verbose #3349 > >
00:01:34 verbose #3350 > > TraceLevel.Critical
00:01:34 verbose #3351 > > |> getUnionCaseName
00:01:34 verbose #3352 > > |> _assertEqual (nameof TraceLevel.Critical)
00:01:34 verbose #3353 > >
00:01:34 verbose #3354 > > ╭─[ 70.09ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:34 verbose #3355 > > │ "Critical" │
00:01:34 verbose #3356 > > │ │
00:01:34 verbose #3357 > > │ │
00:01:34 verbose #3358 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:34 verbose #3359 > 00:00:17 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 19793
00:01:34 verbose #3360 > 00:00:17 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:37 verbose #3361 > 00:00:19 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb to html
00:01:37 verbose #3362 > 00:00:19 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:37 verbose #3363 > 00:00:19 verbose #7 ! validate(nb)
00:01:38 verbose #3364 > 00:00:20 verbose #8 ! [NbConvertApp] Writing 275592 bytes to c:\home\git\polyglot\lib\fsharp\CommonFSharp.dib.html
00:01:38 verbose #3365 > 00:00:20 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 655
00:01:38 verbose #3366 > 00:00:20 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 655
00:01:38 verbose #3367 > 00:00:20 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:39 verbose #3368 > 00:00:21 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:39 verbose #3369 > 00:00:21 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:39 verbose #3370 > 00:00:21 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 20507
00:01:39 debug #3371 execute_with_options_async / exit_code: 0 / output.Length: 24076
00:01:39 debug #6 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path CommonFSharp.dib --retries 3
00:01:39 debug #3372 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path FileSystem.dib --retries 3",
[||], None, None, true, None)
00:01:39 verbose #3373 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "FileSystem.dib", "--retries", "3"])
00:01:39 verbose #3374 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/FileSystem.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/FileSystem.dib" --output-path "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:41 verbose #3375 > >
00:01:41 verbose #3376 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:41 verbose #3377 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:41 verbose #3378 > > │ # FileSystem (Polyglot) │
00:01:41 verbose #3379 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:41 verbose #3380 > >
00:01:41 verbose #3381 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:41 verbose #3382 > > #r
00:01:41 verbose #3383 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:01:41 verbose #3384 > > dard2.1/FSharp.Control.AsyncSeq.dll"
00:01:41 verbose #3385 > > #r
00:01:41 verbose #3386 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:01:41 verbose #3387 > > 0/System.Reactive.dll"
00:01:41 verbose #3388 > > #r
00:01:41 verbose #3389 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:01:41 verbose #3390 > > netstandard2.0/System.Reactive.Linq.dll"
00:01:41 verbose #3391 > > #r
00:01:41 verbose #3392 > > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:01:41 verbose #3393 > >
00:01:41 verbose #3394 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:41 verbose #3395 > > #r
00:01:41 verbose #3396 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:01:41 verbose #3397 > > spNetCore.Html.Abstractions.dll"
00:01:41 verbose #3398 > > #r
00:01:41 verbose #3399 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:41 verbose #3400 > > otNet.Interactive.dll"
00:01:41 verbose #3401 > > #r
00:01:41 verbose #3402 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:41 verbose #3403 > > otNet.Interactive.FSharp.dll"
00:01:41 verbose #3404 > > #r
00:01:41 verbose #3405 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:41 verbose #3406 > > otNet.Interactive.Formatting.dll"
00:01:41 verbose #3407 > > open System
00:01:41 verbose #3408 > > open System.IO
00:01:41 verbose #3409 > > open System.Text
00:01:41 verbose #3410 > > open Microsoft.DotNet.Interactive.Formatting
00:01:45 verbose #3411 > >
00:01:45 verbose #3412 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:45 verbose #3413 > > #r
00:01:45 verbose #3414 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:45 verbose #3415 > > otNet.Interactive.FSharp.dll"
00:01:45 verbose #3416 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:01:45 verbose #3417 > > #r
00:01:45 verbose #3418 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:45 verbose #3419 > > otNet.Interactive.dll"
00:01:45 verbose #3420 > > open type Microsoft.DotNet.Interactive.Kernel
00:01:45 verbose #3421 > >
00:01:45 verbose #3422 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:45 verbose #3423 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:01:46 verbose #3424 > >
00:01:46 verbose #3425 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:46 verbose #3426 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:01:46 verbose #3427 > > TextWriter)->fprintfn writer "%120A" x)
00:01:46 verbose #3428 > >
00:01:46 verbose #3429 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:46 verbose #3430 > > #!import ../../lib/fsharp/Notebooks.dib
00:01:46 verbose #3431 > > #!import ../../lib/fsharp/Testing.dib
00:01:46 verbose #3432 > >
00:01:46 verbose #3433 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:46 verbose #3434 > > //// test
00:01:46 verbose #3435 > >
00:01:46 verbose #3436 > > Formatter.ListExpansionLimit <- 100
00:01:46 verbose #3437 > >
00:01:46 verbose #3438 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:46 verbose #3439 > > #if FABLE_COMPILER
00:01:46 verbose #3440 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:46 verbose #3441 > > #endif
00:01:46 verbose #3442 > > type std_env_VarError = class end
00:01:46 verbose #3443 > > #if FABLE_COMPILER
00:01:46 verbose #3444 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:46 verbose #3445 > > #endif
00:01:46 verbose #3446 > > type core_any_Any = class end
00:01:46 verbose #3447 > > #if FABLE_COMPILER
00:01:46 verbose #3448 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:46 verbose #3449 > > #endif
00:01:46 verbose #3450 > > type core_ops_Try<'T> = class end
00:01:46 verbose #3451 > > #if FABLE_COMPILER
00:01:46 verbose #3452 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:46 verbose #3453 > > #endif
00:01:46 verbose #3454 > > type Func0<'T> = class end
00:01:46 verbose #3455 > > #if FABLE_COMPILER
00:01:46 verbose #3456 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:46 verbose #3457 > > #endif
00:01:46 verbose #3458 > > type Func0<'T, 'U> = class end
00:01:46 verbose #3459 > > #if FABLE_COMPILER
00:01:46 verbose #3460 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:46 verbose #3461 > > #endif
00:01:46 verbose #3462 > > type Box<'T> = class end
00:01:46 verbose #3463 > > #if FABLE_COMPILER
00:01:46 verbose #3464 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:46 verbose #3465 > > #endif
00:01:46 verbose #3466 > > type Dyn<'T> = class end
00:01:46 verbose #3467 > > #if FABLE_COMPILER
00:01:46 verbose #3468 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:46 verbose #3469 > > #endif
00:01:46 verbose #3470 > > type Send<'T> = class end
00:01:46 verbose #3471 > > #if FABLE_COMPILER
00:01:46 verbose #3472 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:46 verbose #3473 > > #endif
00:01:46 verbose #3474 > > type Fn<'T> = class end
00:01:46 verbose #3475 > > #if FABLE_COMPILER
00:01:46 verbose #3476 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:46 verbose #3477 > > #endif
00:01:46 verbose #3478 > > type FnUnit = class end
00:01:46 verbose #3479 > > #if FABLE_COMPILER
00:01:46 verbose #3480 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:46 verbose #3481 > > #endif
00:01:46 verbose #3482 > > type FnOnce<'T> = class end
00:01:46 verbose #3483 > > #if FABLE_COMPILER
00:01:46 verbose #3484 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:46 verbose #3485 > > #endif
00:01:46 verbose #3486 > > type ActionFn<'T> = class end
00:01:46 verbose #3487 > > #if FABLE_COMPILER
00:01:46 verbose #3488 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:46 verbose #3489 > > #endif
00:01:46 verbose #3490 > > type ActionFn2<'T, 'U> = class end
00:01:46 verbose #3491 > > #if FABLE_COMPILER
00:01:46 verbose #3492 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:46 verbose #3493 > > #endif
00:01:46 verbose #3494 > > type Impl<'T> = class end
00:01:46 verbose #3495 > > #if FABLE_COMPILER
00:01:46 verbose #3496 > > [[<Fable...
00:01:47 verbose #3497 > >
00:01:47 verbose #3498 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #3499 > > #if FABLE_COMPILER
00:01:47 verbose #3500 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:47 verbose #3501 > > #endif
00:01:47 verbose #3502 > > type core_any_Any = class end
00:01:47 verbose #3503 > > #if FABLE_COMPILER
00:01:47 verbose #3504 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:47 verbose #3505 > > #endif
00:01:47 verbose #3506 > > type core_ops_Try<'T> = class end
00:01:47 verbose #3507 > > #if FABLE_COMPILER
00:01:47 verbose #3508 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:47 verbose #3509 > > #endif
00:01:47 verbose #3510 > > type Func0<'T> = class end
00:01:47 verbose #3511 > > #if FABLE_COMPILER
00:01:47 verbose #3512 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:47 verbose #3513 > > #endif
00:01:47 verbose #3514 > > type Func0<'T, 'U> = class end
00:01:47 verbose #3515 > > #if FABLE_COMPILER
00:01:47 verbose #3516 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:47 verbose #3517 > > #endif
00:01:47 verbose #3518 > > type Box<'T> = class end
00:01:47 verbose #3519 > > #if FABLE_COMPILER
00:01:47 verbose #3520 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:47 verbose #3521 > > #endif
00:01:47 verbose #3522 > > type Dyn<'T> = class end
00:01:47 verbose #3523 > > #if FABLE_COMPILER
00:01:47 verbose #3524 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:47 verbose #3525 > > #endif
00:01:47 verbose #3526 > > type Send<'T> = class end
00:01:47 verbose #3527 > > #if FABLE_COMPILER
00:01:47 verbose #3528 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:47 verbose #3529 > > #endif
00:01:47 verbose #3530 > > type Fn<'T> = class end
00:01:47 verbose #3531 > > #if FABLE_COMPILER
00:01:47 verbose #3532 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:47 verbose #3533 > > #endif
00:01:47 verbose #3534 > > type FnUnit = class end
00:01:47 verbose #3535 > > #if FABLE_COMPILER
00:01:47 verbose #3536 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:47 verbose #3537 > > #endif
00:01:47 verbose #3538 > > type FnOnce<'T> = class end
00:01:47 verbose #3539 > > #if FABLE_COMPILER
00:01:47 verbose #3540 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:47 verbose #3541 > > #endif
00:01:47 verbose #3542 > > type ActionFn<'T> = class end
00:01:47 verbose #3543 > > #if FABLE_COMPILER
00:01:47 verbose #3544 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:47 verbose #3545 > > #endif
00:01:47 verbose #3546 > > type ActionFn2<'T, 'U> = class end
00:01:47 verbose #3547 > > #if FABLE_COMPILER
00:01:47 verbose #3548 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:47 verbose #3549 > > #endif
00:01:47 verbose #3550 > > type Impl<'T> = class end
00:01:47 verbose #3551 > > #if FABLE_COMPILER
00:01:47 verbose #3552 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:47 verbose #3553 > > #endif
00:01:47 verbose #3554 > > type Mut<'T> = class end
00:01:47 verbose #3555 > > #if FABLE_COMPILER
00:01:47 verbose #3556 > > [[<Fable.Core.Erase; Fable.Co...
00:01:49 verbose #3557 > >
00:01:49 verbose #3558 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:49 verbose #3559 > > #if FABLE_COMPILER
00:01:49 verbose #3560 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:01:49 verbose #3561 > > #endif
00:01:49 verbose #3562 > > type async_std_task_JoinHandle<'T> = class end
00:01:49 verbose #3563 > > #if FABLE_COMPILER
00:01:49 verbose #3564 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:01:49 verbose #3565 > > #endif
00:01:49 verbose #3566 > > type std_future_Future<'T> = class end
00:01:49 verbose #3567 > > #if FABLE_COMPILER
00:01:49 verbose #3568 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:01:49 verbose #3569 > > #endif
00:01:49 verbose #3570 > > type rayon_vec_IntoIter<'T> = class end
00:01:49 verbose #3571 > > #if FABLE_COMPILER
00:01:49 verbose #3572 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:01:49 verbose #3573 > > #endif
00:01:49 verbose #3574 > > type rayon_iter_Map<'T> = class end
00:01:49 verbose #3575 > > #if FABLE_COMPILER
00:01:49 verbose #3576 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:01:49 verbose #3577 > > #endif
00:01:49 verbose #3578 > > type futures_lite_stream_StreamExt = class end
00:01:49 verbose #3579 > > #if FABLE_COMPILER
00:01:49 verbose #3580 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:01:49 verbose #3581 > > #endif
00:01:49 verbose #3582 > > type futures_future_TryJoinAll<'T> = class end
00:01:49 verbose #3583 > > #if FABLE_COMPILER
00:01:49 verbose #3584 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:01:49 verbose #3585 > > #endif
00:01:49 verbose #3586 > > type futures_future_Fuse<'T> = class end
00:01:49 verbose #3587 > > #if FABLE_COMPILER
00:01:49 verbose #3588 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:01:49 verbose #3589 > > #endif
00:01:49 verbose #3590 > > type futures_future_JoinAll<'T> = class end
00:01:49 verbose #3591 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:01:49 verbose #3592 > > Async<System.Threading.CancellationToken> =
00:01:49 verbose #3593 > > let v1 : bool = true
00:01:49 verbose #3594 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:01:49 verbose #3595 > >
00:01:49 verbose #3596 > > #if FABLE_COMPILER || WASM || CONTRACT
00:01:49 verbose #3597 > >
00:01:49 verbose #3598 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:49 verbose #3599 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:01:49 verbose #3600 > > unbox<Async<System...
00:01:49 verbose #3601 > >
00:01:49 verbose #3602 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:49 verbose #3603 > > #if FABLE_COMPILER
00:01:49 verbose #3604 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:01:49 verbose #3605 > > #endif
00:01:49 verbose #3606 > > type std_thread_JoinHandle<'T> = class end
00:01:49 verbose #3607 > > #if FABLE_COMPILER
00:01:49 verbose #3608 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:01:49 verbose #3609 > > #endif
00:01:49 verbose #3610 > > type std_sync_Arc<'T> = class end
00:01:49 verbose #3611 > > #if FABLE_COMPILER
00:01:49 verbose #3612 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:01:49 verbose #3613 > > #endif
00:01:49 verbose #3614 > > type std_sync_Mutex<'T> = class end
00:01:49 verbose #3615 > > #if FABLE_COMPILER
00:01:49 verbose #3616 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:01:49 verbose #3617 > > #endif
00:01:49 verbose #3618 > > type std_sync_MutexGuard<'T> = class end
00:01:49 verbose #3619 > > #if FABLE_COMPILER
00:01:49 verbose #3620 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:01:49 verbose #3621 > > #endif
00:01:49 verbose #3622 > > type std_sync_PoisonError<'T> = class end
00:01:49 verbose #3623 > > #if FABLE_COMPILER
00:01:49 verbose #3624 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:01:49 verbose #3625 > > #endif
00:01:49 verbose #3626 > > type std_sync_mpsc_Receiver<'T> = class end
00:01:49 verbose #3627 > > #if FABLE_COMPILER
00:01:49 verbose #3628 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:01:49 verbose #3629 > > #endif
00:01:49 verbose #3630 > > type std_sync_mpsc_SendError<'T> = class end
00:01:49 verbose #3631 > > #if FABLE_COMPILER
00:01:49 verbose #3632 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:01:49 verbose #3633 > > #endif
00:01:49 verbose #3634 > > type std_sync_mpsc_Sender<'T> = class end
00:01:49 verbose #3635 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:01:49 verbose #3636 > > _.Dispose () = f ()
00:01:49 verbose #3637 > > type [[<Struct>]] US0 =
00:01:49 verbose #3638 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:01:49 verbose #3639 > > | US0_1
00:01:49 verbose #3640 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:01:49 verbose #3641 > > let v1 : bool = true
00:01:49 verbose #3642 > > let mutable _v1 : unit option = None
00:01:49 verbose #3643 > >
00:01:49 verbose #3644 > > #if FABLE_COMPILER || WASM || CONTRACT
00:01:49 verbose #3645 > >
00:01:49 verbose #3646 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:01:49 verbose #3647 > >
00:01:49 verbose #3648 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:49 verbose #3649 > > #if FABLE_COMPILER
00:01:49 verbose #3650 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:01:49 verbose #3651 > > #endif
00:01:49 verbose #3652 > > type reqwest_Error = class end
00:01:49 verbose #3653 > > #if FABLE_COMPILER
00:01:49 verbose #3654 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:01:49 verbose #3655 > > #endif
00:01:49 verbose #3656 > > type reqwest_RequestBuilder = class end
00:01:49 verbose #3657 > > #if FABLE_COMPILER
00:01:49 verbose #3658 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:01:49 verbose #3659 > > #endif
00:01:49 verbose #3660 > > type reqwest_Response = class end
00:01:49 verbose #3661 > > #if FABLE_COMPILER
00:01:49 verbose #3662 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:49 verbose #3663 > > #endif
00:01:49 verbose #3664 > > type std_env_VarError = class end
00:01:49 verbose #3665 > > #if FABLE_COMPILER
00:01:49 verbose #3666 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:49 verbose #3667 > > #endif
00:01:49 verbose #3668 > > type core_any_Any = class end
00:01:49 verbose #3669 > > #if FABLE_COMPILER
00:01:49 verbose #3670 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:49 verbose #3671 > > #endif
00:01:49 verbose #3672 > > type core_ops_Try<'T> = class end
00:01:49 verbose #3673 > > #if FABLE_COMPILER
00:01:49 verbose #3674 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:49 verbose #3675 > > #endif
00:01:49 verbose #3676 > > type Func0<'T> = class end
00:01:49 verbose #3677 > > #if FABLE_COMPILER
00:01:49 verbose #3678 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:49 verbose #3679 > > #endif
00:01:49 verbose #3680 > > type Func0<'T, 'U> = class end
00:01:49 verbose #3681 > > #if FABLE_COMPILER
00:01:49 verbose #3682 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:49 verbose #3683 > > #endif
00:01:49 verbose #3684 > > type Box<'T> = class end
00:01:49 verbose #3685 > > #if FABLE_COMPILER
00:01:49 verbose #3686 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:49 verbose #3687 > > #endif
00:01:49 verbose #3688 > > type Dyn<'T> = class end
00:01:49 verbose #3689 > > #if FABLE_COMPILER
00:01:49 verbose #3690 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:01:49 verbose #3691 > > #endif
00:01:49 verbose #3692 > > type Send<'T> = class end
00:01:49 verbose #3693 > > #if FABLE_COMPILER
00:01:49 verbose #3694 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:49 verbose #3695 > > #endif
00:01:49 verbose #3696 > > type Fn<'T> = class end
00:01:49 verbose #3697 > > #if FABLE_COMPILER
00:01:49 verbose #3698 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:49 verbose #3699 > > #endif
00:01:49 verbose #3700 > > type FnUnit = class end
00:01:49 verbose #3701 > > #if FABLE_COMPILER
00:01:49 verbose #3702 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:49 verbose #3703 > > #...
00:01:50 verbose #3704 > >
00:01:50 verbose #3705 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:50 verbose #3706 > > #if FABLE_COMPILER
00:01:50 verbose #3707 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:01:50 verbose #3708 > > #endif
00:01:50 verbose #3709 > > type clap_Arg = class end
00:01:50 verbose #3710 > > #if FABLE_COMPILER
00:01:50 verbose #3711 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:01:50 verbose #3712 > > #endif
00:01:50 verbose #3713 > > type clap_ArgAction = class end
00:01:50 verbose #3714 > > #if FABLE_COMPILER
00:01:50 verbose #3715 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:01:50 verbose #3716 > > #endif
00:01:50 verbose #3717 > > type clap_Command = class end
00:01:50 verbose #3718 > > #if FABLE_COMPILER
00:01:50 verbose #3719 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:01:50 verbose #3720 > > #endif
00:01:50 verbose #3721 > > type clap_ArgMatches = class end
00:01:50 verbose #3722 > > #if FABLE_COMPILER
00:01:50 verbose #3723 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:01:50 verbose #3724 > > #endif
00:01:50 verbose #3725 > > type clap_builder_ValueRange = class end
00:01:50 verbose #3726 > > #if FABLE_COMPILER
00:01:50 verbose #3727 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:01:50 verbose #3728 > > #endif
00:01:50 verbose #3729 > > type clap_builder_ValueParser = class end
00:01:50 verbose #3730 > > #if FABLE_COMPILER
00:01:50 verbose #3731 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:01:50 verbose #3732 > > #endif
00:01:50 verbose #3733 > > type clap_builder_PossibleValue = class end
00:01:50 verbose #3734 > > #if FABLE_COMPILER
00:01:50 verbose #3735 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:01:50 verbose #3736 > > #endif
00:01:50 verbose #3737 > > type std_process_Child = class end
00:01:50 verbose #3738 > > #if FABLE_COMPILER
00:01:50 verbose #3739 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:01:50 verbose #3740 > > #endif
00:01:50 verbose #3741 > > type std_process_ChildStderr = class end
00:01:50 verbose #3742 > > #if FABLE_COMPILER
00:01:50 verbose #3743 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:01:50 verbose #3744 > > #endif
00:01:50 verbose #3745 > > type std_process_ChildStdout = class end
00:01:50 verbose #3746 > > #if FABLE_COMPILER
00:01:50 verbose #3747 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:01:50 verbose #3748 > > #endif
00:01:50 verbose #3749 > > type std_process_ChildStdin = class end
00:01:50 verbose #3750 > > #if FABLE_COMPILER
00:01:50 verbose #3751 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:01:50 verbose #3752 > > #endif
00:01:50 verbose #3753 > > type std_process_Command = class ...
00:01:53 verbose #3754 > >
00:01:53 verbose #3755 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:53 verbose #3756 > > #if FABLE_COMPILER
00:01:53 verbose #3757 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:01:53 verbose #3758 > > #endif
00:01:53 verbose #3759 > > type std_fs_File = class end
00:01:53 verbose #3760 > > #if FABLE_COMPILER
00:01:53 verbose #3761 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:01:53 verbose #3762 > > #endif
00:01:53 verbose #3763 > > type std_fs_FileType = class end
00:01:53 verbose #3764 > > #if FABLE_COMPILER
00:01:53 verbose #3765 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:01:53 verbose #3766 > > #endif
00:01:53 verbose #3767 > > type std_path_Display = class end
00:01:53 verbose #3768 > > #if FABLE_COMPILER
00:01:53 verbose #3769 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:01:53 verbose #3770 > > #endif
00:01:53 verbose #3771 > > type std_path_Path = class end
00:01:53 verbose #3772 > > #if FABLE_COMPILER
00:01:53 verbose #3773 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:01:53 verbose #3774 > > #endif
00:01:53 verbose #3775 > > type std_path_PathBuf = class end
00:01:53 verbose #3776 > > #if FABLE_COMPILER
00:01:53 verbose #3777 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:01:53 verbose #3778 > > #endif
00:01:53 verbose #3779 > > type async_walkdir_DirEntry = class end
00:01:53 verbose #3780 > > #if FABLE_COMPILER
00:01:53 verbose #3781 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:01:53 verbose #3782 > > #endif
00:01:53 verbose #3783 > > type async_walkdir_Filtering = class end
00:01:53 verbose #3784 > > #if FABLE_COMPILER
00:01:53 verbose #3785 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:01:53 verbose #3786 > > #endif
00:01:53 verbose #3787 > > type async_walkdir_WalkDir = class end
00:01:53 verbose #3788 > > #if FABLE_COMPILER
00:01:53 verbose #3789 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:01:53 verbose #3790 > > #endif
00:01:53 verbose #3791 > > type core_any_Any = class end
00:01:53 verbose #3792 > > #if FABLE_COMPILER
00:01:53 verbose #3793 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:53 verbose #3794 > > #endif
00:01:53 verbose #3795 > > type core_ops_Try<'T> = class end
00:01:53 verbose #3796 > > #if FABLE_COMPILER
00:01:53 verbose #3797 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:53 verbose #3798 > > #endif
00:01:53 verbose #3799 > > type Func0<'T> = class end
00:01:53 verbose #3800 > > #if FABLE_COMPILER
00:01:53 verbose #3801 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:53 verbose #3802 > > #endif
00:01:53 verbose #3803 > > type Func0<'T, 'U> = class end
00:01:53 verbose #3804 > > #if FABLE_COMPILER
00:01:53 verbose #3805 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:53 verbose #3806 > > #endif
00:01:53 verbose #3807 > > type Box<'T> = clas...
00:01:55 verbose #3808 > >
00:01:55 verbose #3809 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:55 verbose #3810 > > module SpiralTrace =
00:01:55 verbose #3811 > > let trace x =
00:01:55 verbose #3812 > > #if !INTERACTIVE
00:01:55 verbose #3813 > > Trace.trace x
00:01:55 verbose #3814 > > #else
00:01:55 verbose #3815 > > trace x
00:01:55 verbose #3816 > > #endif
00:01:55 verbose #3817 > >
00:01:55 verbose #3818 > > type TraceLevel =
00:01:55 verbose #3819 > > #if !INTERACTIVE
00:01:55 verbose #3820 > > Trace.US0
00:01:55 verbose #3821 > > #else
00:01:55 verbose #3822 > > US0
00:01:55 verbose #3823 > > #endif
00:01:55 verbose #3824 > >
00:01:55 verbose #3825 > > module SpiralCrypto =
00:01:55 verbose #3826 > > let hash_text x =
00:01:55 verbose #3827 > > #if !INTERACTIVE
00:01:55 verbose #3828 > > Crypto.hash_text x
00:01:55 verbose #3829 > > #else
00:01:55 verbose #3830 > > hash_text x
00:01:55 verbose #3831 > > #endif
00:01:55 verbose #3832 > >
00:01:55 verbose #3833 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:01:55 verbose #3834 > >
00:01:55 verbose #3835 > > module SpiralAsync =
00:01:55 verbose #3836 > > let merge_cancellation_token_with_default_async x =
00:01:55 verbose #3837 > > #if !INTERACTIVE
00:01:55 verbose #3838 > > Async_.merge_cancellation_token_with_default_async x
00:01:55 verbose #3839 > > #else
00:01:55 verbose #3840 > > merge_cancellation_token_with_default_async x
00:01:55 verbose #3841 > > #endif
00:01:55 verbose #3842 > >
00:01:55 verbose #3843 > > module SpiralThreading =
00:01:55 verbose #3844 > > let new_disposable_token x =
00:01:55 verbose #3845 > > #if !INTERACTIVE
00:01:55 verbose #3846 > > Threading.new_disposable_token x
00:01:55 verbose #3847 > > #else
00:01:55 verbose #3848 > > new_disposable_token x
00:01:55 verbose #3849 > > #endif
00:01:55 verbose #3850 > >
00:01:55 verbose #3851 > > module SpiralNetworking =
00:01:55 verbose #3852 > > let test_port_open x =
00:01:55 verbose #3853 > > #if !INTERACTIVE
00:01:55 verbose #3854 > > Networking.test_port_open x
00:01:55 verbose #3855 > > #else
00:01:55 verbose #3856 > > test_port_open x
00:01:55 verbose #3857 > > #endif
00:01:55 verbose #3858 > >
00:01:55 verbose #3859 > > let test_port_open_timeout x =
00:01:55 verbose #3860 > > #if !INTERACTIVE
00:01:55 verbose #3861 > > Networking.test_port_open_timeout x
00:01:55 verbose #3862 > > #else
00:01:55 verbose #3863 > > test_port_open_timeout x
00:01:55 verbose #3864 > > #endif
00:01:55 verbose #3865 > >
00:01:55 verbose #3866 > > let wait_for_port_access x =
00:01:55 verbose #3867 > > #if !INTERACTIVE
00:01:55 verbose #3868 > > Networking.wait_for_port_access x
00:01:55 verbose #3869 > > #else
00:01:55 verbose #3870 > > wait_for_port_access x
00:01:55 verbose #3871 > > #endif
00:01:55 verbose #3872 > >
00:01:55 verbose #3873 > > let get_available_port x =
00:01:55 verbose #3874 > > #if !INTERACTIVE
00:01:55 verbose #3875 > > Networking.get_available_port x
00:01:55 verbose #3876 > > #else
00:01:55 verbose #3877 > > get_available_port x
00:01:55 verbose #3878 > > #endif
00:01:55 verbose #3879 > >
00:01:55 verbose #3880 > > module SpiralRuntime =
00:01:55 verbose #3881 > > let get_executable_suffix () =
00:01:55 verbose #3882 > > #if !INTERACTIVE
00:01:55 verbose #3883 > > Runtime.get_executable_suffix ()
00:01:55 verbose #3884 > > #else
00:01:55 verbose #3885 > > get_executable_suffix ()
00:01:55 verbose #3886 > > #endif
00:01:55 verbose #3887 > >
00:01:55 verbose #3888 > > let is_windows () =
00:01:55 verbose #3889 > > #if !INTERACTIVE
00:01:55 verbose #3890 > > ...
00:01:55 verbose #3891 > >
00:01:55 verbose #3892 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:55 verbose #3893 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:01:55 verbose #3894 > >
00:01:55 verbose #3895 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:55 verbose #3896 > > //// test
00:01:55 verbose #3897 > >
00:01:55 verbose #3898 > > type AssertExceptionFormatter (ex) =
00:01:55 verbose #3899 > > member _.Text =
00:01:55 verbose #3900 > > ex.ToString()
00:01:55 verbose #3901 > > .Replace("32m", "<span style=\"color: green;\">")
00:01:55 verbose #3902 > > .Replace("36m", "</span>")
00:01:55 verbose #3903 > > .Replace("31m", "<span style=\"color: red;\">")
00:01:55 verbose #3904 > > .Replace("\n", "<br/>\n")
00:01:55 verbose #3905 > >
00:01:55 verbose #3906 > >
00:01:55 verbose #3907 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:01:55 verbose #3908 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:01:55 verbose #3909 > >
00:01:55 verbose #3910 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:56 verbose #3911 > > //// test
00:01:56 verbose #3912 > >
00:01:56 verbose #3913 > > let inline __expect fn log expected actual =
00:01:56 verbose #3914 > > if log then printfn $"{actual.ToDisplayString ()}"
00:01:56 verbose #3915 > > try
00:01:56 verbose #3916 > > "Testing.__expect" |> fn actual expected
00:01:56 verbose #3917 > > with :? Expecto.AssertException as ex ->
00:01:56 verbose #3918 > > AssertExceptionFormatter(ex).Display () |> ignore
00:01:56 verbose #3919 > > failwith (ex.GetType().FullName)
00:01:56 verbose #3920 > >
00:01:56 verbose #3921 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:01:56 verbose #3922 > > expected actual
00:01:56 verbose #3923 > > let inline _contains expected actual = __contains true expected actual
00:01:56 verbose #3924 > >
00:01:56 verbose #3925 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:01:56 verbose #3926 > > expected actual
00:01:56 verbose #3927 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:01:56 verbose #3928 > >
00:01:56 verbose #3929 > > let inline __isGreaterThan log expected actual = __expect
00:01:56 verbose #3930 > > Expecto.Expect.isGreaterThan log expected actual
00:01:56 verbose #3931 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:01:56 verbose #3932 > >
00:01:56 verbose #3933 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:01:56 verbose #3934 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:01:56 verbose #3935 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:01:56 verbose #3936 > > expected actual
00:01:56 verbose #3937 > >
00:01:56 verbose #3938 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:01:56 verbose #3939 > > log expected actual
00:01:56 verbose #3940 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:01:56 verbose #3941 > >
00:01:56 verbose #3942 > > let inline __isLessThanOrEqual log expected actual = __expect
00:01:56 verbose #3943 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:01:56 verbose #3944 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:01:56 verbose #3945 > > expected actual
00:01:56 verbose #3946 > >
00:01:56 verbose #3947 > > let inline __sequenceEqual log expected actual = __expe...
00:01:56 verbose #3948 > >
00:01:56 verbose #3949 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:56 verbose #3950 > > //// test
00:01:56 verbose #3951 > >
00:01:56 verbose #3952 > > let inline __isBetween log a b actual =
00:01:56 verbose #3953 > > let inline isBetween actual (a, b) _ =
00:01:56 verbose #3954 > > __isGreaterThanOrEqual log a actual
00:01:56 verbose #3955 > > __isLessThanOrEqual log b actual
00:01:56 verbose #3956 > > __expect isBetween log (a, b) actual
00:01:56 verbose #3957 > > let inline _isBetween a b actual = __isBetween true a b actual
00:01:56 verbose #3958 > >
00:01:56 verbose #3959 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:56 verbose #3960 > > #!import ../../lib/fsharp/Common.fs
00:01:56 verbose #3961 > > #!import ../../lib/fsharp/CommonFSharp.fs
00:01:56 verbose #3962 > > #!import ../../lib/fsharp/Async.fs
00:01:56 verbose #3963 > > #!import ../../lib/fsharp/AsyncSeq.fs
00:01:56 verbose #3964 > > #!import ../../lib/fsharp/Runtime.fs
00:01:56 verbose #3965 > >
00:01:56 verbose #3966 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:56 verbose #3967 > > #if !INTERACTIVE
00:01:56 verbose #3968 > > namespace Polyglot
00:01:56 verbose #3969 > > #endif
00:01:56 verbose #3970 > >
00:01:56 verbose #3971 > > module Common =
00:01:56 verbose #3972 > >
00:01:56 verbose #3973 > > #if !INTERACTIVE
00:01:56 verbose #3974 > > open Lib
00:01:56 verbose #3975 > > #endif
00:01:56 verbose #3976 > >
00:01:56 verbose #3977 > > let nl = System.Environment.NewLine
00:01:56 verbose #3978 > > let q = @""""
00:01:56 verbose #3979 > >
00:01:56 verbose #3980 > > let inline cons head tail = head :: tail
00:01:56 verbose #3981 > >
00:01:56 verbose #3982 > > /// ## memoize
00:01:56 verbose #3983 > > let inline memoize fn =
00:01:56 verbose #3984 > > let result = lazy fn ()
00:01:56 verbose #3985 > > fun () -> result.Value
00:01:56 verbose #3986 > >
00:01:56 verbose #3987 > > /// ## TraceLevel
00:01:56 verbose #3988 > > type TraceLevel =
00:01:56 verbose #3989 > > | Verbose
00:01:56 verbose #3990 > > | Debug
00:01:56 verbose #3991 > > | Info
00:01:56 verbose #3992 > > | Warning
00:01:56 verbose #3993 > > | Critical
00:01:56 verbose #3994 > >
00:01:56 verbose #3995 > > let inline _locals () = ""
00:01:56 verbose #3996 > >
00:01:56 verbose #3997 > > /// ## trace
00:01:56 verbose #3998 > > let to_trace_level = function
00:01:56 verbose #3999 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:01:56 verbose #4000 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:01:56 verbose #4001 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:01:56 verbose #4002 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:01:56 verbose #4003 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:01:56 verbose #4004 > >
00:01:56 verbose #4005 > > let trace level fn locals =
00:01:56 verbose #4006 > > let level = level |> to_trace_level
00:01:56 verbose #4007 > > SpiralTrace.trace level fn locals
00:01:56 verbose #4008 > >
00:01:56 verbose #4009 > >
00:01:56 verbose #4010 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:56 verbose #4011 > > #if !INTERACTIVE
00:01:56 verbose #4012 > > namespace Polyglot
00:01:56 verbose #4013 > > #endif
00:01:56 verbose #4014 > >
00:01:56 verbose #4015 > > module CommonFSharp =
00:01:56 verbose #4016 > >
00:01:56 verbose #4017 > > open Common
00:01:56 verbose #4018 > >
00:01:56 verbose #4019 > > /// ## getUnionCaseName
00:01:56 verbose #4020 > > let inline getUnionCaseName<'T> (x: 'T) =
00:01:56 verbose #4021 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:01:56 verbose #4022 > > | case, _ -> case.Name
00:01:56 verbose #4023 > >
00:01:56 verbose #4024 > >
00:01:56 verbose #4025 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:56 verbose #4026 > > #if !INTERACTIVE
00:01:56 verbose #4027 > > namespace Polyglot
00:01:56 verbose #4028 > > #endif
00:01:56 verbose #4029 > >
00:01:56 verbose #4030 > > module Async =
00:01:56 verbose #4031 > >
00:01:56 verbose #4032 > > #if !INTERACTIVE
00:01:56 verbose #4033 > > open Lib
00:01:56 verbose #4034 > > #endif
00:01:56 verbose #4035 > >
00:01:56 verbose #4036 > > open Common
00:01:56 verbose #4037 > >
00:01:56 verbose #4038 > > /// ## choice
00:01:56 verbose #4039 > > let inline choice asyncs = async {
00:01:56 verbose #4040 > > let e = Event<_> ()
00:01:56 verbose #4041 > > use cts = new System.Threading.CancellationTokenSource ()
00:01:56 verbose #4042 > > let fn =
00:01:56 verbose #4043 > > asyncs
00:01:56 verbose #4044 > > |> Seq.map (fun a -> async {
00:01:56 verbose #4045 > > let! x = a
00:01:56 verbose #4046 > > e.Trigger x
00:01:56 verbose #4047 > > })
00:01:56 verbose #4048 > > |> Async.Parallel
00:01:56 verbose #4049 > > |> Async.Ignore
00:01:56 verbose #4050 > > Async.Start (fn, cts.Token)
00:01:56 verbose #4051 > > let! result = Async.AwaitEvent e.Publish
00:01:56 verbose #4052 > > cts.Cancel ()
00:01:56 verbose #4053 > > return result
00:01:56 verbose #4054 > > }
00:01:56 verbose #4055 > >
00:01:56 verbose #4056 > > /// ## map
00:01:56 verbose #4057 > > let inline map fn a = async {
00:01:56 verbose #4058 > > let! x = a
00:01:56 verbose #4059 > > return fn x
00:01:56 verbose #4060 > > }
00:01:56 verbose #4061 > >
00:01:56 verbose #4062 > > /// ## catch
00:01:56 verbose #4063 > > let inline catch a =
00:01:56 verbose #4064 > > a
00:01:56 verbose #4065 > > |> Async.Catch
00:01:56 verbose #4066 > > |> map (function
00:01:56 verbose #4067 > > | Choice1Of2 result -> Ok result
00:01:56 verbose #4068 > > | Choice2Of2 ex -> Error ex
00:01:56 verbose #4069 > > )
00:01:56 verbose #4070 > >
00:01:56 verbose #4071 > > /// ## runWithTimeoutChoiceAsync
00:01:56 verbose #4072 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:01:56 verbose #4073 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:01:56 verbose #4074 > >
00:01:56 verbose #4075 > > let timeoutTask = async {
00:01:56 verbose #4076 > > do! Async.Sleep timeout
00:01:56 verbose #4077 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:01:56 verbose #4078 > > return None
00:01:56 verbose #4079 > > }
00:01:56 verbose #4080 > >
00:01:56 verbose #4081 > > let task = async {
00:01:56 verbose #4082 > > try
00:01:56 verbose #4083 > > let! result = fn
00:01:56 verbose #4084 > > return Some result
00:01:56 verbose #4085 > > with
00:01:56 verbose #4086 > > | :? System.AggregateException as ex when
00:01:56 verbose #4087 > > ex.InnerExceptions
00:01:56 verbose #4088 > > |> Seq.exists (function :? Sys...
00:01:57 verbose #4089 > >
00:01:57 verbose #4090 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:57 verbose #4091 > > #if !INTERACTIVE
00:01:57 verbose #4092 > > namespace Polyglot
00:01:57 verbose #4093 > > #endif
00:01:57 verbose #4094 > >
00:01:57 verbose #4095 > > module AsyncSeq =
00:01:57 verbose #4096 > >
00:01:57 verbose #4097 > > #if !INTERACTIVE
00:01:57 verbose #4098 > > open Lib
00:01:57 verbose #4099 > > #endif
00:01:57 verbose #4100 > >
00:01:57 verbose #4101 > > open Common
00:01:57 verbose #4102 > >
00:01:57 verbose #4103 > > /// ## subscribeEvent
00:01:57 verbose #4104 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:01:57 verbose #4105 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:01:57 verbose #4106 > > 'A>(event.AddHandler, event.RemoveHandler)
00:01:57 verbose #4107 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:01:57 verbose #4108 > > event.EventArgs)
00:01:57 verbose #4109 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:01:57 verbose #4110 > >
00:01:57 verbose #4111 > > /// ## subscribeToken
00:01:57 verbose #4112 > > let subscribeToken (token : System.Threading.CancellationToken) =
00:01:57 verbose #4113 > > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:01:57 verbose #4114 > > System.Action tcs.SetResult |> token.Register |> ignore
00:01:57 verbose #4115 > > let start = System.DateTime.Now.Ticks
00:01:57 verbose #4116 > > FSharp.Control.AsyncSeq.unfoldAsync
00:01:57 verbose #4117 > > (fun () -> async {
00:01:57 verbose #4118 > > do! tcs.Task |> Async.AwaitTask
00:01:57 verbose #4119 > > return Some (System.DateTime.Now.Ticks - start, ())
00:01:57 verbose #4120 > > })
00:01:57 verbose #4121 > > ()
00:01:57 verbose #4122 > >
00:01:57 verbose #4123 > >
00:01:57 verbose #4124 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:57 verbose #4125 > > #if !INTERACTIVE
00:01:57 verbose #4126 > > namespace Polyglot
00:01:57 verbose #4127 > > #endif
00:01:57 verbose #4128 > >
00:01:57 verbose #4129 > > module Runtime =
00:01:57 verbose #4130 > >
00:01:57 verbose #4131 > > #if !INTERACTIVE
00:01:57 verbose #4132 > > open Lib
00:01:57 verbose #4133 > > #endif
00:01:57 verbose #4134 > >
00:01:57 verbose #4135 > > open Common
00:01:57 verbose #4136 > >
00:01:57 verbose #4137 > > /// ## parseArgs
00:01:57 verbose #4138 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:01:57 verbose #4139 > > let assemblyName =
00:01:57 verbose #4140 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:01:57 verbose #4141 > > let errorHandler : Argu.IExiter =
00:01:57 verbose #4142 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:01:57 verbose #4143 > > List.contains assemblyName
00:01:57 verbose #4144 > > then Argu.ExceptionExiter ()
00:01:57 verbose #4145 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:01:57 verbose #4146 > > _ -> Some System.ConsoleColor.Red)
00:01:57 verbose #4147 > >
00:01:57 verbose #4148 > > let parser =
00:01:57 verbose #4149 > > Argu.ArgumentParser.Create<'T> (
00:01:57 verbose #4150 > > programName =
00:01:57 verbose #4151 > > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:01:57 verbose #4152 > > errorHandler = errorHandler
00:01:57 verbose #4153 > > )
00:01:57 verbose #4154 > >
00:01:57 verbose #4155 > > parser.ParseCommandLine args
00:01:57 verbose #4156 > >
00:01:57 verbose #4157 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:01:57 verbose #4158 > > args
00:01:57 verbose #4159 > > |> parseArgs<'T>
00:01:57 verbose #4160 > > |> fun results -> results.GetAllResults ()
00:01:57 verbose #4161 > >
00:01:57 verbose #4162 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:01:57 verbose #4163 > > args
00:01:57 verbose #4164 > > |> parseAllArgs<'T>
00:01:57 verbose #4165 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:01:57 verbose #4166 > > |> Map.ofList
00:01:57 verbose #4167 > >
00:01:57 verbose #4168 > >
00:01:57 verbose #4169 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:57 verbose #4170 > > #if !INTERACTIVE
00:01:57 verbose #4171 > > open Lib
00:01:57 verbose #4172 > > #endif
00:01:57 verbose #4173 > >
00:01:57 verbose #4174 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:57 verbose #4175 > > open Common
00:01:57 verbose #4176 > > open SpiralFileSystem.Operators
00:01:57 verbose #4177 > >
00:01:57 verbose #4178 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:57 verbose #4179 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:57 verbose #4180 > > │ ## watchDirectory │
00:01:57 verbose #4181 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:57 verbose #4182 > >
00:01:57 verbose #4183 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:57 verbose #4184 > > [[<RequireQualifiedAccess>]]
00:01:57 verbose #4185 > > type FileSystemChangeType =
00:01:57 verbose #4186 > > | Failure
00:01:57 verbose #4187 > > | Changed
00:01:57 verbose #4188 > > | Created
00:01:57 verbose #4189 > > | Deleted
00:01:57 verbose #4190 > > | Renamed
00:01:57 verbose #4191 > >
00:01:57 verbose #4192 > > [[<RequireQualifiedAccess>]]
00:01:57 verbose #4193 > > type FileSystemChange =
00:01:57 verbose #4194 > > | Failure of exn: exn
00:01:57 verbose #4195 > > | Changed of path: string * content: string option
00:01:57 verbose #4196 > > | Created of path: string * content: string option
00:01:57 verbose #4197 > > | Deleted of path: string
00:01:57 verbose #4198 > > | Renamed of oldPath: string * (string * string option)
00:01:57 verbose #4199 > >
00:01:57 verbose #4200 > >
00:01:57 verbose #4201 > > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:01:57 verbose #4202 > > let fullPath = path |> System.IO.Path.GetFullPath
00:01:57 verbose #4203 > > let _locals () = $"filter: {filter} / {_locals ()}"
00:01:57 verbose #4204 > >
00:01:57 verbose #4205 > > let watcher =
00:01:57 verbose #4206 > > new System.IO.FileSystemWatcher (
00:01:57 verbose #4207 > > Path = fullPath,
00:01:57 verbose #4208 > > NotifyFilter = filter,
00:01:57 verbose #4209 > > EnableRaisingEvents = true,
00:01:57 verbose #4210 > > IncludeSubdirectories = true
00:01:57 verbose #4211 > > )
00:01:57 verbose #4212 > >
00:01:57 verbose #4213 > > let inline getEventPath (path : string) =
00:01:57 verbose #4214 > > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:01:57 verbose #4215 > > SpiralSm.trim_start [[| '/'; '\\' |]]
00:01:57 verbose #4216 > >
00:01:57 verbose #4217 > > let inline ticks () =
00:01:57 verbose #4218 > > System.DateTime.UtcNow.Ticks
00:01:57 verbose #4219 > >
00:01:57 verbose #4220 > > let changedStream =
00:01:57 verbose #4221 > > AsyncSeq.subscribeEvent
00:01:57 verbose #4222 > > watcher.Changed
00:01:57 verbose #4223 > > (fun event ->
00:01:57 verbose #4224 > > ticks (),
00:01:57 verbose #4225 > > [[ FileSystemChange.Changed (getEventPath event.FullPath, None)
00:01:57 verbose #4226 > > ]]
00:01:57 verbose #4227 > > )
00:01:57 verbose #4228 > >
00:01:57 verbose #4229 > > let deletedStream =
00:01:57 verbose #4230 > > AsyncSeq.subscribeEvent
00:01:57 verbose #4231 > > watcher.Deleted
00:01:57 verbose #4232 > > (fun event ->
00:01:57 verbose #4233 > > ticks (),
00:01:57 verbose #4234 > > [[ FileSystemChange.Deleted (getEventPath event.FullPath) ]]
00:01:57 verbose #4235 > > )
00:01:57 verbose #4236 > >
00:01:57 verbose #4237 > > let createdStream =
00:01:57 verbose #4238 > > AsyncSeq.subscribeEvent
00:01:57 verbose #4239 > > watcher.Created
00:01:57 verbose #4240 > > (fun event ->
00:01:57 verbose #4241 > > let path = getEventPath event.FullPath
00:01:57 verbose #4242 > > ticks (), [[
00:01:57 verbose #4243 > > FileSystemChange.Created (path, None)
00:01:57 verbose #4244 > > if SpiralRuntime.is_windows () then
00:01:57 verbose #4245 > > FileSystemChange.Changed (path, None)
00:01:57 verbose #4246 > > ]])
00:01:57 verbose #4247 > >
00:01:57 verbose #4248 > > let renamedStream =
00:01:57 verbose #4249 > > AsyncSeq.subscribeEvent
00:01:57 verbose #4250 > > watcher.Renamed
00:01:57 verbose #4251 > > (fun event ->
00:01:57 verbose #4252 > > ticks (), [[
00:01:57 verbose #4253 > > FileSystemChange.Renamed (
00:01:57 verbose #4254 > > getEventPath event.OldFullPath,
00:01:57 verbose #4255 > > (getEventPath event.FullPath, None)
00:01:57 verbose #4256 > > )
00:01:57 verbose #4257 > > ]]
00:01:57 verbose #4258 > > )
00:01:57 verbose #4259 > >
00:01:57 verbose #4260 > > let failureStream =
00:01:57 verbose #4261 > > AsyncSeq.subscribeEvent
00:01:57 verbose #4262 > > watcher.Error
00:01:57 verbose #4263 > > (fun event -> ticks (), [[ FileSystemChange.Failure
00:01:57 verbose #4264 > > (event.GetException ()) ]])
00:01:57 verbose #4265 > >
00:01:57 verbose #4266 > > let stream =
00:01:57 verbose #4267 > > [[
00:01:57 verbose #4268 > > changedStream
00:01:57 verbose #4269 > > deletedStream
00:01:57 verbose #4270 > > createdStream
00:01:57 verbose #4271 > > renamedStream
00:01:57 verbose #4272 > > failureStream
00:01:57 verbose #4273 > > ]]
00:01:57 verbose #4274 > > |> FSharp.Control.AsyncSeq.mergeAll
00:01:57 verbose #4275 > > |> FSharp.Control.AsyncSeq.map (fun (t, events) ->
00:01:57 verbose #4276 > > events
00:01:57 verbose #4277 > > |> List.fold
00:01:57 verbose #4278 > > (fun (i, events) event ->
00:01:57 verbose #4279 > > i + 1L,
00:01:57 verbose #4280 > > (t + i, event) :: events)
00:01:57 verbose #4281 > > (0L, [[]])
00:01:57 verbose #4282 > > |> snd
00:01:57 verbose #4283 > > |> List.rev
00:01:57 verbose #4284 > > )
00:01:57 verbose #4285 > > |> FSharp.Control.AsyncSeq.concatSeq
00:01:57 verbose #4286 > > |> FSharp.Control.AsyncSeq.mapAsyncParallel (fun (t, event) -> async {
00:01:57 verbose #4287 > > match shouldReadContent event, event with
00:01:57 verbose #4288 > > | true, FileSystemChange.Changed (path, _) ->
00:01:57 verbose #4289 > > do! Async.Sleep 5
00:01:57 verbose #4290 > > let! content = fullPath </> path |>
00:01:57 verbose #4291 > > SpiralFileSystem.read_all_text_retry_async
00:01:57 verbose #4292 > > return t, FileSystemChange.Changed (path, content)
00:01:57 verbose #4293 > > | true, FileSystemChange.Created (path, _) ->
00:01:57 verbose #4294 > > do! Async.Sleep 5
00:01:57 verbose #4295 > > let! content = fullPath </> path |>
00:01:57 verbose #4296 > > SpiralFileSystem.read_all_text_retry_async
00:01:57 verbose #4297 > > return t, FileSystemChange.Created (path, content)
00:01:57 verbose #4298 > > | true, FileSystemChange.Renamed (oldPath, (newPath, _)) ->
00:01:57 verbose #4299 > > let! content = fullPath </> newPath |>
00:01:57 verbose #4300 > > SpiralFileSystem.read_all_text_retry_async
00:01:57 verbose #4301 > > return t, FileSystemChange.Renamed (oldPath, (newPath, content))
00:01:57 verbose #4302 > > | _ -> return t, event
00:01:57 verbose #4303 > > })
00:01:57 verbose #4304 > >
00:01:57 verbose #4305 > > let disposable =
00:01:57 verbose #4306 > > new_disposable (fun () ->
00:01:57 verbose #4307 > > trace Debug (fun () -> "watchWithFilter / Disposing watch stream")
00:01:57 verbose #4308 > > _locals
00:01:57 verbose #4309 > > watcher.EnableRaisingEvents <- false
00:01:57 verbose #4310 > > watcher.Dispose ()
00:01:57 verbose #4311 > > )
00:01:57 verbose #4312 > >
00:01:57 verbose #4313 > > stream, disposable
00:01:57 verbose #4314 > >
00:01:57 verbose #4315 > > let inline watchDirectory path =
00:01:57 verbose #4316 > > watchDirectoryWithFilter
00:01:57 verbose #4317 > > (System.IO.NotifyFilters.FileName
00:01:57 verbose #4318 > > // ||| System.IO.NotifyFilters.DirectoryName
00:01:57 verbose #4319 > > // ||| System.IO.NotifyFilters.Attributes
00:01:57 verbose #4320 > > //// ||| System.IO.NotifyFilters.Size
00:01:57 verbose #4321 > > ||| System.IO.NotifyFilters.LastWrite
00:01:57 verbose #4322 > > //// ||| System.IO.NotifyFilters.LastAccess
00:01:57 verbose #4323 > > // ||| System.IO.NotifyFilters.CreationTime
00:01:57 verbose #4324 > > // ||| System.IO.NotifyFilters.Security
00:01:57 verbose #4325 > > )
00:01:57 verbose #4326 > > path
00:01:58 verbose #4327 > >
00:01:58 verbose #4328 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:58 verbose #4329 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:58 verbose #4330 > > │ ### testEventsRaw (test) │
00:01:58 verbose #4331 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:58 verbose #4332 > >
00:01:58 verbose #4333 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:58 verbose #4334 > > //// test
00:01:58 verbose #4335 > >
00:01:58 verbose #4336 > > let inline testEventsRaw
00:01:58 verbose #4337 > > (watchFn : (_ -> bool) -> string -> FSharp.Control.AsyncSeq<int64 *
00:01:58 verbose #4338 > > FileSystemChange> * IDisposable)
00:01:58 verbose #4339 > > write
00:01:58 verbose #4340 > > =
00:01:58 verbose #4341 > > let struct (tempDir, tempDisposable) =
00:01:58 verbose #4342 > > SpiralFileSystem.create_temp_directory ()
00:01:58 verbose #4343 > > let stream, disposable = watchFn (fun _ -> true) tempDir
00:01:58 verbose #4344 > >
00:01:58 verbose #4345 > > let events = System.Collections.Concurrent.ConcurrentBag ()
00:01:58 verbose #4346 > >
00:01:58 verbose #4347 > > let inline iter () =
00:01:58 verbose #4348 > > stream
00:01:58 verbose #4349 > > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async {
00:01:58 verbose #4350 > > events.Add event })
00:01:58 verbose #4351 > >
00:01:58 verbose #4352 > > let run = async {
00:01:58 verbose #4353 > > let! _ = iter () |> Async.StartChild
00:01:58 verbose #4354 > > do! Async.Sleep 250
00:01:58 verbose #4355 > > return! write tempDir
00:01:58 verbose #4356 > > }
00:01:58 verbose #4357 > >
00:01:58 verbose #4358 > > try
00:01:58 verbose #4359 > > run
00:01:58 verbose #4360 > > |> Async.runWithTimeout 60000
00:01:58 verbose #4361 > > |> _assertEqual (Some ())
00:01:58 verbose #4362 > > finally
00:01:58 verbose #4363 > > disposable.Dispose ()
00:01:58 verbose #4364 > > tempDisposable.Dispose ()
00:01:58 verbose #4365 > >
00:01:58 verbose #4366 > > let eventsLog =
00:01:58 verbose #4367 > > events
00:01:58 verbose #4368 > > |> Seq.toList
00:01:58 verbose #4369 > > |> List.sortBy fst
00:01:58 verbose #4370 > > |> List.fold
00:01:58 verbose #4371 > > (fun (prev, acc) (ticks, event) ->
00:01:58 verbose #4372 > > ticks, (ticks, (if prev = 0L then 0L else ticks - prev), event)
00:01:58 verbose #4373 > > :: acc
00:01:58 verbose #4374 > > )
00:01:58 verbose #4375 > > (0L, [[]])
00:01:58 verbose #4376 > > |> snd
00:01:58 verbose #4377 > > |> List.rev
00:01:58 verbose #4378 > > |> List.map (fun (diff, n, event) -> $"{n} / {diff} / {event}" |>
00:01:58 verbose #4379 > > SpiralSm.ellipsis_end 100L)
00:01:58 verbose #4380 > > |> SpiralSm.concat "\n"
00:01:58 verbose #4381 > > let _locals () = $"eventsLog: \n{eventsLog} / {_locals ()}"
00:01:58 verbose #4382 > > trace Debug (fun () -> "testEventsRaw") _locals
00:01:58 verbose #4383 > >
00:01:58 verbose #4384 > > events
00:01:58 verbose #4385 > > |> Seq.toList
00:01:58 verbose #4386 > > |> List.sortBy fst
00:01:58 verbose #4387 > > |> List.map snd
00:01:58 verbose #4388 > > |> List.fold
00:01:58 verbose #4389 > > (fun acc event ->
00:01:58 verbose #4390 > > match acc, event with
00:01:58 verbose #4391 > > | FileSystemChange.Changed (lastPath, Some lastContent) as lastEvent
00:01:58 verbose #4392 > > :: acc,
00:01:58 verbose #4393 > > FileSystemChange.Changed (path, Some content)
00:01:58 verbose #4394 > > when lastPath = path && content |> SpiralSm.starts_with
00:01:58 verbose #4395 > > lastContent
00:01:58 verbose #4396 > > ->
00:01:58 verbose #4397 > > event :: acc
00:01:58 verbose #4398 > > | _ -> event :: acc
00:01:58 verbose #4399 > > )
00:01:58 verbose #4400 > > [[]]
00:01:58 verbose #4401 > > |> List.rev
00:01:58 verbose #4402 > >
00:01:58 verbose #4403 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:58 verbose #4404 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:58 verbose #4405 > > │ #### fast (test) │
00:01:58 verbose #4406 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:58 verbose #4407 > >
00:01:58 verbose #4408 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:58 verbose #4409 > > //// test
00:01:58 verbose #4410 > >
00:01:58 verbose #4411 > > let inline write path = async {
00:01:58 verbose #4412 > > let n = 2
00:01:58 verbose #4413 > >
00:01:58 verbose #4414 > > for i = 1 to n do
00:01:58 verbose #4415 > > do! $"a{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:01:58 verbose #4416 > > $"file{i}.txt")
00:01:58 verbose #4417 > >
00:01:58 verbose #4418 > > do! Async.Sleep 250
00:01:58 verbose #4419 > >
00:01:58 verbose #4420 > > for i = 1 to n do
00:01:58 verbose #4421 > > do! $"b{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:01:58 verbose #4422 > > $"file{i}.txt")
00:01:58 verbose #4423 > >
00:01:58 verbose #4424 > > do! Async.Sleep 250
00:01:58 verbose #4425 > >
00:01:58 verbose #4426 > > for i = 1 to n do
00:01:58 verbose #4427 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:01:58 verbose #4428 > > </> $"file_{i}.txt") |> Async.Ignore
00:01:58 verbose #4429 > >
00:01:58 verbose #4430 > > do! Async.Sleep 250
00:01:58 verbose #4431 > >
00:01:58 verbose #4432 > > for i = 1 to n do
00:01:58 verbose #4433 > > do! $"c{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:01:58 verbose #4434 > > $"file_{i}.txt")
00:01:58 verbose #4435 > >
00:01:58 verbose #4436 > > do! Async.Sleep 250
00:01:58 verbose #4437 > >
00:01:58 verbose #4438 > > for i = 1 to n do
00:01:58 verbose #4439 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:01:58 verbose #4440 > > Async.Ignore
00:01:58 verbose #4441 > >
00:01:58 verbose #4442 > > do! Async.Sleep 250
00:01:58 verbose #4443 > > }
00:01:58 verbose #4444 > >
00:01:58 verbose #4445 > > let inline run () =
00:01:58 verbose #4446 > > let events = testEventsRaw watchDirectory write
00:01:58 verbose #4447 > >
00:01:58 verbose #4448 > > events
00:01:58 verbose #4449 > > |> _sequenceEqual [[
00:01:58 verbose #4450 > > FileSystemChange.Created ("file1.txt", Some "a1")
00:01:58 verbose #4451 > > FileSystemChange.Changed ("file1.txt", Some "a1")
00:01:58 verbose #4452 > > FileSystemChange.Created ("file2.txt", Some "a2")
00:01:58 verbose #4453 > > FileSystemChange.Changed ("file2.txt", Some "a2")
00:01:58 verbose #4454 > >
00:01:58 verbose #4455 > > FileSystemChange.Changed ("file1.txt", Some "b1")
00:01:58 verbose #4456 > > FileSystemChange.Changed ("file2.txt", Some "b2")
00:01:58 verbose #4457 > >
00:01:58 verbose #4458 > > FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "b1"))
00:01:58 verbose #4459 > > FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "b2"))
00:01:58 verbose #4460 > >
00:01:58 verbose #4461 > > FileSystemChange.Changed ("file_1.txt", Some "c1")
00:01:58 verbose #4462 > > FileSystemChange.Changed ("file_2.txt", Some "c2")
00:01:58 verbose #4463 > >
00:01:58 verbose #4464 > > FileSystemChange.Deleted "file_1.txt"
00:01:58 verbose #4465 > > FileSystemChange.Deleted "file_2.txt"
00:01:58 verbose #4466 > > ]]
00:01:58 verbose #4467 > >
00:01:58 verbose #4468 > > run
00:01:58 verbose #4469 > > |> retry_fn 3
00:01:58 verbose #4470 > > |> _assertEqual (Some ())
00:02:01 verbose #4471 > >
00:02:01 verbose #4472 > > ╭─[ 3.28s - stdout ]───────────────────────────────────────────────────────────╮
00:02:01 verbose #4473 > > │ Some () │
00:02:01 verbose #4474 > > │ │
00:02:01 verbose #4475 > > │ 00:00:05 debug #1 watchWithFilter / Disposing watch stream / filter: │
00:02:01 verbose #4476 > > │ FileName, LastWrite │
00:02:01 verbose #4477 > > │ 00:00:05 debug #2 testEventsRaw / eventsLog: │
00:02:01 verbose #4478 > > │ 0 / 638518526192191504 / Created ("file1.txt", Some "a1") │
00:02:01 verbose #4479 > > │ 1 / 638518526192191505 / Changed ("file1.txt", Some "a1") │
00:02:01 verbose #4480 > > │ 15943 / 638518526192207448 / Changed ("file1.txt", Some "a1") │
00:02:01 verbose #4481 > > │ 685 / 638518526192208133 / Created ("file2.txt", Some "a2") │
00:02:01 verbose #4482 > > │ 1 / 638518526192208134 / Changed ("file2.txt", Some "a2") │
00:02:01 verbose #4483 > > │ 45 / 638518526192208179 / Changed ("file2.txt", Some "a2") │
00:02:01 verbose #4484 > > │ 2482251 / 638518526194690430 / Changed ("file1.txt", Some "b1") │
00:02:01 verbose #4485 > > │ 2460 / 638518526194692890 / Changed ("file1.txt", Some "b1") │
00:02:01 verbose #4486 > > │ 10308 / 638518526194703198 / Changed ("file2.txt", Some "b2") │
00:02:01 verbose #4487 > > │ 2284 / 638518526194705482 / Changed ("file2.txt", Some "b2") │
00:02:01 verbose #4488 > > │ 2674487 / 638518526197379969 / Renamed ("file1.txt", ("file_1.txt", Some │
00:02:01 verbose #4489 > > │ "b1")) │
00:02:01 verbose #4490 > > │ 21367 / 638518526197401336 / Renamed ("file2.txt", ("file_2.txt", Some │
00:02:01 verbose #4491 > > │ "b2")) │
00:02:01 verbose #4492 > > │ 2514379 / 638518526199915715 / Changed ("file_1.txt", Some "c1") │
00:02:01 verbose #4493 > > │ 7467 / 638518526199923182 / Changed ("file_1.txt", Some "c1") │
00:02:01 verbose #4494 > > │ 26078 / 638518526199949260 / Changed ("file_2.txt", Some "c2") │
00:02:01 verbose #4495 > > │ 5801 / 638518526199955061 / Changed ("file_2.txt", Some "c2") │
00:02:01 verbose #4496 > > │ 2517538 / 638518526202472599 / Deleted "file_1.txt" │
00:02:01 verbose #4497 > > │ 13140 / 638518526202485739 / Deleted "file_2.txt" │
00:02:01 verbose #4498 > > │ [Created ("file1.txt", Some "a1"); Changed ("file1.txt", Some "a1"); Created │
00:02:01 verbose #4499 > > │ ("file2.txt", Some "a2"); │
00:02:01 verbose #4500 > > │ Changed ("file2.txt", Some "a2"); Changed ("file1.txt", Some "b1"); Changed │
00:02:01 verbose #4501 > > │ ("file2.txt", Some "b2"); │
00:02:01 verbose #4502 > > │ Renamed ("file1.txt", ("file_1.txt", Some "b1")); Renamed ("file2.txt", │
00:02:01 verbose #4503 > > │ ("file_2.txt", Some "b2")); │
00:02:01 verbose #4504 > > │ Changed ("file_1.txt", Some "c1"); Changed ("file_2.txt", Some "c2"); │
00:02:01 verbose #4505 > > │ Deleted "file_1.txt"; Deleted "file_2.txt"] │
00:02:01 verbose #4506 > > │ │
00:02:01 verbose #4507 > > │ Some () │
00:02:01 verbose #4508 > > │ │
00:02:01 verbose #4509 > > │ │
00:02:01 verbose #4510 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:01 verbose #4511 > >
00:02:01 verbose #4512 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:01 verbose #4513 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:01 verbose #4514 > > │ #### slow (test) │
00:02:01 verbose #4515 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:01 verbose #4516 > >
00:02:01 verbose #4517 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:01 verbose #4518 > > //// test
00:02:01 verbose #4519 > >
00:02:01 verbose #4520 > > let inline write path = async {
00:02:01 verbose #4521 > > let n = 2
00:02:01 verbose #4522 > >
00:02:01 verbose #4523 > > let contents =
00:02:01 verbose #4524 > > [[ 1 .. n ]]
00:02:01 verbose #4525 > > |> List.map (string >> String.replicate 1_000_000)
00:02:01 verbose #4526 > >
00:02:01 verbose #4527 > > for i = 1 to n do
00:02:01 verbose #4528 > > do! $"{contents.[[i - 1]]}a" |> SpiralFileSystem.write_all_text_async
00:02:01 verbose #4529 > > (path </> $"file{i}.txt")
00:02:01 verbose #4530 > >
00:02:01 verbose #4531 > > do! Async.Sleep 1500
00:02:01 verbose #4532 > >
00:02:01 verbose #4533 > > for i = 1 to n do
00:02:01 verbose #4534 > > do! $"{contents.[[i - 1]]}b" |> SpiralFileSystem.write_all_text_async
00:02:01 verbose #4535 > > (path </> $"file{i}.txt")
00:02:01 verbose #4536 > >
00:02:01 verbose #4537 > > do! Async.Sleep 1500
00:02:01 verbose #4538 > >
00:02:01 verbose #4539 > > for i = 1 to n do
00:02:01 verbose #4540 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:02:01 verbose #4541 > > </> $"file_{i}.txt") |> Async.Ignore
00:02:01 verbose #4542 > >
00:02:01 verbose #4543 > > do! Async.Sleep 1500
00:02:01 verbose #4544 > >
00:02:01 verbose #4545 > > for i = 1 to n do
00:02:01 verbose #4546 > > do! $"{contents.[[i - 1]]}c" |> SpiralFileSystem.write_all_text_async
00:02:01 verbose #4547 > > (path </> $"file_{i}.txt")
00:02:01 verbose #4548 > >
00:02:01 verbose #4549 > > do! Async.Sleep 1500
00:02:01 verbose #4550 > >
00:02:01 verbose #4551 > > for i = 1 to n do
00:02:01 verbose #4552 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:02:01 verbose #4553 > > Async.Ignore
00:02:01 verbose #4554 > >
00:02:01 verbose #4555 > > do! Async.Sleep 1500
00:02:01 verbose #4556 > > }
00:02:01 verbose #4557 > >
00:02:01 verbose #4558 > > let inline run () =
00:02:01 verbose #4559 > > let events =
00:02:01 verbose #4560 > > testEventsRaw watchDirectory write
00:02:01 verbose #4561 > > |> List.map (function
00:02:01 verbose #4562 > > | FileSystemChange.Changed (path, Some content) ->
00:02:01 verbose #4563 > > FileSystemChange.Changed (path, content |> Seq.distinct |>
00:02:01 verbose #4564 > > Seq.map string |> SpiralSm.concat "" |> Some)
00:02:01 verbose #4565 > > | FileSystemChange.Created (path, Some content) ->
00:02:01 verbose #4566 > > FileSystemChange.Created (path, content |> Seq.distinct |>
00:02:01 verbose #4567 > > Seq.map string |> SpiralSm.concat "" |> Some)
00:02:01 verbose #4568 > > | FileSystemChange.Renamed (oldPath, (newPath, Some content)) ->
00:02:01 verbose #4569 > > FileSystemChange.Renamed (
00:02:01 verbose #4570 > > oldPath,
00:02:01 verbose #4571 > > (newPath, content |> Seq.distinct |> Seq.map string |>
00:02:01 verbose #4572 > > SpiralSm.concat "" |> Some)
00:02:01 verbose #4573 > > )
00:02:01 verbose #4574 > > | event -> event
00:02:01 verbose #4575 > > )
00:02:01 verbose #4576 > >
00:02:01 verbose #4577 > > events
00:02:01 verbose #4578 > > |> _sequenceEqual [[
00:02:01 verbose #4579 > > FileSystemChange.Created ("file1.txt", Some "1a")
00:02:01 verbose #4580 > > FileSystemChange.Changed ("file1.txt", Some "1a")
00:02:01 verbose #4581 > > FileSystemChange.Created ("file2.txt", Some "2a")
00:02:01 verbose #4582 > > FileSystemChange.Changed ("file2.txt", Some "2a")
00:02:01 verbose #4583 > >
00:02:01 verbose #4584 > > FileSystemChange.Changed ("file1.txt", Some "1b")
00:02:01 verbose #4585 > > FileSystemChange.Changed ("file2.txt", Some "2b")
00:02:01 verbose #4586 > >
00:02:01 verbose #4587 > > FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "1b"))
00:02:01 verbose #4588 > > FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "2b"))
00:02:01 verbose #4589 > >
00:02:01 verbose #4590 > > FileSystemChange.Changed ("file_1.txt", Some "1c")
00:02:01 verbose #4591 > > FileSystemChange.Changed ("file_2.txt", Some "2c")
00:02:01 verbose #4592 > >
00:02:01 verbose #4593 > > FileSystemChange.Deleted "file_1.txt"
00:02:01 verbose #4594 > > FileSystemChange.Deleted "file_2.txt"
00:02:01 verbose #4595 > > ]]
00:02:01 verbose #4596 > >
00:02:01 verbose #4597 > > run
00:02:01 verbose #4598 > > |> retry_fn 5
00:02:01 verbose #4599 > > |> _assertEqual (Some ())
00:02:11 verbose #4600 > >
00:02:11 verbose #4601 > > ╭─[ 10.18s - stdout ]──────────────────────────────────────────────────────────╮
00:02:11 verbose #4602 > > │ Some () │
00:02:11 verbose #4603 > > │ │
00:02:11 verbose #4604 > > │ 00:00:15 debug #3 watchWithFilter / Disposing watch stream / filter: │
00:02:11 verbose #4605 > > │ FileName, LastWrite │
00:02:11 verbose #4606 > > │ 00:00:15 debug #4 testEventsRaw / eventsLog: │
00:02:11 verbose #4607 > > │ 0 / 638518526226431669 / Created │
00:02:11 verbose #4608 > > │ ("file1.txt", │
00:02:11 verbose #4609 > > │ ...11111111111111111111111111111111111111111111111a") │
00:02:11 verbose #4610 > > │ 1 / 638518526226431670 / Changed │
00:02:11 verbose #4611 > > │ ("file1.txt", │
00:02:11 verbose #4612 > > │ ...11111111111111111111111111111111111111111111111a") │
00:02:11 verbose #4613 > > │ 90192 / 638518526226521862 / Changed │
00:02:11 verbose #4614 > > │ ("file1.txt...11111111111111111111111111111111111111111111111a") │
00:02:11 verbose #4615 > > │ 32953 / 638518526226554815 / Created │
00:02:11 verbose #4616 > > │ ("file2.txt...22222222222222222222222222222222222222222222222a") │
00:02:11 verbose #4617 > > │ 1 / 638518526226554816 / Changed │
00:02:11 verbose #4618 > > │ ("file2.txt", │
00:02:11 verbose #4619 > > │ ...22222222222222222222222222222222222222222222222a") │
00:02:11 verbose #4620 > > │ 64053 / 638518526226618869 / Changed │
00:02:11 verbose #4621 > > │ ("file2.txt...22222222222222222222222222222222222222222222222a") │
00:02:11 verbose #4622 > > │ 15067994 / 638518526241686863 / Changed │
00:02:11 verbose #4623 > > │ ("file1....11111111111111111111111111111111111111111111111b") │
00:02:11 verbose #4624 > > │ 71924 / 638518526241758787 / Changed │
00:02:11 verbose #4625 > > │ ("file1.txt...11111111111111111111111111111111111111111111111b") │
00:02:11 verbose #4626 > > │ 41220 / 638518526241800007 / Changed │
00:02:11 verbose #4627 > > │ ("file2.txt...22222222222222222222222222222222222222222222222b") │
00:02:11 verbose #4628 > > │ 90875 / 638518526241890882 / Changed │
00:02:11 verbose #4629 > > │ ("file2.txt...22222222222222222222222222222222222222222222222b") │
00:02:11 verbose #4630 > > │ 15018151 / 638518526256909033 / Renamed │
00:02:11 verbose #4631 > > │ ("file1....1111111111111111111111111111111111111111111111b")) │
00:02:11 verbose #4632 > > │ 5012 / 638518526256914045 / Renamed │
00:02:11 verbose #4633 > > │ ("file2.txt"...2222222222222222222222222222222222222222222222b")) │
00:02:11 verbose #4634 > > │ 15114777 / 638518526272028822 / Changed │
00:02:11 verbose #4635 > > │ ("file_1...11111111111111111111111111111111111111111111111c") │
00:02:11 verbose #4636 > > │ 141165 / 638518526272169987 / Changed │
00:02:11 verbose #4637 > > │ ("file_1.t...11111111111111111111111111111111111111111111111c") │
00:02:11 verbose #4638 > > │ 101242 / 638518526272271229 / Changed │
00:02:11 verbose #4639 > > │ ("file_2.t...22222222222222222222222222222222222222222222222c") │
00:02:11 verbose #4640 > > │ 98064 / 638518526272369293 / Changed │
00:02:11 verbose #4641 > > │ ("file_2.tx...22222222222222222222222222222222222222222222222c") │
00:02:11 verbose #4642 > > │ 15168535 / 638518526287537828 / Deleted "file_1.txt" │
00:02:11 verbose #4643 > > │ 11582 / 638518526287549410 / Deleted "file_2.txt" │
00:02:11 verbose #4644 > > │ [Created ("file1.txt", Some "1a"); Changed ("file1.txt", Some "1a"); Created │
00:02:11 verbose #4645 > > │ ("file2.txt", Some "2a"); │
00:02:11 verbose #4646 > > │ Changed ("file2.txt", Some "2a"); Changed ("file1.txt", Some "1b"); Changed │
00:02:11 verbose #4647 > > │ ("file2.txt", Some "2b"); │
00:02:11 verbose #4648 > > │ Renamed ("file1.txt", ("file_1.txt", Some "1b")); Renamed ("file2.txt", │
00:02:11 verbose #4649 > > │ ("file_2.txt", Some "2b")); │
00:02:11 verbose #4650 > > │ Changed ("file_1.txt", Some "1c"); Changed ("file_2.txt", Some "2c"); │
00:02:11 verbose #4651 > > │ Deleted "file_1.txt"; Deleted "file_2.txt"] │
00:02:11 verbose #4652 > > │ │
00:02:11 verbose #4653 > > │ Some () │
00:02:11 verbose #4654 > > │ │
00:02:11 verbose #4655 > > │ │
00:02:11 verbose #4656 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:11 verbose #4657 > >
00:02:11 verbose #4658 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:11 verbose #4659 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:11 verbose #4660 > > │ ### testEventsSorted (test) │
00:02:11 verbose #4661 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:11 verbose #4662 > >
00:02:11 verbose #4663 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:11 verbose #4664 > > //// test
00:02:11 verbose #4665 > >
00:02:11 verbose #4666 > > let inline sortEvent event =
00:02:11 verbose #4667 > > match event with
00:02:11 verbose #4668 > > | FileSystemChange.Failure _ -> 0
00:02:11 verbose #4669 > > | FileSystemChange.Created _ -> 1
00:02:11 verbose #4670 > > | FileSystemChange.Changed _ -> 2
00:02:11 verbose #4671 > > | FileSystemChange.Renamed (_oldPath, _) -> 3
00:02:11 verbose #4672 > > | FileSystemChange.Deleted _ -> 4
00:02:11 verbose #4673 > >
00:02:11 verbose #4674 > > let inline formatEvents events =
00:02:11 verbose #4675 > > events
00:02:11 verbose #4676 > > |> Seq.toList
00:02:11 verbose #4677 > > |> List.sortBy (snd >> sortEvent)
00:02:11 verbose #4678 > > |> List.choose (fun (ticks, event) ->
00:02:11 verbose #4679 > > match event with
00:02:11 verbose #4680 > > | FileSystemChange.Failure _ ->
00:02:11 verbose #4681 > > None
00:02:11 verbose #4682 > > | FileSystemChange.Changed (path, _) ->
00:02:11 verbose #4683 > > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:11 verbose #4684 > > FileSystemChangeType.Changed)
00:02:11 verbose #4685 > > | FileSystemChange.Created (path, _) ->
00:02:11 verbose #4686 > > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:11 verbose #4687 > > FileSystemChangeType.Created)
00:02:11 verbose #4688 > > | FileSystemChange.Deleted path ->
00:02:11 verbose #4689 > > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:11 verbose #4690 > > FileSystemChangeType.Deleted)
00:02:11 verbose #4691 > > | FileSystemChange.Renamed (_oldPath, (path, _)) ->
00:02:11 verbose #4692 > > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:11 verbose #4693 > > FileSystemChangeType.Renamed)
00:02:11 verbose #4694 > > )
00:02:11 verbose #4695 > > |> List.sortBy (fun (_, path, _) -> path)
00:02:11 verbose #4696 > > |> List.distinctBy (fun (_, path, event) -> path, event)
00:02:11 verbose #4697 > >
00:02:11 verbose #4698 > > let inline testEventsSorted
00:02:11 verbose #4699 > > (watchFn : string -> FSharp.Control.AsyncSeq<int64 * FileSystemChange> *
00:02:11 verbose #4700 > > IDisposable)
00:02:11 verbose #4701 > > write
00:02:11 verbose #4702 > > =
00:02:11 verbose #4703 > > let struct (tempDir, tempDisposable) =
00:02:11 verbose #4704 > > SpiralFileSystem.create_temp_directory ()
00:02:11 verbose #4705 > > let stream, disposable = watchFn tempDir
00:02:11 verbose #4706 > >
00:02:11 verbose #4707 > > let events = System.Collections.Concurrent.ConcurrentBag ()
00:02:11 verbose #4708 > >
00:02:11 verbose #4709 > > let inline iter () =
00:02:11 verbose #4710 > > stream
00:02:11 verbose #4711 > > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async {
00:02:11 verbose #4712 > > events.Add event })
00:02:11 verbose #4713 > >
00:02:11 verbose #4714 > > let run = async {
00:02:11 verbose #4715 > > let! _ = iter () |> Async.StartChild
00:02:11 verbose #4716 > > do! Async.Sleep 250
00:02:11 verbose #4717 > > return! write tempDir
00:02:11 verbose #4718 > > }
00:02:11 verbose #4719 > >
00:02:11 verbose #4720 > > try
00:02:11 verbose #4721 > > run
00:02:11 verbose #4722 > > |> Async.runWithTimeout 5000
00:02:11 verbose #4723 > > |> _assertEqual (Some ())
00:02:11 verbose #4724 > > finally
00:02:11 verbose #4725 > > disposable.Dispose ()
00:02:11 verbose #4726 > > tempDisposable.Dispose ()
00:02:11 verbose #4727 > >
00:02:11 verbose #4728 > > let events = formatEvents events
00:02:11 verbose #4729 > >
00:02:11 verbose #4730 > > let eventMap =
00:02:11 verbose #4731 > > events
00:02:11 verbose #4732 > > |> List.map (fun (ticks, path, event) -> path, (event, ticks))
00:02:11 verbose #4733 > > |> List.groupBy fst
00:02:11 verbose #4734 > > |> List.map (fun (path, events) ->
00:02:11 verbose #4735 > > let event, _ticks =
00:02:11 verbose #4736 > > events
00:02:11 verbose #4737 > > |> List.map snd
00:02:11 verbose #4738 > > |> List.sortByDescending snd
00:02:11 verbose #4739 > > |> List.head
00:02:11 verbose #4740 > >
00:02:11 verbose #4741 > > path, event
00:02:11 verbose #4742 > > )
00:02:11 verbose #4743 > > |> Map.ofList
00:02:11 verbose #4744 > >
00:02:11 verbose #4745 > > let eventList =
00:02:11 verbose #4746 > > events
00:02:11 verbose #4747 > > |> List.map (fun (_ticks, path, event) -> path, event)
00:02:11 verbose #4748 > >
00:02:11 verbose #4749 > > eventMap, eventList
00:02:12 verbose #4750 > >
00:02:12 verbose #4751 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:12 verbose #4752 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:12 verbose #4753 > > │ #### create and delete (test) │
00:02:12 verbose #4754 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:12 verbose #4755 > >
00:02:12 verbose #4756 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:12 verbose #4757 > > //// test
00:02:12 verbose #4758 > >
00:02:12 verbose #4759 > > let inline write path = async {
00:02:12 verbose #4760 > > let n = 3
00:02:12 verbose #4761 > >
00:02:12 verbose #4762 > > for i = 1 to n do
00:02:12 verbose #4763 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:12 verbose #4764 > > $"file{i}.txt")
00:02:12 verbose #4765 > >
00:02:12 verbose #4766 > > for i = 1 to n do
00:02:12 verbose #4767 > > do! SpiralFileSystem.delete_file_async (path </> $"file{i}.txt") |>
00:02:12 verbose #4768 > > Async.Ignore
00:02:12 verbose #4769 > >
00:02:12 verbose #4770 > > do! Async.Sleep 150
00:02:12 verbose #4771 > > }
00:02:12 verbose #4772 > >
00:02:12 verbose #4773 > > let inline run () =
00:02:12 verbose #4774 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:12 verbose #4775 > > write
00:02:12 verbose #4776 > >
00:02:12 verbose #4777 > > [[
00:02:12 verbose #4778 > > "file1.txt", nameof FileSystemChangeType.Created
00:02:12 verbose #4779 > > "file1.txt", nameof FileSystemChangeType.Changed
00:02:12 verbose #4780 > > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:12 verbose #4781 > >
00:02:12 verbose #4782 > > "file2.txt", nameof FileSystemChangeType.Created
00:02:12 verbose #4783 > > "file2.txt", nameof FileSystemChangeType.Changed
00:02:12 verbose #4784 > > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:12 verbose #4785 > >
00:02:12 verbose #4786 > > "file3.txt", nameof FileSystemChangeType.Created
00:02:12 verbose #4787 > > "file3.txt", nameof FileSystemChangeType.Changed
00:02:12 verbose #4788 > > "file3.txt", nameof FileSystemChangeType.Deleted
00:02:12 verbose #4789 > > ]]
00:02:12 verbose #4790 > > |> _sequenceEqual eventList
00:02:12 verbose #4791 > >
00:02:12 verbose #4792 > > [[
00:02:12 verbose #4793 > > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:12 verbose #4794 > > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:12 verbose #4795 > > "file3.txt", nameof FileSystemChangeType.Deleted
00:02:12 verbose #4796 > > ]]
00:02:12 verbose #4797 > > |> Map.ofList
00:02:12 verbose #4798 > > |> _sequenceEqual eventMap
00:02:12 verbose #4799 > >
00:02:12 verbose #4800 > > run
00:02:12 verbose #4801 > > |> retry_fn 3
00:02:12 verbose #4802 > > |> _assertEqual (Some ())
00:02:13 verbose #4803 > >
00:02:13 verbose #4804 > > ╭─[ 1.57s - stdout ]───────────────────────────────────────────────────────────╮
00:02:13 verbose #4805 > > │ Some () │
00:02:13 verbose #4806 > > │ │
00:02:13 verbose #4807 > > │ 00:00:17 debug #5 watchWithFilter / Disposing watch stream / filter: │
00:02:13 verbose #4808 > > │ FileName, LastWrite │
00:02:13 verbose #4809 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file1.txt", │
00:02:13 verbose #4810 > > │ "Deleted"); ("file2.txt", "Created"); │
00:02:13 verbose #4811 > > │ ("file2.txt", "Changed"); ("file2.txt", "Deleted"); ("file3.txt", │
00:02:13 verbose #4812 > > │ "Created"); ("file3.txt", "Changed"); │
00:02:13 verbose #4813 > > │ ("file3.txt", "Deleted")] │
00:02:13 verbose #4814 > > │ │
00:02:13 verbose #4815 > > │ map [("file1.txt", "Deleted"); ("file2.txt", "Deleted"); ("file3.txt", │
00:02:13 verbose #4816 > > │ "Deleted")] │
00:02:13 verbose #4817 > > │ │
00:02:13 verbose #4818 > > │ Some () │
00:02:13 verbose #4819 > > │ │
00:02:13 verbose #4820 > > │ │
00:02:13 verbose #4821 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:13 verbose #4822 > >
00:02:13 verbose #4823 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:13 verbose #4824 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:13 verbose #4825 > > │ #### change (test) │
00:02:13 verbose #4826 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:13 verbose #4827 > >
00:02:13 verbose #4828 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:13 verbose #4829 > > //// test
00:02:13 verbose #4830 > >
00:02:13 verbose #4831 > > let inline write path = async {
00:02:13 verbose #4832 > > let n = 2
00:02:13 verbose #4833 > >
00:02:13 verbose #4834 > > for i = 1 to n do
00:02:13 verbose #4835 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:13 verbose #4836 > > $"file{i}.txt")
00:02:13 verbose #4837 > >
00:02:13 verbose #4838 > > for i = 1 to n do
00:02:13 verbose #4839 > > do! "" |> SpiralFileSystem.write_all_text_async (path </>
00:02:13 verbose #4840 > > $"file{i}.txt")
00:02:13 verbose #4841 > >
00:02:13 verbose #4842 > > for i = 1 to n do
00:02:13 verbose #4843 > > do! SpiralFileSystem.delete_file_async (path </> $"file{i}.txt") |>
00:02:13 verbose #4844 > > Async.Ignore
00:02:13 verbose #4845 > >
00:02:13 verbose #4846 > > do! Async.Sleep 150
00:02:13 verbose #4847 > > }
00:02:13 verbose #4848 > >
00:02:13 verbose #4849 > > let inline run () =
00:02:13 verbose #4850 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:13 verbose #4851 > > write
00:02:13 verbose #4852 > >
00:02:13 verbose #4853 > > [[
00:02:13 verbose #4854 > > "file1.txt", nameof FileSystemChangeType.Created
00:02:13 verbose #4855 > > "file1.txt", nameof FileSystemChangeType.Changed
00:02:13 verbose #4856 > > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:13 verbose #4857 > >
00:02:13 verbose #4858 > > "file2.txt", nameof FileSystemChangeType.Created
00:02:13 verbose #4859 > > "file2.txt", nameof FileSystemChangeType.Changed
00:02:13 verbose #4860 > > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:13 verbose #4861 > > ]]
00:02:13 verbose #4862 > > |> _sequenceEqual eventList
00:02:13 verbose #4863 > >
00:02:13 verbose #4864 > > [[
00:02:13 verbose #4865 > > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:13 verbose #4866 > > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:13 verbose #4867 > > ]]
00:02:13 verbose #4868 > > |> Map.ofList
00:02:13 verbose #4869 > > |> _sequenceEqual eventMap
00:02:13 verbose #4870 > >
00:02:13 verbose #4871 > > run
00:02:13 verbose #4872 > > |> retry_fn 3
00:02:13 verbose #4873 > > |> _assertEqual (Some ())
00:02:15 verbose #4874 > >
00:02:15 verbose #4875 > > ╭─[ 1.72s - stdout ]───────────────────────────────────────────────────────────╮
00:02:15 verbose #4876 > > │ Some () │
00:02:15 verbose #4877 > > │ │
00:02:15 verbose #4878 > > │ 00:00:19 debug #6 watchWithFilter / Disposing watch stream / filter: │
00:02:15 verbose #4879 > > │ FileName, LastWrite │
00:02:15 verbose #4880 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file1.txt", │
00:02:15 verbose #4881 > > │ "Deleted"); ("file2.txt", "Created"); │
00:02:15 verbose #4882 > > │ ("file2.txt", "Changed"); ("file2.txt", "Deleted")] │
00:02:15 verbose #4883 > > │ │
00:02:15 verbose #4884 > > │ map [("file1.txt", "Deleted"); ("file2.txt", "Deleted")] │
00:02:15 verbose #4885 > > │ │
00:02:15 verbose #4886 > > │ Some () │
00:02:15 verbose #4887 > > │ │
00:02:15 verbose #4888 > > │ │
00:02:15 verbose #4889 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:15 verbose #4890 > >
00:02:15 verbose #4891 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:15 verbose #4892 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:15 verbose #4893 > > │ #### rename (test) │
00:02:15 verbose #4894 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:15 verbose #4895 > >
00:02:15 verbose #4896 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:15 verbose #4897 > > //// test
00:02:15 verbose #4898 > >
00:02:15 verbose #4899 > > let inline write path = async {
00:02:15 verbose #4900 > > let n = 2
00:02:15 verbose #4901 > >
00:02:15 verbose #4902 > > for i = 1 to n do
00:02:15 verbose #4903 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:15 verbose #4904 > > $"file{i}.txt")
00:02:15 verbose #4905 > >
00:02:15 verbose #4906 > > for i = 1 to n do
00:02:15 verbose #4907 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:02:15 verbose #4908 > > </> $"file_{i}.txt") |> Async.Ignore
00:02:15 verbose #4909 > >
00:02:15 verbose #4910 > > for i = 1 to n do
00:02:15 verbose #4911 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:02:15 verbose #4912 > > Async.Ignore
00:02:15 verbose #4913 > >
00:02:15 verbose #4914 > > do! Async.Sleep 150
00:02:15 verbose #4915 > > }
00:02:15 verbose #4916 > >
00:02:15 verbose #4917 > > let inline run () =
00:02:15 verbose #4918 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:15 verbose #4919 > > write
00:02:15 verbose #4920 > >
00:02:15 verbose #4921 > > [[
00:02:15 verbose #4922 > > "file1.txt", nameof FileSystemChangeType.Created
00:02:15 verbose #4923 > > "file1.txt", nameof FileSystemChangeType.Changed
00:02:15 verbose #4924 > > "file2.txt", nameof FileSystemChangeType.Created
00:02:15 verbose #4925 > > "file2.txt", nameof FileSystemChangeType.Changed
00:02:15 verbose #4926 > >
00:02:15 verbose #4927 > > "file_1.txt", nameof FileSystemChangeType.Renamed
00:02:15 verbose #4928 > > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:15 verbose #4929 > >
00:02:15 verbose #4930 > > "file_2.txt", nameof FileSystemChangeType.Renamed
00:02:15 verbose #4931 > > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:15 verbose #4932 > > ]]
00:02:15 verbose #4933 > > |> _sequenceEqual eventList
00:02:15 verbose #4934 > >
00:02:15 verbose #4935 > > [[
00:02:15 verbose #4936 > > "file1.txt", nameof FileSystemChangeType.Changed
00:02:15 verbose #4937 > > "file2.txt", nameof FileSystemChangeType.Changed
00:02:15 verbose #4938 > > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:15 verbose #4939 > > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:15 verbose #4940 > > ]]
00:02:15 verbose #4941 > > |> Map.ofList
00:02:15 verbose #4942 > > |> _sequenceEqual eventMap
00:02:15 verbose #4943 > >
00:02:15 verbose #4944 > > run
00:02:15 verbose #4945 > > |> retry_fn 3
00:02:15 verbose #4946 > > |> _assertEqual (Some ())
00:02:17 verbose #4947 > >
00:02:17 verbose #4948 > > ╭─[ 1.71s - stdout ]───────────────────────────────────────────────────────────╮
00:02:17 verbose #4949 > > │ Some () │
00:02:17 verbose #4950 > > │ │
00:02:17 verbose #4951 > > │ 00:00:21 debug #7 watchWithFilter / Disposing watch stream / filter: │
00:02:17 verbose #4952 > > │ FileName, LastWrite │
00:02:17 verbose #4953 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file2.txt", │
00:02:17 verbose #4954 > > │ "Created"); ("file2.txt", "Changed"); │
00:02:17 verbose #4955 > > │ ("file_1.txt", "Renamed"); ("file_1.txt", "Deleted"); ("file_2.txt", │
00:02:17 verbose #4956 > > │ "Renamed"); ("file_2.txt", "Deleted")] │
00:02:17 verbose #4957 > > │ │
00:02:17 verbose #4958 > > │ map [("file1.txt", "Changed"); ("file2.txt", "Changed"); ("file_1.txt", │
00:02:17 verbose #4959 > > │ "Deleted"); ("file_2.txt", "Deleted")] │
00:02:17 verbose #4960 > > │ │
00:02:17 verbose #4961 > > │ Some () │
00:02:17 verbose #4962 > > │ │
00:02:17 verbose #4963 > > │ │
00:02:17 verbose #4964 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #4965 > >
00:02:17 verbose #4966 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #4967 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #4968 > > │ #### full (test) │
00:02:17 verbose #4969 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #4970 > >
00:02:17 verbose #4971 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #4972 > > //// test
00:02:17 verbose #4973 > >
00:02:17 verbose #4974 > > let inline write path = async {
00:02:17 verbose #4975 > > let n = 2
00:02:17 verbose #4976 > >
00:02:17 verbose #4977 > > for i = 1 to n do
00:02:17 verbose #4978 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:17 verbose #4979 > > $"file{i}.txt")
00:02:17 verbose #4980 > >
00:02:17 verbose #4981 > > for i = 1 to n do
00:02:17 verbose #4982 > > do! "" |> SpiralFileSystem.write_all_text_async (path </>
00:02:17 verbose #4983 > > $"file{i}.txt")
00:02:17 verbose #4984 > >
00:02:17 verbose #4985 > > for i = 1 to n do
00:02:17 verbose #4986 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:02:17 verbose #4987 > > </> $"file_{i}.txt") |> Async.Ignore
00:02:17 verbose #4988 > >
00:02:17 verbose #4989 > > for i = 1 to n do
00:02:17 verbose #4990 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:17 verbose #4991 > > $"file_{i}.txt")
00:02:17 verbose #4992 > >
00:02:17 verbose #4993 > > for i = 1 to n do
00:02:17 verbose #4994 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:02:17 verbose #4995 > > Async.Ignore
00:02:17 verbose #4996 > >
00:02:17 verbose #4997 > > do! Async.Sleep 150
00:02:17 verbose #4998 > > }
00:02:17 verbose #4999 > >
00:02:17 verbose #5000 > > let inline run () =
00:02:17 verbose #5001 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:17 verbose #5002 > > write
00:02:17 verbose #5003 > >
00:02:17 verbose #5004 > > [[
00:02:17 verbose #5005 > > "file1.txt", nameof FileSystemChangeType.Created
00:02:17 verbose #5006 > > "file1.txt", nameof FileSystemChangeType.Changed
00:02:17 verbose #5007 > > "file2.txt", nameof FileSystemChangeType.Created
00:02:17 verbose #5008 > > "file2.txt", nameof FileSystemChangeType.Changed
00:02:17 verbose #5009 > >
00:02:17 verbose #5010 > > "file_1.txt", nameof FileSystemChangeType.Changed
00:02:17 verbose #5011 > > "file_1.txt", nameof FileSystemChangeType.Renamed
00:02:17 verbose #5012 > > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:17 verbose #5013 > >
00:02:17 verbose #5014 > > "file_2.txt", nameof FileSystemChangeType.Changed
00:02:17 verbose #5015 > > "file_2.txt", nameof FileSystemChangeType.Renamed
00:02:17 verbose #5016 > > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:17 verbose #5017 > > ]]
00:02:17 verbose #5018 > > |> _sequenceEqual eventList
00:02:17 verbose #5019 > >
00:02:17 verbose #5020 > > [[
00:02:17 verbose #5021 > > "file1.txt", nameof FileSystemChangeType.Changed
00:02:17 verbose #5022 > > "file2.txt", nameof FileSystemChangeType.Changed
00:02:17 verbose #5023 > > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:17 verbose #5024 > > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:17 verbose #5025 > > ]]
00:02:17 verbose #5026 > > |> Map.ofList
00:02:17 verbose #5027 > > |> _sequenceEqual eventMap
00:02:17 verbose #5028 > >
00:02:17 verbose #5029 > > run
00:02:17 verbose #5030 > > |> retry_fn 3
00:02:17 verbose #5031 > > |> _assertEqual (Some ())
00:02:19 verbose #5032 > >
00:02:19 verbose #5033 > > ╭─[ 2.11s - stdout ]───────────────────────────────────────────────────────────╮
00:02:19 verbose #5034 > > │ Some () │
00:02:19 verbose #5035 > > │ │
00:02:19 verbose #5036 > > │ 00:00:23 debug #8 watchWithFilter / Disposing watch stream / filter: │
00:02:19 verbose #5037 > > │ FileName, LastWrite │
00:02:19 verbose #5038 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file2.txt", │
00:02:19 verbose #5039 > > │ "Created"); ("file2.txt", "Changed"); │
00:02:19 verbose #5040 > > │ ("file_1.txt", "Changed"); ("file_1.txt", "Renamed"); ("file_1.txt", │
00:02:19 verbose #5041 > > │ "Deleted"); ("file_2.txt", "Changed"); │
00:02:19 verbose #5042 > > │ ("file_2.txt", "Renamed"); ("file_2.txt", "Deleted")] │
00:02:19 verbose #5043 > > │ │
00:02:19 verbose #5044 > > │ map [("file1.txt", "Changed"); ("file2.txt", "Changed"); ("file_1.txt", │
00:02:19 verbose #5045 > > │ "Deleted"); ("file_2.txt", "Deleted")] │
00:02:19 verbose #5046 > > │ │
00:02:19 verbose #5047 > > │ Some () │
00:02:19 verbose #5048 > > │ │
00:02:19 verbose #5049 > > │ │
00:02:19 verbose #5050 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:19 verbose #5051 > 00:00:39 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 59354
00:02:19 verbose #5052 > 00:00:39 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:21 verbose #5053 > 00:00:41 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb to html
00:02:21 verbose #5054 > 00:00:41 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:02:21 verbose #5055 > 00:00:41 verbose #7 ! validate(nb)
00:02:23 verbose #5056 > 00:00:43 verbose #8 ! [NbConvertApp] Writing 379641 bytes to c:\home\git\polyglot\lib\fsharp\FileSystem.dib.html
00:02:23 verbose #5057 > 00:00:43 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 651
00:02:23 verbose #5058 > 00:00:43 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 651
00:02:23 verbose #5059 > 00:00:43 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/FileSystem.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/FileSystem.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:24 verbose #5060 > 00:00:44 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:24 verbose #5061 > 00:00:44 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:24 verbose #5062 > 00:00:44 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 60064
00:02:24 debug #5063 execute_with_options_async / exit_code: 0 / output.Length: 65681
00:02:24 debug #7 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path FileSystem.dib --retries 3
00:02:24 debug #5064 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path Runtime.dib --retries 3",
[||], None, None, true, None)
00:02:24 verbose #5065 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Runtime.dib", "--retries", "3"])
00:02:24 verbose #5066 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/Runtime.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Runtime.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:02:26 verbose #5067 > >
00:02:26 verbose #5068 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:26 verbose #5069 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:26 verbose #5070 > > │ # Runtime (Polyglot) │
00:02:26 verbose #5071 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:26 verbose #5072 > >
00:02:26 verbose #5073 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:26 verbose #5074 > > #r
00:02:26 verbose #5075 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:02:26 verbose #5076 > > dard2.1/FSharp.Control.AsyncSeq.dll"
00:02:26 verbose #5077 > > #r
00:02:26 verbose #5078 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:02:26 verbose #5079 > > 0/System.Reactive.dll"
00:02:26 verbose #5080 > > #r
00:02:26 verbose #5081 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:02:26 verbose #5082 > > netstandard2.0/System.Reactive.Linq.dll"
00:02:26 verbose #5083 > > #r
00:02:26 verbose #5084 > > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:02:26 verbose #5085 > >
00:02:26 verbose #5086 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:26 verbose #5087 > > #r
00:02:26 verbose #5088 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:02:26 verbose #5089 > > spNetCore.Html.Abstractions.dll"
00:02:26 verbose #5090 > > #r
00:02:26 verbose #5091 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:26 verbose #5092 > > otNet.Interactive.dll"
00:02:26 verbose #5093 > > #r
00:02:26 verbose #5094 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:26 verbose #5095 > > otNet.Interactive.FSharp.dll"
00:02:26 verbose #5096 > > #r
00:02:26 verbose #5097 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:26 verbose #5098 > > otNet.Interactive.Formatting.dll"
00:02:26 verbose #5099 > > open System
00:02:26 verbose #5100 > > open System.IO
00:02:26 verbose #5101 > > open System.Text
00:02:26 verbose #5102 > > open Microsoft.DotNet.Interactive.Formatting
00:02:29 verbose #5103 > >
00:02:29 verbose #5104 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:29 verbose #5105 > > #r
00:02:29 verbose #5106 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:29 verbose #5107 > > otNet.Interactive.FSharp.dll"
00:02:29 verbose #5108 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:02:29 verbose #5109 > > #r
00:02:29 verbose #5110 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:29 verbose #5111 > > otNet.Interactive.dll"
00:02:29 verbose #5112 > > open type Microsoft.DotNet.Interactive.Kernel
00:02:30 verbose #5113 > >
00:02:30 verbose #5114 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:30 verbose #5115 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:02:30 verbose #5116 > >
00:02:30 verbose #5117 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:30 verbose #5118 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:02:30 verbose #5119 > > TextWriter)->fprintfn writer "%120A" x)
00:02:30 verbose #5120 > >
00:02:30 verbose #5121 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:30 verbose #5122 > > #!import ../../lib/fsharp/Notebooks.dib
00:02:30 verbose #5123 > > #!import ../../lib/fsharp/Testing.dib
00:02:30 verbose #5124 > >
00:02:30 verbose #5125 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:30 verbose #5126 > > //// test
00:02:30 verbose #5127 > >
00:02:30 verbose #5128 > > Formatter.ListExpansionLimit <- 100
00:02:31 verbose #5129 > >
00:02:31 verbose #5130 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:31 verbose #5131 > > #if FABLE_COMPILER
00:02:31 verbose #5132 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:02:31 verbose #5133 > > #endif
00:02:31 verbose #5134 > > type std_env_VarError = class end
00:02:31 verbose #5135 > > #if FABLE_COMPILER
00:02:31 verbose #5136 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:02:31 verbose #5137 > > #endif
00:02:31 verbose #5138 > > type core_any_Any = class end
00:02:31 verbose #5139 > > #if FABLE_COMPILER
00:02:31 verbose #5140 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:31 verbose #5141 > > #endif
00:02:31 verbose #5142 > > type core_ops_Try<'T> = class end
00:02:31 verbose #5143 > > #if FABLE_COMPILER
00:02:31 verbose #5144 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:31 verbose #5145 > > #endif
00:02:31 verbose #5146 > > type Func0<'T> = class end
00:02:31 verbose #5147 > > #if FABLE_COMPILER
00:02:31 verbose #5148 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:31 verbose #5149 > > #endif
00:02:31 verbose #5150 > > type Func0<'T, 'U> = class end
00:02:31 verbose #5151 > > #if FABLE_COMPILER
00:02:31 verbose #5152 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:31 verbose #5153 > > #endif
00:02:31 verbose #5154 > > type Box<'T> = class end
00:02:31 verbose #5155 > > #if FABLE_COMPILER
00:02:31 verbose #5156 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:31 verbose #5157 > > #endif
00:02:31 verbose #5158 > > type Dyn<'T> = class end
00:02:31 verbose #5159 > > #if FABLE_COMPILER
00:02:31 verbose #5160 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:02:31 verbose #5161 > > #endif
00:02:31 verbose #5162 > > type Send<'T> = class end
00:02:31 verbose #5163 > > #if FABLE_COMPILER
00:02:31 verbose #5164 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:31 verbose #5165 > > #endif
00:02:31 verbose #5166 > > type Fn<'T> = class end
00:02:31 verbose #5167 > > #if FABLE_COMPILER
00:02:31 verbose #5168 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:31 verbose #5169 > > #endif
00:02:31 verbose #5170 > > type FnUnit = class end
00:02:31 verbose #5171 > > #if FABLE_COMPILER
00:02:31 verbose #5172 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:31 verbose #5173 > > #endif
00:02:31 verbose #5174 > > type FnOnce<'T> = class end
00:02:31 verbose #5175 > > #if FABLE_COMPILER
00:02:31 verbose #5176 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:31 verbose #5177 > > #endif
00:02:31 verbose #5178 > > type ActionFn<'T> = class end
00:02:31 verbose #5179 > > #if FABLE_COMPILER
00:02:31 verbose #5180 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:02:31 verbose #5181 > > #endif
00:02:31 verbose #5182 > > type ActionFn2<'T, 'U> = class end
00:02:31 verbose #5183 > > #if FABLE_COMPILER
00:02:31 verbose #5184 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:02:31 verbose #5185 > > #endif
00:02:31 verbose #5186 > > type Impl<'T> = class end
00:02:31 verbose #5187 > > #if FABLE_COMPILER
00:02:31 verbose #5188 > > [[<Fable...
00:02:32 verbose #5189 > >
00:02:32 verbose #5190 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:32 verbose #5191 > > #if FABLE_COMPILER
00:02:32 verbose #5192 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:02:32 verbose #5193 > > #endif
00:02:32 verbose #5194 > > type core_any_Any = class end
00:02:32 verbose #5195 > > #if FABLE_COMPILER
00:02:32 verbose #5196 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:32 verbose #5197 > > #endif
00:02:32 verbose #5198 > > type core_ops_Try<'T> = class end
00:02:32 verbose #5199 > > #if FABLE_COMPILER
00:02:32 verbose #5200 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:32 verbose #5201 > > #endif
00:02:32 verbose #5202 > > type Func0<'T> = class end
00:02:32 verbose #5203 > > #if FABLE_COMPILER
00:02:32 verbose #5204 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:32 verbose #5205 > > #endif
00:02:32 verbose #5206 > > type Func0<'T, 'U> = class end
00:02:32 verbose #5207 > > #if FABLE_COMPILER
00:02:32 verbose #5208 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:32 verbose #5209 > > #endif
00:02:32 verbose #5210 > > type Box<'T> = class end
00:02:32 verbose #5211 > > #if FABLE_COMPILER
00:02:32 verbose #5212 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:32 verbose #5213 > > #endif
00:02:32 verbose #5214 > > type Dyn<'T> = class end
00:02:32 verbose #5215 > > #if FABLE_COMPILER
00:02:32 verbose #5216 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:02:32 verbose #5217 > > #endif
00:02:32 verbose #5218 > > type Send<'T> = class end
00:02:32 verbose #5219 > > #if FABLE_COMPILER
00:02:32 verbose #5220 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:32 verbose #5221 > > #endif
00:02:32 verbose #5222 > > type Fn<'T> = class end
00:02:32 verbose #5223 > > #if FABLE_COMPILER
00:02:32 verbose #5224 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:32 verbose #5225 > > #endif
00:02:32 verbose #5226 > > type FnUnit = class end
00:02:32 verbose #5227 > > #if FABLE_COMPILER
00:02:32 verbose #5228 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:32 verbose #5229 > > #endif
00:02:32 verbose #5230 > > type FnOnce<'T> = class end
00:02:32 verbose #5231 > > #if FABLE_COMPILER
00:02:32 verbose #5232 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:32 verbose #5233 > > #endif
00:02:32 verbose #5234 > > type ActionFn<'T> = class end
00:02:32 verbose #5235 > > #if FABLE_COMPILER
00:02:32 verbose #5236 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:02:32 verbose #5237 > > #endif
00:02:32 verbose #5238 > > type ActionFn2<'T, 'U> = class end
00:02:32 verbose #5239 > > #if FABLE_COMPILER
00:02:32 verbose #5240 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:02:32 verbose #5241 > > #endif
00:02:32 verbose #5242 > > type Impl<'T> = class end
00:02:32 verbose #5243 > > #if FABLE_COMPILER
00:02:32 verbose #5244 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:02:32 verbose #5245 > > #endif
00:02:32 verbose #5246 > > type Mut<'T> = class end
00:02:32 verbose #5247 > > #if FABLE_COMPILER
00:02:32 verbose #5248 > > [[<Fable.Core.Erase; Fable.Co...
00:02:33 verbose #5249 > >
00:02:33 verbose #5250 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:33 verbose #5251 > > #if FABLE_COMPILER
00:02:33 verbose #5252 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:02:33 verbose #5253 > > #endif
00:02:33 verbose #5254 > > type async_std_task_JoinHandle<'T> = class end
00:02:33 verbose #5255 > > #if FABLE_COMPILER
00:02:33 verbose #5256 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:02:33 verbose #5257 > > #endif
00:02:33 verbose #5258 > > type std_future_Future<'T> = class end
00:02:33 verbose #5259 > > #if FABLE_COMPILER
00:02:33 verbose #5260 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:02:33 verbose #5261 > > #endif
00:02:33 verbose #5262 > > type rayon_vec_IntoIter<'T> = class end
00:02:33 verbose #5263 > > #if FABLE_COMPILER
00:02:33 verbose #5264 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:02:33 verbose #5265 > > #endif
00:02:33 verbose #5266 > > type rayon_iter_Map<'T> = class end
00:02:33 verbose #5267 > > #if FABLE_COMPILER
00:02:33 verbose #5268 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:02:33 verbose #5269 > > #endif
00:02:33 verbose #5270 > > type futures_lite_stream_StreamExt = class end
00:02:33 verbose #5271 > > #if FABLE_COMPILER
00:02:33 verbose #5272 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:02:33 verbose #5273 > > #endif
00:02:33 verbose #5274 > > type futures_future_TryJoinAll<'T> = class end
00:02:33 verbose #5275 > > #if FABLE_COMPILER
00:02:33 verbose #5276 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:02:33 verbose #5277 > > #endif
00:02:33 verbose #5278 > > type futures_future_Fuse<'T> = class end
00:02:33 verbose #5279 > > #if FABLE_COMPILER
00:02:33 verbose #5280 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:02:33 verbose #5281 > > #endif
00:02:33 verbose #5282 > > type futures_future_JoinAll<'T> = class end
00:02:33 verbose #5283 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:02:33 verbose #5284 > > Async<System.Threading.CancellationToken> =
00:02:33 verbose #5285 > > let v1 : bool = true
00:02:33 verbose #5286 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:02:33 verbose #5287 > >
00:02:33 verbose #5288 > > #if FABLE_COMPILER || WASM || CONTRACT
00:02:33 verbose #5289 > >
00:02:33 verbose #5290 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:02:33 verbose #5291 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:02:33 verbose #5292 > > unbox<Async<System...
00:02:33 verbose #5293 > >
00:02:33 verbose #5294 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:33 verbose #5295 > > #if FABLE_COMPILER
00:02:33 verbose #5296 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:02:33 verbose #5297 > > #endif
00:02:33 verbose #5298 > > type std_thread_JoinHandle<'T> = class end
00:02:33 verbose #5299 > > #if FABLE_COMPILER
00:02:33 verbose #5300 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:02:33 verbose #5301 > > #endif
00:02:33 verbose #5302 > > type std_sync_Arc<'T> = class end
00:02:33 verbose #5303 > > #if FABLE_COMPILER
00:02:33 verbose #5304 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:02:33 verbose #5305 > > #endif
00:02:33 verbose #5306 > > type std_sync_Mutex<'T> = class end
00:02:33 verbose #5307 > > #if FABLE_COMPILER
00:02:33 verbose #5308 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:02:33 verbose #5309 > > #endif
00:02:33 verbose #5310 > > type std_sync_MutexGuard<'T> = class end
00:02:33 verbose #5311 > > #if FABLE_COMPILER
00:02:33 verbose #5312 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:02:33 verbose #5313 > > #endif
00:02:33 verbose #5314 > > type std_sync_PoisonError<'T> = class end
00:02:33 verbose #5315 > > #if FABLE_COMPILER
00:02:33 verbose #5316 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:02:33 verbose #5317 > > #endif
00:02:33 verbose #5318 > > type std_sync_mpsc_Receiver<'T> = class end
00:02:33 verbose #5319 > > #if FABLE_COMPILER
00:02:33 verbose #5320 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:02:33 verbose #5321 > > #endif
00:02:33 verbose #5322 > > type std_sync_mpsc_SendError<'T> = class end
00:02:33 verbose #5323 > > #if FABLE_COMPILER
00:02:33 verbose #5324 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:02:33 verbose #5325 > > #endif
00:02:33 verbose #5326 > > type std_sync_mpsc_Sender<'T> = class end
00:02:33 verbose #5327 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:02:33 verbose #5328 > > _.Dispose () = f ()
00:02:33 verbose #5329 > > type [[<Struct>]] US0 =
00:02:33 verbose #5330 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:02:33 verbose #5331 > > | US0_1
00:02:33 verbose #5332 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:02:33 verbose #5333 > > let v1 : bool = true
00:02:33 verbose #5334 > > let mutable _v1 : unit option = None
00:02:33 verbose #5335 > >
00:02:33 verbose #5336 > > #if FABLE_COMPILER || WASM || CONTRACT
00:02:33 verbose #5337 > >
00:02:33 verbose #5338 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:02:33 verbose #5339 > >
00:02:33 verbose #5340 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:33 verbose #5341 > > #if FABLE_COMPILER
00:02:33 verbose #5342 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:02:33 verbose #5343 > > #endif
00:02:33 verbose #5344 > > type reqwest_Error = class end
00:02:33 verbose #5345 > > #if FABLE_COMPILER
00:02:33 verbose #5346 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:02:33 verbose #5347 > > #endif
00:02:33 verbose #5348 > > type reqwest_RequestBuilder = class end
00:02:33 verbose #5349 > > #if FABLE_COMPILER
00:02:33 verbose #5350 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:02:33 verbose #5351 > > #endif
00:02:33 verbose #5352 > > type reqwest_Response = class end
00:02:33 verbose #5353 > > #if FABLE_COMPILER
00:02:33 verbose #5354 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:02:33 verbose #5355 > > #endif
00:02:33 verbose #5356 > > type std_env_VarError = class end
00:02:33 verbose #5357 > > #if FABLE_COMPILER
00:02:33 verbose #5358 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:02:33 verbose #5359 > > #endif
00:02:33 verbose #5360 > > type core_any_Any = class end
00:02:33 verbose #5361 > > #if FABLE_COMPILER
00:02:33 verbose #5362 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:33 verbose #5363 > > #endif
00:02:33 verbose #5364 > > type core_ops_Try<'T> = class end
00:02:33 verbose #5365 > > #if FABLE_COMPILER
00:02:33 verbose #5366 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:33 verbose #5367 > > #endif
00:02:33 verbose #5368 > > type Func0<'T> = class end
00:02:33 verbose #5369 > > #if FABLE_COMPILER
00:02:33 verbose #5370 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:33 verbose #5371 > > #endif
00:02:33 verbose #5372 > > type Func0<'T, 'U> = class end
00:02:33 verbose #5373 > > #if FABLE_COMPILER
00:02:33 verbose #5374 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:33 verbose #5375 > > #endif
00:02:33 verbose #5376 > > type Box<'T> = class end
00:02:33 verbose #5377 > > #if FABLE_COMPILER
00:02:33 verbose #5378 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:33 verbose #5379 > > #endif
00:02:33 verbose #5380 > > type Dyn<'T> = class end
00:02:33 verbose #5381 > > #if FABLE_COMPILER
00:02:33 verbose #5382 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:02:33 verbose #5383 > > #endif
00:02:33 verbose #5384 > > type Send<'T> = class end
00:02:33 verbose #5385 > > #if FABLE_COMPILER
00:02:33 verbose #5386 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:33 verbose #5387 > > #endif
00:02:33 verbose #5388 > > type Fn<'T> = class end
00:02:33 verbose #5389 > > #if FABLE_COMPILER
00:02:33 verbose #5390 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:33 verbose #5391 > > #endif
00:02:33 verbose #5392 > > type FnUnit = class end
00:02:33 verbose #5393 > > #if FABLE_COMPILER
00:02:33 verbose #5394 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:33 verbose #5395 > > #...
00:02:35 verbose #5396 > >
00:02:35 verbose #5397 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:35 verbose #5398 > > #if FABLE_COMPILER
00:02:35 verbose #5399 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:02:35 verbose #5400 > > #endif
00:02:35 verbose #5401 > > type clap_Arg = class end
00:02:35 verbose #5402 > > #if FABLE_COMPILER
00:02:35 verbose #5403 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:02:35 verbose #5404 > > #endif
00:02:35 verbose #5405 > > type clap_ArgAction = class end
00:02:35 verbose #5406 > > #if FABLE_COMPILER
00:02:35 verbose #5407 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:02:35 verbose #5408 > > #endif
00:02:35 verbose #5409 > > type clap_Command = class end
00:02:35 verbose #5410 > > #if FABLE_COMPILER
00:02:35 verbose #5411 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:02:35 verbose #5412 > > #endif
00:02:35 verbose #5413 > > type clap_ArgMatches = class end
00:02:35 verbose #5414 > > #if FABLE_COMPILER
00:02:35 verbose #5415 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:02:35 verbose #5416 > > #endif
00:02:35 verbose #5417 > > type clap_builder_ValueRange = class end
00:02:35 verbose #5418 > > #if FABLE_COMPILER
00:02:35 verbose #5419 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:02:35 verbose #5420 > > #endif
00:02:35 verbose #5421 > > type clap_builder_ValueParser = class end
00:02:35 verbose #5422 > > #if FABLE_COMPILER
00:02:35 verbose #5423 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:02:35 verbose #5424 > > #endif
00:02:35 verbose #5425 > > type clap_builder_PossibleValue = class end
00:02:35 verbose #5426 > > #if FABLE_COMPILER
00:02:35 verbose #5427 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:02:35 verbose #5428 > > #endif
00:02:35 verbose #5429 > > type std_process_Child = class end
00:02:35 verbose #5430 > > #if FABLE_COMPILER
00:02:35 verbose #5431 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:02:35 verbose #5432 > > #endif
00:02:35 verbose #5433 > > type std_process_ChildStderr = class end
00:02:35 verbose #5434 > > #if FABLE_COMPILER
00:02:35 verbose #5435 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:02:35 verbose #5436 > > #endif
00:02:35 verbose #5437 > > type std_process_ChildStdout = class end
00:02:35 verbose #5438 > > #if FABLE_COMPILER
00:02:35 verbose #5439 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:02:35 verbose #5440 > > #endif
00:02:35 verbose #5441 > > type std_process_ChildStdin = class end
00:02:35 verbose #5442 > > #if FABLE_COMPILER
00:02:35 verbose #5443 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:02:35 verbose #5444 > > #endif
00:02:35 verbose #5445 > > type std_process_Command = class ...
00:02:37 verbose #5446 > >
00:02:37 verbose #5447 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:37 verbose #5448 > > #if FABLE_COMPILER
00:02:37 verbose #5449 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:02:37 verbose #5450 > > #endif
00:02:37 verbose #5451 > > type std_fs_File = class end
00:02:37 verbose #5452 > > #if FABLE_COMPILER
00:02:37 verbose #5453 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:02:37 verbose #5454 > > #endif
00:02:37 verbose #5455 > > type std_fs_FileType = class end
00:02:37 verbose #5456 > > #if FABLE_COMPILER
00:02:37 verbose #5457 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:02:37 verbose #5458 > > #endif
00:02:37 verbose #5459 > > type std_path_Display = class end
00:02:37 verbose #5460 > > #if FABLE_COMPILER
00:02:37 verbose #5461 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:02:37 verbose #5462 > > #endif
00:02:37 verbose #5463 > > type std_path_Path = class end
00:02:37 verbose #5464 > > #if FABLE_COMPILER
00:02:37 verbose #5465 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:02:37 verbose #5466 > > #endif
00:02:37 verbose #5467 > > type std_path_PathBuf = class end
00:02:37 verbose #5468 > > #if FABLE_COMPILER
00:02:37 verbose #5469 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:02:37 verbose #5470 > > #endif
00:02:37 verbose #5471 > > type async_walkdir_DirEntry = class end
00:02:37 verbose #5472 > > #if FABLE_COMPILER
00:02:37 verbose #5473 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:02:37 verbose #5474 > > #endif
00:02:37 verbose #5475 > > type async_walkdir_Filtering = class end
00:02:37 verbose #5476 > > #if FABLE_COMPILER
00:02:37 verbose #5477 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:02:37 verbose #5478 > > #endif
00:02:37 verbose #5479 > > type async_walkdir_WalkDir = class end
00:02:37 verbose #5480 > > #if FABLE_COMPILER
00:02:37 verbose #5481 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:02:37 verbose #5482 > > #endif
00:02:37 verbose #5483 > > type core_any_Any = class end
00:02:37 verbose #5484 > > #if FABLE_COMPILER
00:02:37 verbose #5485 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:37 verbose #5486 > > #endif
00:02:37 verbose #5487 > > type core_ops_Try<'T> = class end
00:02:37 verbose #5488 > > #if FABLE_COMPILER
00:02:37 verbose #5489 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:37 verbose #5490 > > #endif
00:02:37 verbose #5491 > > type Func0<'T> = class end
00:02:37 verbose #5492 > > #if FABLE_COMPILER
00:02:37 verbose #5493 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:37 verbose #5494 > > #endif
00:02:37 verbose #5495 > > type Func0<'T, 'U> = class end
00:02:37 verbose #5496 > > #if FABLE_COMPILER
00:02:37 verbose #5497 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:37 verbose #5498 > > #endif
00:02:37 verbose #5499 > > type Box<'T> = clas...
00:02:40 verbose #5500 > >
00:02:40 verbose #5501 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5502 > > module SpiralTrace =
00:02:40 verbose #5503 > > let trace x =
00:02:40 verbose #5504 > > #if !INTERACTIVE
00:02:40 verbose #5505 > > Trace.trace x
00:02:40 verbose #5506 > > #else
00:02:40 verbose #5507 > > trace x
00:02:40 verbose #5508 > > #endif
00:02:40 verbose #5509 > >
00:02:40 verbose #5510 > > type TraceLevel =
00:02:40 verbose #5511 > > #if !INTERACTIVE
00:02:40 verbose #5512 > > Trace.US0
00:02:40 verbose #5513 > > #else
00:02:40 verbose #5514 > > US0
00:02:40 verbose #5515 > > #endif
00:02:40 verbose #5516 > >
00:02:40 verbose #5517 > > module SpiralCrypto =
00:02:40 verbose #5518 > > let hash_text x =
00:02:40 verbose #5519 > > #if !INTERACTIVE
00:02:40 verbose #5520 > > Crypto.hash_text x
00:02:40 verbose #5521 > > #else
00:02:40 verbose #5522 > > hash_text x
00:02:40 verbose #5523 > > #endif
00:02:40 verbose #5524 > >
00:02:40 verbose #5525 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:02:40 verbose #5526 > >
00:02:40 verbose #5527 > > module SpiralAsync =
00:02:40 verbose #5528 > > let merge_cancellation_token_with_default_async x =
00:02:40 verbose #5529 > > #if !INTERACTIVE
00:02:40 verbose #5530 > > Async_.merge_cancellation_token_with_default_async x
00:02:40 verbose #5531 > > #else
00:02:40 verbose #5532 > > merge_cancellation_token_with_default_async x
00:02:40 verbose #5533 > > #endif
00:02:40 verbose #5534 > >
00:02:40 verbose #5535 > > module SpiralThreading =
00:02:40 verbose #5536 > > let new_disposable_token x =
00:02:40 verbose #5537 > > #if !INTERACTIVE
00:02:40 verbose #5538 > > Threading.new_disposable_token x
00:02:40 verbose #5539 > > #else
00:02:40 verbose #5540 > > new_disposable_token x
00:02:40 verbose #5541 > > #endif
00:02:40 verbose #5542 > >
00:02:40 verbose #5543 > > module SpiralNetworking =
00:02:40 verbose #5544 > > let test_port_open x =
00:02:40 verbose #5545 > > #if !INTERACTIVE
00:02:40 verbose #5546 > > Networking.test_port_open x
00:02:40 verbose #5547 > > #else
00:02:40 verbose #5548 > > test_port_open x
00:02:40 verbose #5549 > > #endif
00:02:40 verbose #5550 > >
00:02:40 verbose #5551 > > let test_port_open_timeout x =
00:02:40 verbose #5552 > > #if !INTERACTIVE
00:02:40 verbose #5553 > > Networking.test_port_open_timeout x
00:02:40 verbose #5554 > > #else
00:02:40 verbose #5555 > > test_port_open_timeout x
00:02:40 verbose #5556 > > #endif
00:02:40 verbose #5557 > >
00:02:40 verbose #5558 > > let wait_for_port_access x =
00:02:40 verbose #5559 > > #if !INTERACTIVE
00:02:40 verbose #5560 > > Networking.wait_for_port_access x
00:02:40 verbose #5561 > > #else
00:02:40 verbose #5562 > > wait_for_port_access x
00:02:40 verbose #5563 > > #endif
00:02:40 verbose #5564 > >
00:02:40 verbose #5565 > > let get_available_port x =
00:02:40 verbose #5566 > > #if !INTERACTIVE
00:02:40 verbose #5567 > > Networking.get_available_port x
00:02:40 verbose #5568 > > #else
00:02:40 verbose #5569 > > get_available_port x
00:02:40 verbose #5570 > > #endif
00:02:40 verbose #5571 > >
00:02:40 verbose #5572 > > module SpiralRuntime =
00:02:40 verbose #5573 > > let get_executable_suffix () =
00:02:40 verbose #5574 > > #if !INTERACTIVE
00:02:40 verbose #5575 > > Runtime.get_executable_suffix ()
00:02:40 verbose #5576 > > #else
00:02:40 verbose #5577 > > get_executable_suffix ()
00:02:40 verbose #5578 > > #endif
00:02:40 verbose #5579 > >
00:02:40 verbose #5580 > > let is_windows () =
00:02:40 verbose #5581 > > #if !INTERACTIVE
00:02:40 verbose #5582 > > ...
00:02:40 verbose #5583 > >
00:02:40 verbose #5584 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5585 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:02:40 verbose #5586 > >
00:02:40 verbose #5587 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5588 > > //// test
00:02:40 verbose #5589 > >
00:02:40 verbose #5590 > > type AssertExceptionFormatter (ex) =
00:02:40 verbose #5591 > > member _.Text =
00:02:40 verbose #5592 > > ex.ToString()
00:02:40 verbose #5593 > > .Replace("32m", "<span style=\"color: green;\">")
00:02:40 verbose #5594 > > .Replace("36m", "</span>")
00:02:40 verbose #5595 > > .Replace("31m", "<span style=\"color: red;\">")
00:02:40 verbose #5596 > > .Replace("\n", "<br/>\n")
00:02:40 verbose #5597 > >
00:02:40 verbose #5598 > >
00:02:40 verbose #5599 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:02:40 verbose #5600 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:02:40 verbose #5601 > >
00:02:40 verbose #5602 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5603 > > //// test
00:02:40 verbose #5604 > >
00:02:40 verbose #5605 > > let inline __expect fn log expected actual =
00:02:40 verbose #5606 > > if log then printfn $"{actual.ToDisplayString ()}"
00:02:40 verbose #5607 > > try
00:02:40 verbose #5608 > > "Testing.__expect" |> fn actual expected
00:02:40 verbose #5609 > > with :? Expecto.AssertException as ex ->
00:02:40 verbose #5610 > > AssertExceptionFormatter(ex).Display () |> ignore
00:02:40 verbose #5611 > > failwith (ex.GetType().FullName)
00:02:40 verbose #5612 > >
00:02:40 verbose #5613 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:02:40 verbose #5614 > > expected actual
00:02:40 verbose #5615 > > let inline _contains expected actual = __contains true expected actual
00:02:40 verbose #5616 > >
00:02:40 verbose #5617 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:02:40 verbose #5618 > > expected actual
00:02:40 verbose #5619 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:02:40 verbose #5620 > >
00:02:40 verbose #5621 > > let inline __isGreaterThan log expected actual = __expect
00:02:40 verbose #5622 > > Expecto.Expect.isGreaterThan log expected actual
00:02:40 verbose #5623 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:02:40 verbose #5624 > >
00:02:40 verbose #5625 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:02:40 verbose #5626 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:02:40 verbose #5627 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:02:40 verbose #5628 > > expected actual
00:02:40 verbose #5629 > >
00:02:40 verbose #5630 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:02:40 verbose #5631 > > log expected actual
00:02:40 verbose #5632 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:02:40 verbose #5633 > >
00:02:40 verbose #5634 > > let inline __isLessThanOrEqual log expected actual = __expect
00:02:40 verbose #5635 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:02:40 verbose #5636 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:02:40 verbose #5637 > > expected actual
00:02:40 verbose #5638 > >
00:02:40 verbose #5639 > > let inline __sequenceEqual log expected actual = __expe...
00:02:40 verbose #5640 > >
00:02:40 verbose #5641 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5642 > > //// test
00:02:40 verbose #5643 > >
00:02:40 verbose #5644 > > let inline __isBetween log a b actual =
00:02:40 verbose #5645 > > let inline isBetween actual (a, b) _ =
00:02:40 verbose #5646 > > __isGreaterThanOrEqual log a actual
00:02:40 verbose #5647 > > __isLessThanOrEqual log b actual
00:02:40 verbose #5648 > > __expect isBetween log (a, b) actual
00:02:40 verbose #5649 > > let inline _isBetween a b actual = __isBetween true a b actual
00:02:40 verbose #5650 > >
00:02:40 verbose #5651 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:40 verbose #5652 > > #!import ../../lib/fsharp/Common.fs
00:02:40 verbose #5653 > > #!import ../../lib/fsharp/CommonFSharp.fs
00:02:40 verbose #5654 > > #!import ../../lib/fsharp/Async.fs
00:02:40 verbose #5655 > > #!import ../../lib/fsharp/AsyncSeq.fs
00:02:40 verbose #5656 > > #!import ../../lib/fsharp/Runtime.fs
00:02:40 verbose #5657 > > #!import ../../lib/fsharp/FileSystem.fs
00:02:40 verbose #5658 > >
00:02:40 verbose #5659 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5660 > > #if !INTERACTIVE
00:02:40 verbose #5661 > > namespace Polyglot
00:02:40 verbose #5662 > > #endif
00:02:40 verbose #5663 > >
00:02:40 verbose #5664 > > module Common =
00:02:40 verbose #5665 > >
00:02:40 verbose #5666 > > #if !INTERACTIVE
00:02:40 verbose #5667 > > open Lib
00:02:40 verbose #5668 > > #endif
00:02:40 verbose #5669 > >
00:02:40 verbose #5670 > > let nl = System.Environment.NewLine
00:02:40 verbose #5671 > > let q = @""""
00:02:40 verbose #5672 > >
00:02:40 verbose #5673 > > let inline cons head tail = head :: tail
00:02:40 verbose #5674 > >
00:02:40 verbose #5675 > > /// ## memoize
00:02:40 verbose #5676 > > let inline memoize fn =
00:02:40 verbose #5677 > > let result = lazy fn ()
00:02:40 verbose #5678 > > fun () -> result.Value
00:02:40 verbose #5679 > >
00:02:40 verbose #5680 > > /// ## TraceLevel
00:02:40 verbose #5681 > > type TraceLevel =
00:02:40 verbose #5682 > > | Verbose
00:02:40 verbose #5683 > > | Debug
00:02:40 verbose #5684 > > | Info
00:02:40 verbose #5685 > > | Warning
00:02:40 verbose #5686 > > | Critical
00:02:40 verbose #5687 > >
00:02:40 verbose #5688 > > let inline _locals () = ""
00:02:40 verbose #5689 > >
00:02:40 verbose #5690 > > /// ## trace
00:02:40 verbose #5691 > > let to_trace_level = function
00:02:40 verbose #5692 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:02:40 verbose #5693 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:02:40 verbose #5694 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:02:40 verbose #5695 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:02:40 verbose #5696 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:02:40 verbose #5697 > >
00:02:40 verbose #5698 > > let trace level fn locals =
00:02:40 verbose #5699 > > let level = level |> to_trace_level
00:02:40 verbose #5700 > > SpiralTrace.trace level fn locals
00:02:40 verbose #5701 > >
00:02:40 verbose #5702 > >
00:02:40 verbose #5703 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5704 > > #if !INTERACTIVE
00:02:40 verbose #5705 > > namespace Polyglot
00:02:40 verbose #5706 > > #endif
00:02:40 verbose #5707 > >
00:02:40 verbose #5708 > > module CommonFSharp =
00:02:40 verbose #5709 > >
00:02:40 verbose #5710 > > open Common
00:02:40 verbose #5711 > >
00:02:40 verbose #5712 > > /// ## getUnionCaseName
00:02:40 verbose #5713 > > let inline getUnionCaseName<'T> (x: 'T) =
00:02:40 verbose #5714 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:02:40 verbose #5715 > > | case, _ -> case.Name
00:02:40 verbose #5716 > >
00:02:40 verbose #5717 > >
00:02:40 verbose #5718 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:40 verbose #5719 > > #if !INTERACTIVE
00:02:40 verbose #5720 > > namespace Polyglot
00:02:40 verbose #5721 > > #endif
00:02:40 verbose #5722 > >
00:02:40 verbose #5723 > > module Async =
00:02:40 verbose #5724 > >
00:02:40 verbose #5725 > > #if !INTERACTIVE
00:02:40 verbose #5726 > > open Lib
00:02:40 verbose #5727 > > #endif
00:02:40 verbose #5728 > >
00:02:40 verbose #5729 > > open Common
00:02:40 verbose #5730 > >
00:02:40 verbose #5731 > > /// ## choice
00:02:40 verbose #5732 > > let inline choice asyncs = async {
00:02:40 verbose #5733 > > let e = Event<_> ()
00:02:40 verbose #5734 > > use cts = new System.Threading.CancellationTokenSource ()
00:02:40 verbose #5735 > > let fn =
00:02:40 verbose #5736 > > asyncs
00:02:40 verbose #5737 > > |> Seq.map (fun a -> async {
00:02:40 verbose #5738 > > let! x = a
00:02:40 verbose #5739 > > e.Trigger x
00:02:40 verbose #5740 > > })
00:02:40 verbose #5741 > > |> Async.Parallel
00:02:40 verbose #5742 > > |> Async.Ignore
00:02:40 verbose #5743 > > Async.Start (fn, cts.Token)
00:02:40 verbose #5744 > > let! result = Async.AwaitEvent e.Publish
00:02:40 verbose #5745 > > cts.Cancel ()
00:02:40 verbose #5746 > > return result
00:02:40 verbose #5747 > > }
00:02:40 verbose #5748 > >
00:02:40 verbose #5749 > > /// ## map
00:02:40 verbose #5750 > > let inline map fn a = async {
00:02:40 verbose #5751 > > let! x = a
00:02:40 verbose #5752 > > return fn x
00:02:40 verbose #5753 > > }
00:02:40 verbose #5754 > >
00:02:40 verbose #5755 > > /// ## catch
00:02:40 verbose #5756 > > let inline catch a =
00:02:40 verbose #5757 > > a
00:02:40 verbose #5758 > > |> Async.Catch
00:02:40 verbose #5759 > > |> map (function
00:02:40 verbose #5760 > > | Choice1Of2 result -> Ok result
00:02:40 verbose #5761 > > | Choice2Of2 ex -> Error ex
00:02:40 verbose #5762 > > )
00:02:40 verbose #5763 > >
00:02:40 verbose #5764 > > /// ## runWithTimeoutChoiceAsync
00:02:40 verbose #5765 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:02:40 verbose #5766 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:02:40 verbose #5767 > >
00:02:40 verbose #5768 > > let timeoutTask = async {
00:02:40 verbose #5769 > > do! Async.Sleep timeout
00:02:40 verbose #5770 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:02:40 verbose #5771 > > return None
00:02:40 verbose #5772 > > }
00:02:40 verbose #5773 > >
00:02:40 verbose #5774 > > let task = async {
00:02:40 verbose #5775 > > try
00:02:40 verbose #5776 > > let! result = fn
00:02:40 verbose #5777 > > return Some result
00:02:40 verbose #5778 > > with
00:02:40 verbose #5779 > > | :? System.AggregateException as ex when
00:02:40 verbose #5780 > > ex.InnerExceptions
00:02:40 verbose #5781 > > |> Seq.exists (function :? Sys...
00:02:41 verbose #5782 > >
00:02:41 verbose #5783 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:41 verbose #5784 > > #if !INTERACTIVE
00:02:41 verbose #5785 > > namespace Polyglot
00:02:41 verbose #5786 > > #endif
00:02:41 verbose #5787 > >
00:02:41 verbose #5788 > > module AsyncSeq =
00:02:41 verbose #5789 > >
00:02:41 verbose #5790 > > #if !INTERACTIVE
00:02:41 verbose #5791 > > open Lib
00:02:41 verbose #5792 > > #endif
00:02:41 verbose #5793 > >
00:02:41 verbose #5794 > > open Common
00:02:41 verbose #5795 > >
00:02:41 verbose #5796 > > /// ## subscribeEvent
00:02:41 verbose #5797 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:02:41 verbose #5798 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:02:41 verbose #5799 > > 'A>(event.AddHandler, event.RemoveHandler)
00:02:41 verbose #5800 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:02:41 verbose #5801 > > event.EventArgs)
00:02:41 verbose #5802 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:02:41 verbose #5803 > >
00:02:41 verbose #5804 > > /// ## subscribeToken
00:02:41 verbose #5805 > > let subscribeToken (token : System.Threading.CancellationToken) =
00:02:41 verbose #5806 > > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:02:41 verbose #5807 > > System.Action tcs.SetResult |> token.Register |> ignore
00:02:41 verbose #5808 > > let start = System.DateTime.Now.Ticks
00:02:41 verbose #5809 > > FSharp.Control.AsyncSeq.unfoldAsync
00:02:41 verbose #5810 > > (fun () -> async {
00:02:41 verbose #5811 > > do! tcs.Task |> Async.AwaitTask
00:02:41 verbose #5812 > > return Some (System.DateTime.Now.Ticks - start, ())
00:02:41 verbose #5813 > > })
00:02:41 verbose #5814 > > ()
00:02:41 verbose #5815 > >
00:02:41 verbose #5816 > >
00:02:41 verbose #5817 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:41 verbose #5818 > > #if !INTERACTIVE
00:02:41 verbose #5819 > > namespace Polyglot
00:02:41 verbose #5820 > > #endif
00:02:41 verbose #5821 > >
00:02:41 verbose #5822 > > module Runtime =
00:02:41 verbose #5823 > >
00:02:41 verbose #5824 > > #if !INTERACTIVE
00:02:41 verbose #5825 > > open Lib
00:02:41 verbose #5826 > > #endif
00:02:41 verbose #5827 > >
00:02:41 verbose #5828 > > open Common
00:02:41 verbose #5829 > >
00:02:41 verbose #5830 > > /// ## parseArgs
00:02:41 verbose #5831 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:41 verbose #5832 > > let assemblyName =
00:02:41 verbose #5833 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:02:41 verbose #5834 > > let errorHandler : Argu.IExiter =
00:02:41 verbose #5835 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:02:41 verbose #5836 > > List.contains assemblyName
00:02:41 verbose #5837 > > then Argu.ExceptionExiter ()
00:02:41 verbose #5838 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:02:41 verbose #5839 > > _ -> Some System.ConsoleColor.Red)
00:02:41 verbose #5840 > >
00:02:41 verbose #5841 > > let parser =
00:02:41 verbose #5842 > > Argu.ArgumentParser.Create<'T> (
00:02:41 verbose #5843 > > programName =
00:02:41 verbose #5844 > > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:02:41 verbose #5845 > > errorHandler = errorHandler
00:02:41 verbose #5846 > > )
00:02:41 verbose #5847 > >
00:02:41 verbose #5848 > > parser.ParseCommandLine args
00:02:41 verbose #5849 > >
00:02:41 verbose #5850 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:41 verbose #5851 > > args
00:02:41 verbose #5852 > > |> parseArgs<'T>
00:02:41 verbose #5853 > > |> fun results -> results.GetAllResults ()
00:02:41 verbose #5854 > >
00:02:41 verbose #5855 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:41 verbose #5856 > > args
00:02:41 verbose #5857 > > |> parseAllArgs<'T>
00:02:41 verbose #5858 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:02:41 verbose #5859 > > |> Map.ofList
00:02:41 verbose #5860 > >
00:02:41 verbose #5861 > >
00:02:41 verbose #5862 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:41 verbose #5863 > > #if !INTERACTIVE
00:02:41 verbose #5864 > > namespace Polyglot
00:02:41 verbose #5865 > > #endif
00:02:41 verbose #5866 > >
00:02:41 verbose #5867 > > module FileSystem =
00:02:41 verbose #5868 > >
00:02:41 verbose #5869 > > #if !INTERACTIVE
00:02:41 verbose #5870 > > open Lib
00:02:41 verbose #5871 > > #endif
00:02:41 verbose #5872 > >
00:02:41 verbose #5873 > > open Common
00:02:41 verbose #5874 > > open SpiralFileSystem.Operators
00:02:41 verbose #5875 > >
00:02:41 verbose #5876 > > /// ## watchDirectory
00:02:41 verbose #5877 > > [[<RequireQualifiedAccess>]]
00:02:41 verbose #5878 > > type FileSystemChangeType =
00:02:41 verbose #5879 > > | Failure
00:02:41 verbose #5880 > > | Changed
00:02:41 verbose #5881 > > | Created
00:02:41 verbose #5882 > > | Deleted
00:02:41 verbose #5883 > > | Renamed
00:02:41 verbose #5884 > >
00:02:41 verbose #5885 > > [[<RequireQualifiedAccess>]]
00:02:41 verbose #5886 > > type FileSystemChange =
00:02:41 verbose #5887 > > | Failure of exn: exn
00:02:41 verbose #5888 > > | Changed of path: string * content: string option
00:02:41 verbose #5889 > > | Created of path: string * content: string option
00:02:41 verbose #5890 > > | Deleted of path: string
00:02:41 verbose #5891 > > | Renamed of oldPath: string * (string * string option)
00:02:41 verbose #5892 > >
00:02:41 verbose #5893 > >
00:02:41 verbose #5894 > > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:02:41 verbose #5895 > > let fullPath = path |> System.IO.Path.GetFullPath
00:02:41 verbose #5896 > > let _locals () = $"filter: {filter} / {_locals ()}"
00:02:41 verbose #5897 > >
00:02:41 verbose #5898 > > let watcher =
00:02:41 verbose #5899 > > new System.IO.FileSystemWatcher (
00:02:41 verbose #5900 > > Path = fullPath,
00:02:41 verbose #5901 > > NotifyFilter = filter,
00:02:41 verbose #5902 > > EnableRaisingEvents = true,
00:02:41 verbose #5903 > > IncludeSubdirectories = true
00:02:41 verbose #5904 > > )
00:02:41 verbose #5905 > >
00:02:41 verbose #5906 > > let inline getEventPath (path : string) =
00:02:41 verbose #5907 > > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:02:41 verbose #5908 > > SpiralSm.trim_start [[| '/'; '\\' |]]
00:02:41 verbose #5909 > >
00:02:41 verbose #5910 > > let inline ticks () =
00:02:41 verbose #5911 > > System.DateTime.UtcNow.Ticks
00:02:41 verbose #5912 > >
00:02:41 verbose #5913 > > let changedStream =
00:02:41 verbose #5914 > > AsyncSeq.subscribeEvent
00:02:41 verbose #5915 > > watcher.Changed
00:02:41 verbose #5916 > > (fun event ->
00:02:41 verbose #5917 > > ticks (),
00:02:41 verbose #5918 > > [[ FileSystemChange...
00:02:42 verbose #5919 > >
00:02:42 verbose #5920 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #5921 > > #if !INTERACTIVE
00:02:42 verbose #5922 > > open Lib
00:02:42 verbose #5923 > > #endif
00:02:42 verbose #5924 > >
00:02:42 verbose #5925 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #5926 > > open Common
00:02:42 verbose #5927 > >
00:02:42 verbose #5928 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #5929 > > //// test
00:02:42 verbose #5930 > >
00:02:42 verbose #5931 > > open SpiralFileSystem.Operators
00:02:42 verbose #5932 > >
00:02:42 verbose #5933 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:42 verbose #5934 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:42 verbose #5935 > > │ ## parseArgs │
00:02:42 verbose #5936 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:42 verbose #5937 > >
00:02:42 verbose #5938 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #5939 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:42 verbose #5940 > > let assemblyName =
00:02:42 verbose #5941 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:02:42 verbose #5942 > > let errorHandler : Argu.IExiter =
00:02:42 verbose #5943 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:02:42 verbose #5944 > > List.contains assemblyName
00:02:42 verbose #5945 > > then Argu.ExceptionExiter ()
00:02:42 verbose #5946 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ ->
00:02:42 verbose #5947 > > Some System.ConsoleColor.Red)
00:02:42 verbose #5948 > >
00:02:42 verbose #5949 > > let parser =
00:02:42 verbose #5950 > > Argu.ArgumentParser.Create<'T> (
00:02:42 verbose #5951 > > programName = $"{assemblyName}{SpiralRuntime.get_executable_suffix
00:02:42 verbose #5952 > > ()}",
00:02:42 verbose #5953 > > errorHandler = errorHandler
00:02:42 verbose #5954 > > )
00:02:42 verbose #5955 > >
00:02:42 verbose #5956 > > parser.ParseCommandLine args
00:02:42 verbose #5957 > >
00:02:42 verbose #5958 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #5959 > > //// test
00:02:42 verbose #5960 > >
00:02:42 verbose #5961 > > [[<RequireQualifiedAccess>]]
00:02:42 verbose #5962 > > type Arguments =
00:02:42 verbose #5963 > > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce;
00:02:42 verbose #5964 > > Argu.ArguAttributes.Last>]]
00:02:42 verbose #5965 > > Paths of paths : string list
00:02:42 verbose #5966 > >
00:02:42 verbose #5967 > > interface Argu.IArgParserTemplate with
00:02:42 verbose #5968 > > member s.Usage =
00:02:42 verbose #5969 > > match s with
00:02:42 verbose #5970 > > | Paths _ -> nameof Paths
00:02:42 verbose #5971 > >
00:02:42 verbose #5972 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #5973 > > //// test
00:02:42 verbose #5974 > >
00:02:42 verbose #5975 > > Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
00:02:42 verbose #5976 > >
00:02:42 verbose #5977 > > ╭─[ 127.80ms - return value ]──────────────────────────────────────────────────╮
00:02:42 verbose #5978 > > │ "USAGE: dotnet-repl [--help] <paths>... │
00:02:42 verbose #5979 > > │ │
00:02:42 verbose #5980 > > │ PATHS: │
00:02:42 verbose #5981 > > │ │
00:02:42 verbose #5982 > > │ <paths>... Paths │
00:02:42 verbose #5983 > > │ │
00:02:42 verbose #5984 > > │ OPTIONS: │
00:02:42 verbose #5985 > > │ │
00:02:42 verbose #5986 > > │ --help display this list of options. │
00:02:42 verbose #5987 > > │ " │
00:02:42 verbose #5988 > > │ │
00:02:42 verbose #5989 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:42 verbose #5990 > >
00:02:42 verbose #5991 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #5992 > > //// test
00:02:42 verbose #5993 > >
00:02:42 verbose #5994 > > fun () -> parseArgs<Arguments> [[||]] |> ignore
00:02:42 verbose #5995 > > |> _throwsC (fun ex _ ->
00:02:42 verbose #5996 > > SpiralSm.format_exception ex
00:02:42 verbose #5997 > > |> _stringContains "Argu.ArguParseException: ERROR: missing parameter
00:02:42 verbose #5998 > > '<paths>...'."
00:02:42 verbose #5999 > > )
00:02:42 verbose #6000 > >
00:02:42 verbose #6001 > > ╭─[ 66.65ms - stdout ]─────────────────────────────────────────────────────────╮
00:02:42 verbose #6002 > > │ <fun:it@3-3> │
00:02:42 verbose #6003 > > │ │
00:02:42 verbose #6004 > > │ "Argu.ArguParseException: ERROR: missing parameter '<paths>...'. │
00:02:42 verbose #6005 > > │ USAGE: dotnet-repl.exe [--help] <paths>... │
00:02:42 verbose #6006 > > │ │
00:02:42 verbose #6007 > > │ PATHS: │
00:02:42 verbose #6008 > > │ │
00:02:42 verbose #6009 > > │ <paths>... Paths │
00:02:42 verbose #6010 > > │ │
00:02:42 verbose #6011 > > │ OPTIONS: │
00:02:42 verbose #6012 > > │ │
00:02:42 verbose #6013 > > │ --help display this list of options. │
00:02:42 verbose #6014 > > │ " │
00:02:42 verbose #6015 > > │ │
00:02:42 verbose #6016 > > │ │
00:02:42 verbose #6017 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:42 verbose #6018 > >
00:02:42 verbose #6019 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #6020 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:42 verbose #6021 > > args
00:02:42 verbose #6022 > > |> parseArgs<'T>
00:02:42 verbose #6023 > > |> fun results -> results.GetAllResults ()
00:02:42 verbose #6024 > >
00:02:42 verbose #6025 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #6026 > > //// test
00:02:42 verbose #6027 > >
00:02:42 verbose #6028 > > [[<RequireQualifiedAccess>]]
00:02:42 verbose #6029 > > type Arguments =
00:02:42 verbose #6030 > > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce;
00:02:42 verbose #6031 > > Argu.ArguAttributes.Last>]]
00:02:42 verbose #6032 > > Paths of paths : string list
00:02:42 verbose #6033 > >
00:02:42 verbose #6034 > > interface Argu.IArgParserTemplate with
00:02:42 verbose #6035 > > member s.Usage =
00:02:42 verbose #6036 > > match s with
00:02:42 verbose #6037 > > | Paths _ -> nameof Paths
00:02:42 verbose #6038 > >
00:02:42 verbose #6039 > > parseAllArgs<Arguments> [[| "a b"; "c" |]]
00:02:42 verbose #6040 > > |> _assertEqual [[ Arguments.Paths [[ "a b"; "c" ]] ]]
00:02:42 verbose #6041 > >
00:02:42 verbose #6042 > > ╭─[ 143.95ms - stdout ]────────────────────────────────────────────────────────╮
00:02:42 verbose #6043 > > │ [Paths ["a b"; "c"]] │
00:02:42 verbose #6044 > > │ │
00:02:42 verbose #6045 > > │ │
00:02:42 verbose #6046 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:42 verbose #6047 > >
00:02:42 verbose #6048 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #6049 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:42 verbose #6050 > > args
00:02:42 verbose #6051 > > |> parseAllArgs<'T>
00:02:42 verbose #6052 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:02:42 verbose #6053 > > |> Map.ofList
00:02:42 verbose #6054 > >
00:02:42 verbose #6055 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #6056 > > //// test
00:02:42 verbose #6057 > >
00:02:42 verbose #6058 > > parseArgsMap<Arguments> [[| "a b"; "c" |]]
00:02:42 verbose #6059 > > |> _assertEqual (
00:02:42 verbose #6060 > > [[ nameof Arguments.Paths, [[ Arguments.Paths [[ "a b"; "c" ]] ]] ]]
00:02:42 verbose #6061 > > |> Map.ofList
00:02:42 verbose #6062 > > )
00:02:42 verbose #6063 > >
00:02:42 verbose #6064 > > ╭─[ 57.07ms - stdout ]─────────────────────────────────────────────────────────╮
00:02:42 verbose #6065 > > │ map [("Paths", [Paths ["a b"; "c"]])] │
00:02:42 verbose #6066 > > │ │
00:02:42 verbose #6067 > > │ │
00:02:42 verbose #6068 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:43 verbose #6069 > 00:00:18 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 31904
00:02:43 verbose #6070 > 00:00:18 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:45 verbose #6071 > 00:00:20 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb to html
00:02:45 verbose #6072 > 00:00:20 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:02:45 verbose #6073 > 00:00:20 verbose #7 ! validate(nb)
00:02:46 verbose #6074 > 00:00:21 verbose #8 ! [NbConvertApp] Writing 292945 bytes to c:\home\git\polyglot\lib\fsharp\Runtime.dib.html
00:02:46 verbose #6075 > 00:00:22 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645
00:02:46 verbose #6076 > 00:00:22 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645
00:02:46 verbose #6077 > 00:00:22 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:47 verbose #6078 > 00:00:22 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:47 verbose #6079 > 00:00:22 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:47 verbose #6080 > 00:00:23 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 32608
00:02:47 debug #6081 execute_with_options_async / exit_code: 0 / output.Length: 36850
00:02:47 debug #8 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Runtime.dib --retries 3
00:02:47 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:02:47 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #4 writeDibCode / output: Fs / path: FileSystem.dib
00:00:00 debug #4 writeDibCode / output: Fs / path: Common.dib
00:00:00 debug #4 writeDibCode / output: Fs / path: AsyncSeq.dib
00:00:00 debug #4 writeDibCode / output: Fs / path: CommonFSharp.dib
00:00:00 debug #4 writeDibCode / output: Fs / path: Async.dib
00:00:00 debug #4 writeDibCode / output: Fs / path: Runtime.dib
00:00:00 debug #9 parseDibCode / output: Fs / file: CommonFSharp.dib
00:00:00 debug #7 parseDibCode / output: Fs / file: Common.dib
00:00:00 debug #9 parseDibCode / output: Fs / file: FileSystem.dib
00:00:00 debug #5 parseDibCode / output: Fs / file: Runtime.dib
00:00:00 debug #7 parseDibCode / output: Fs / file: AsyncSeq.dib
00:00:00 debug #10 parseDibCode / output: Fs / file: Async.dib
In [ ]:
{ pwsh ../lib/math/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 1",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "math.dib", "--retries", "1"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/math/math.dib", "--output-path", "c:/home/git/polyglot/lib/math/math.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/math/math.dib" --output-path "c:/home/git/polyglot/lib/math/math.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:04 verbose #10 > >
00:00:04 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:04 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:04 verbose #13 > > │ # math │
00:00:04 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:04 verbose #15 > >
00:00:04 verbose #16 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:04 verbose #17 > > open testing
00:00:04 verbose #18 > > open rust_operators
00:00:04 verbose #19 > >
00:00:04 verbose #20 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:00:04 verbose #21 > > #r
00:00:04 verbose #22 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #23 > > otNet.Interactive.Spiral.dll"
00:00:04 verbose #24 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:00:04 verbose #25 > > #r
00:00:04 verbose #26 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #27 > > otNet.Interactive.dll"
00:00:04 verbose #28 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:09 verbose #29 > 00:00:08 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dbfb98f86b21deb6b35fe3a80945f9312d296d3871cb8776c774b57d259aaabf/main.spi
00:00:12 verbose #30 > >
00:00:12 verbose #31 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #32 > > inl types () =
00:00:12 verbose #33 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:12 verbose #34 > > Fable.Core.Emit(\"num_complex::Complex<$0>\")>]]\n#endif\ntype
00:00:12 verbose #35 > > num_complex_Complex<'T> = class end"
00:00:12 verbose #36 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:12 verbose #37 > > Fable.Core.Emit(\"pyo3::types::PyModule\")>]]\n#endif\ntype pyo3_types_PyModule
00:00:12 verbose #38 > > = class end"
00:00:12 verbose #39 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:12 verbose #40 > > Fable.Core.Emit(\"pyo3::Bound<$0>\")>]]\n#endif\ntype pyo3_Bound<'T> = class
00:00:12 verbose #41 > > end"
00:00:12 verbose #42 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:12 verbose #43 > > Fable.Core.Emit(\"pyo3::Python\")>]]\n#endif\ntype pyo3_Python = class end"
00:00:12 verbose #44 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:12 verbose #45 > > Fable.Core.Emit(\"pyo3::PyAny\")>]]\n#endif\ntype pyo3_PyAny = class end"
00:00:12 verbose #46 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:12 verbose #47 > > Fable.Core.Emit(\"pyo3::PyErr\")>]]\n#endif\ntype pyo3_PyErr = class end"
00:00:13 verbose #48 > 00:00:12 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c1fbc243bf63cd527fa5f829e76da9bb4a9da0343e5ccc44c9fa851531606830/main.spi
00:00:13 verbose #49 > >
00:00:13 verbose #50 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #51 > > inl types () =
00:00:13 verbose #52 > > rust.types ()
00:00:13 verbose #53 > > sm'.types ()
00:00:13 verbose #54 > > types ()
00:00:14 verbose #55 > 00:00:12 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/da6ed65e06f442a9a2e9bc9e19434682263e6d6106df88ec4427767e68387568/main.spi
00:00:14 verbose #56 > >
00:00:14 verbose #57 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #58 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #59 > > │ ## complex │
00:00:14 verbose #60 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #61 > >
00:00:14 verbose #62 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #63 > > nominal complex t = $'num_complex_Complex<`t>'
00:00:14 verbose #64 > > nominal bound t = $'pyo3_Bound<`t>'
00:00:14 verbose #65 > > nominal python = $'pyo3_Python'
00:00:14 verbose #66 > > nominal pymodule = $'pyo3_types_PyModule'
00:00:14 verbose #67 > > nominal pyany = $'pyo3_PyAny'
00:00:14 verbose #68 > > nominal pyerr = $'pyo3_PyErr'
00:00:14 verbose #69 > >
00:00:14 verbose #70 > > inl complex forall t. ((re : t), (im : t)) : complex t =
00:00:14 verbose #71 > > !\\((re, im), $'"num_complex::Complex::new($0, $1)"')
00:00:14 verbose #72 > 00:00:13 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1f513e38225ad89c9e0f25e3a57b9dfd6634fd457b753639236f222a359997ec/main.spi
00:00:14 verbose #73 > >
00:00:14 verbose #74 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #75 > > //// test
00:00:14 verbose #76 > > ///! rust -d num-complex
00:00:14 verbose #77 > >
00:00:14 verbose #78 > > types ()
00:00:14 verbose #79 > >
00:00:14 verbose #80 > > complex (0f64, 0f64)
00:00:14 verbose #81 > > |> sm'.format'
00:00:14 verbose #82 > > |> sm'.from_std_string
00:00:14 verbose #83 > > |> _assert_eq "0+0i"
00:00:15 verbose #84 > 00:00:14 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4ad9a3feb035e57c387a891052cd7dac48dd2657f48086a74b599decbd596fe4/main.spi
00:00:22 verbose #85 > >
00:00:22 verbose #86 > > ╭─[ 8.08s - return value ]─────────────────────────────────────────────────────╮
00:00:22 verbose #87 > > │ assert_eq / actual: "0+0i" / expected: "0+0i" │
00:00:22 verbose #88 > > │ │
00:00:22 verbose #89 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #90 > >
00:00:22 verbose #91 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:22 verbose #92 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:22 verbose #93 > > │ ## complex_sin │
00:00:22 verbose #94 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #95 > >
00:00:22 verbose #96 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #97 > > inl re forall t. (c : complex t) : t =
00:00:22 verbose #98 > > inl c = join c
00:00:22 verbose #99 > > !\($'"!c.re"')
00:00:22 verbose #100 > >
00:00:22 verbose #101 > > inl im forall t. (c : complex t) : t =
00:00:22 verbose #102 > > inl c = join c
00:00:22 verbose #103 > > !\($'"!c.im"')
00:00:22 verbose #104 > >
00:00:22 verbose #105 > > inl complex_unbox forall t. (c : complex t) =
00:00:22 verbose #106 > > re c, im c
00:00:22 verbose #107 > >
00:00:22 verbose #108 > > inl (~.^) c = complex c
00:00:22 verbose #109 > >
00:00:22 verbose #110 > > inl complex_eq forall t. (a : complex t) (b : complex t) : bool =
00:00:22 verbose #111 > > !\($'"!a == !b"')
00:00:22 verbose #112 > >
00:00:22 verbose #113 > > inl (.=) a b = complex_eq a b
00:00:22 verbose #114 > >
00:00:22 verbose #115 > > instance equable complex t = complex_eq
00:00:22 verbose #116 > >
00:00:22 verbose #117 > > inl complex_add forall t. (a : complex t) (b : complex t) : complex t =
00:00:22 verbose #118 > > !\($'"!a + !b"')
00:00:22 verbose #119 > >
00:00:22 verbose #120 > > inl (.+) a b = complex_add a b
00:00:22 verbose #121 > >
00:00:22 verbose #122 > > inl complex_sub forall t. (a : complex t) (b : complex t) : complex t =
00:00:22 verbose #123 > > !\\((a, b), $'"$0 - $1"')
00:00:22 verbose #124 > >
00:00:22 verbose #125 > > inl (.-) a b = complex_sub a b
00:00:22 verbose #126 > >
00:00:22 verbose #127 > > inl complex_mult forall t. (a : complex t) (b : complex t) : complex t =
00:00:22 verbose #128 > > !\\((a, b), $'"$0 * $1"')
00:00:22 verbose #129 > >
00:00:22 verbose #130 > > inl (.*) a b = complex_mult a b
00:00:22 verbose #131 > >
00:00:22 verbose #132 > > inl complex_div forall t. (a : complex t) (b : complex t) : complex t =
00:00:22 verbose #133 > > !\($'"!a / !b"')
00:00:22 verbose #134 > >
00:00:22 verbose #135 > > inl (./) a b = complex_div a b
00:00:22 verbose #136 > >
00:00:22 verbose #137 > > inl powc forall t. (s : complex t) (c : complex t) : complex t =
00:00:22 verbose #138 > > inl c = join c
00:00:22 verbose #139 > > inl s = join s
00:00:22 verbose #140 > > !\($'"num_complex::Complex::powc(!c, !s)"')
00:00:22 verbose #141 > >
00:00:22 verbose #142 > > inl (.**) a b = powc b a
00:00:22 verbose #143 > >
00:00:22 verbose #144 > > inl complex_sin forall t. (c : complex t) : complex t =
00:00:22 verbose #145 > > !\($'"!c.sin()"')
00:00:22 verbose #146 > >
00:00:22 verbose #147 > > inl conj forall t. (c : complex t) : complex t =
00:00:22 verbose #148 > > !\($'"!c.conj()"')
00:00:23 verbose #149 > 00:00:22 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/519b95e56a953b2b2f726060e4065604aa349034392acf1af498780535b88f59/main.spi
00:00:23 verbose #150 > >
00:00:23 verbose #151 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:23 verbose #152 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:23 verbose #153 > > │ ## zeta │
00:00:23 verbose #154 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #155 > >
00:00:23 verbose #156 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #157 > > inl zeta log (gamma : complex f64 -> complex f64) (s : complex f64) : complex
00:00:23 verbose #158 > > f64 =
00:00:23 verbose #159 > > inl rec zeta count gamma s =
00:00:23 verbose #160 > > if log then
00:00:23 verbose #161 > > !\\(s, $'"println\!(\\\"zeta / count: {:?} / s: {:?}\\\", !count,
00:00:23 verbose #162 > > $0)"')
00:00:23 verbose #163 > > if re s > 1 then
00:00:23 verbose #164 > > (.^(0, 0), (am.init 10000i32 id : a i32 _))
00:00:23 verbose #165 > > ||> am.fold fun acc n =>
00:00:23 verbose #166 > > acc .+ (.^(1, 0) ./ (.^(f64 n, 0) .** s))
00:00:23 verbose #167 > > else
00:00:23 verbose #168 > > inl gamma_term = gamma (.^(1, 0) .- s)
00:00:23 verbose #169 > > inl sin_term = .^(pi, 0) .* s ./ .^(2, 0) |> complex_sin
00:00:23 verbose #170 > > inl one_minus_s = .^(1 - re s, -(im s))
00:00:23 verbose #171 > > inl mirror_term =
00:00:23 verbose #172 > > if re one_minus_s <= 1
00:00:23 verbose #173 > > then .^(0, 0)
00:00:23 verbose #174 > > else
00:00:23 verbose #175 > > if count <= 3
00:00:23 verbose #176 > > then zeta (count + 1) gamma one_minus_s
00:00:23 verbose #177 > > else one_minus_s
00:00:23 verbose #178 > > inl reflection_formula =
00:00:23 verbose #179 > > .^(2, 0) .* (.^(pi, 0) .** s) .* sin_term .* gamma_term .*
00:00:23 verbose #180 > > mirror_term
00:00:23 verbose #181 > > reflection_formula
00:00:23 verbose #182 > > join zeta 0i32 gamma s
00:00:24 verbose #183 > 00:00:23 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4caadda7e9ef046b1d3824395880641dec0e17f110ecc67c54823c446f50694a/main.spi
00:00:24 verbose #184 > >
00:00:24 verbose #185 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:24 verbose #186 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:24 verbose #187 > > │ ## eval │
00:00:24 verbose #188 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 verbose #189 > >
00:00:24 verbose #190 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:24 verbose #191 > > inl module_from_code (py : python) (code : string) : _ (bound pymodule) _ =
00:00:24 verbose #192 > > inl py = join py
00:00:24 verbose #193 > > inl code = code |> sm'.as_str
00:00:24 verbose #194 > > !\($'"pyo3::types::PyModule::from_code_bound(!py, !code, \\"\\", \\"\\")"')
00:00:24 verbose #195 > > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:00:24 verbose #196 > >
00:00:24 verbose #197 > > inl use_pyanymethods () =
00:00:24 verbose #198 > > global "Fable.Core.RustInterop.emitRustExpr () \");\nuse
00:00:24 verbose #199 > > pyo3::prelude::PyAnyMethods;\n//\""
00:00:24 verbose #200 > >
00:00:24 verbose #201 > > inl getattr (attr : string) (module : bound pymodule) : _ (bound pyany) _ =
00:00:24 verbose #202 > > inl attr = join attr
00:00:24 verbose #203 > > inl attr = attr |> sm'.as_str
00:00:24 verbose #204 > > inl module = join module
00:00:24 verbose #205 > > use_pyanymethods ()
00:00:24 verbose #206 > > !\($'"!module.getattr(!attr)"')
00:00:24 verbose #207 > > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:00:24 verbose #208 > >
00:00:24 verbose #209 > > inl call forall t. (args : t) (module : bound pyany) : _ (bound pyany) _ =
00:00:24 verbose #210 > > inl args = join args
00:00:24 verbose #211 > > inl module = join module
00:00:24 verbose #212 > > !\($'"pyo3::prelude::PyAnyMethods::call(&!module, ((*!args).0, *(*!args).1),
00:00:24 verbose #213 > > None)"')
00:00:24 verbose #214 > > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:00:24 verbose #215 > >
00:00:24 verbose #216 > > inl extract forall t. (result : bound pyany) : _ t _ =
00:00:24 verbose #217 > > inl result = join result
00:00:24 verbose #218 > > use_pyanymethods ()
00:00:24 verbose #219 > > !\($'"!result.extract()"')
00:00:24 verbose #220 > > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:00:24 verbose #221 > >
00:00:24 verbose #222 > > inl eval py code (args : pair bool (pair f64 f64)) : _ (_ f64) sm'.std_string =
00:00:24 verbose #223 > > inl code =
00:00:24 verbose #224 > > code
00:00:24 verbose #225 > > |> module_from_code py
00:00:24 verbose #226 > > |> resultm.unwrap'
00:00:24 verbose #227 > > inl fn =
00:00:24 verbose #228 > > code
00:00:24 verbose #229 > > |> getattr "fn"
00:00:24 verbose #230 > > |> resultm.unwrap'
00:00:24 verbose #231 > >
00:00:24 verbose #232 > > fn
00:00:24 verbose #233 > > |> call args
00:00:24 verbose #234 > > |> resultm.try'
00:00:24 verbose #235 > > |> extract
00:00:24 verbose #236 > > |> resultm.try'
00:00:24 verbose #237 > > |> complex
00:00:24 verbose #238 > > |> Ok
00:00:24 verbose #239 > > |> resultm.box
00:00:24 verbose #240 > >
00:00:24 verbose #241 > > inl call1_ log py s code =
00:00:24 verbose #242 > > inl code = join (a code : _ i32 _) |> sm'.concat_array_trailing "\n"
00:00:24 verbose #243 > >
00:00:24 verbose #244 > > inl s = new_pair (re s) (im s)
00:00:24 verbose #245 > > inl args = new_pair log s
00:00:24 verbose #246 > >
00:00:24 verbose #247 > > eval py code args
00:00:24 verbose #248 > >
00:00:24 verbose #249 > > inl call1_ log name py s line =
00:00:24 verbose #250 > > inl s = join s
00:00:24 verbose #251 > > join
00:00:24 verbose #252 > > ;[[
00:00:24 verbose #253 > > $'$"import sys"'
00:00:24 verbose #254 > > $'$"import traceback"'
00:00:24 verbose #255 > > $'$"import re"'
00:00:24 verbose #256 > > $'$"count = 0"'
00:00:24 verbose #257 > > $'$"memory_address_pattern = re.compile(r\' at 0x[[0-9a-fA-F]]+\')"'
00:00:24 verbose #258 > > $'$"def trace_calls(frame, event, arg):"'
00:00:24 verbose #259 > > $'$" global count"'
00:00:24 verbose #260 > > $'$" count += 1"'
00:00:24 verbose #261 > > $'$" if count < 200:"'
00:00:24 verbose #262 > > $'$" try:"'
00:00:24 verbose #263 > > $'$" args = {{ k: v for k, v in frame.f_locals.items() if
00:00:24 verbose #264 > > frame.f_code.co_name \!= \'make_mpc\' and k not in [[\'ctx\']] and not
00:00:24 verbose #265 > > callable(v) }}"'
00:00:24 verbose #266 > > $'$" args_str = \', \'.join([[
00:00:24 verbose #267 > > f\\\"{{k}}={{re.sub(memory_address_pattern, \' at 0x<?>\', repr(v))}}\\\" for k,
00:00:24 verbose #268 > > v in args.items() ]])"'
00:00:24 verbose #269 > > $'$" print(f\\\"{{event}}({!name}) / f_code.co_name:
00:00:24 verbose #270 > > {{frame.f_code.co_name}} / f_locals: {{args_str}} / f_lineno: {{frame.f_lineno}}
00:00:24 verbose #271 > > / f_code.co_filename:
00:00:24 verbose #272 > > {{frame.f_code.co_filename.split(\'site-packages\')[[-1]]}} / f_back.f_lineno:
00:00:24 verbose #273 > > {{ \'\' if frame.f_back is None else frame.f_back.f_lineno }}
00:00:24 verbose #274 > > f_back.f_code.co_filename: {{ \'\' if frame.f_back is None else
00:00:24 verbose #275 > > frame.f_back.f_code.co_filename.split(\'site-packages\')[[-1]] }} / arg:
00:00:24 verbose #276 > > {{re.sub(memory_address_pattern, \' at 0x<?>\', repr(arg))}}\\\", flush=True)"'
00:00:24 verbose #277 > > $'$" except ValueError as e:"'
00:00:24 verbose #278 > > $'$" print(f\'{!name} / e: {{e}}\', flush=True)"'
00:00:24 verbose #279 > > $'$" return trace_calls"'
00:00:24 verbose #280 > > $'$"import mpmath"'
00:00:24 verbose #281 > > $'$"def fn(log, s):"'
00:00:24 verbose #282 > > $'$" global count"'
00:00:24 verbose #283 > > $'$" if log:"'
00:00:24 verbose #284 > > $'$" print(f\'{!name} / s: {{s}} / count: {{count}}\',
00:00:24 verbose #285 > > flush=True)"'
00:00:24 verbose #286 > > $'$" s = complex(*s)"'
00:00:24 verbose #287 > > $'$" try:"'
00:00:24 verbose #288 > > $'$" if log: sys.settrace(trace_calls)"'
00:00:24 verbose #289 > > line
00:00:24 verbose #290 > > $'$" if log:"'
00:00:24 verbose #291 > > $'$" sys.settrace(None)"'
00:00:24 verbose #292 > > $'$" print(f\'{!name} / result: {{s}} / count:
00:00:24 verbose #293 > > {{count}}\', flush=True)"'
00:00:24 verbose #294 > > $'$" except ValueError as e:"'
00:00:24 verbose #295 > > $'$" if s.real == 1:"'
00:00:24 verbose #296 > > $'$" s = complex(float(\'inf\'), 0)"'
00:00:24 verbose #297 > > $'$" return (s.real, s.imag)"'
00:00:24 verbose #298 > > ]]
00:00:24 verbose #299 > > |> call1_ log py s
00:00:24 verbose #300 > >
00:00:24 verbose #301 > > inl gamma_ log py s =
00:00:24 verbose #302 > > call1_ log "gamma_" py s $'$" s = mpmath.gamma(s)"'
00:00:24 verbose #303 > >
00:00:24 verbose #304 > > inl zeta_ log py s =
00:00:24 verbose #305 > > call1_ log "zeta_" py s $'$" s = mpmath.zeta(s)"'
00:00:24 verbose #306 > 00:00:23 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/75e59dd767086b99b5b215b9d8f1c5bcfed516af441d03a1d24119f145a264fb/main.spi
00:00:25 verbose #307 > >
00:00:25 verbose #308 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:25 verbose #309 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:25 verbose #310 > > │ ## run_test │
00:00:25 verbose #311 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 verbose #312 > >
00:00:25 verbose #313 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:25 verbose #314 > > inl run_test log closure_fix (fn : (complex f64 -> complex f64) * (complex f64
00:00:25 verbose #315 > > -> complex f64) -> ()) =
00:00:25 verbose #316 > > inl fn_ (py : python) : resultm.result' () pyerr =
00:00:25 verbose #317 > > inl nan () =
00:00:25 verbose #318 > > !\($'"f64::NAN"')
00:00:25 verbose #319 > > inl gamma__ = fun (s : complex f64) =>
00:00:25 verbose #320 > > inl result = gamma_ log py s
00:00:25 verbose #321 > > if log then
00:00:25 verbose #322 > > inl s = join s
00:00:25 verbose #323 > > !\($'"println\!(\\\"gamma__ / s: {:?} / result: {:?}\\\", !s,
00:00:25 verbose #324 > > !result)"')
00:00:25 verbose #325 > > result |> resultm.ok' |> optionm'.unbox |> optionm'.default_value
00:00:25 verbose #326 > > .^(nan (), nan ())
00:00:25 verbose #327 > > inl zeta__ = fun (s : complex f64) =>
00:00:25 verbose #328 > > inl result = zeta_ log py s
00:00:25 verbose #329 > >
00:00:25 verbose #330 > > inl z = zeta true gamma__ s
00:00:25 verbose #331 > >
00:00:25 verbose #332 > > if log then
00:00:25 verbose #333 > > inl s = join s
00:00:25 verbose #334 > > !\($'"println\!(\\\"zeta__ / s: {:?} / result: {:?} / z:
00:00:25 verbose #335 > > {:?}\\\", !s, !result, !z)"')
00:00:25 verbose #336 > >
00:00:25 verbose #337 > > // re result - re x |> abs
00:00:25 verbose #338 > > // |> _assert_lt 0.001
00:00:25 verbose #339 > >
00:00:25 verbose #340 > > // im result - im x |> abs
00:00:25 verbose #341 > > // |> _assert_lt 0.001
00:00:25 verbose #342 > >
00:00:25 verbose #343 > > result |> resultm.ok' |> optionm'.unbox |> optionm'.default_value
00:00:25 verbose #344 > > .^(nan (), nan ())
00:00:25 verbose #345 > > join fn (zeta__, gamma__)
00:00:25 verbose #346 > >
00:00:25 verbose #347 > > Ok ()
00:00:25 verbose #348 > > |> resultm.box
00:00:25 verbose #349 > >
00:00:25 verbose #350 > > join
00:00:25 verbose #351 > > !\($'"pyo3::prepare_freethreaded_python()"') : ()
00:00:25 verbose #352 > >
00:00:25 verbose #353 > > !\($'"let __result = pyo3::Python::with_gil(|py| -> pyo3::PyResult<()> {
00:00:25 verbose #354 > > //"')
00:00:25 verbose #355 > >
00:00:25 verbose #356 > > let x' = fn_ (!\($'"py"') : python)
00:00:25 verbose #357 > > inl x' = join x'
00:00:25 verbose #358 > >
00:00:25 verbose #359 > > inl closure_fix = 2u8, 1u8
00:00:25 verbose #360 > > x' |> rust.fix_closure closure_fix
00:00:25 verbose #361 > >
00:00:25 verbose #362 > > (!\($'"__result"') : _ () pyerr)
00:00:25 verbose #363 > > |> resultm.unwrap'
00:00:25 verbose #364 > 00:00:24 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4604fb21b4ab74a52dfc4d24b2febfe20f2e08d55310551dfdd1c63d3f6728b2/main.spi
00:00:25 verbose #365 > >
00:00:25 verbose #366 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:25 verbose #367 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:25 verbose #368 > > │ ## test_zeta_at_known_values_ │
00:00:25 verbose #369 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 verbose #370 > >
00:00:25 verbose #371 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:25 verbose #372 > > inl test_zeta_at_known_values_ log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:00:25 verbose #373 > > ;[[
00:00:25 verbose #374 > > .^(2, 0), pi ** 2 / 6
00:00:25 verbose #375 > > .^(-1, 0), -1 / 12
00:00:25 verbose #376 > > ]]
00:00:25 verbose #377 > > |> fun x => a x : _ i32 _
00:00:25 verbose #378 > > |> am.iter fun s, e =>
00:00:25 verbose #379 > > inl result = zeta s
00:00:25 verbose #380 > >
00:00:25 verbose #381 > > result |> im |> _assert_eq 0
00:00:25 verbose #382 > > re result - e |> abs |> _assert_lt 0.0001
00:00:26 verbose #383 > 00:00:25 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2b61856a1bbb5d3d9f5af668a2a227f679ff17298a872175c99f06acfd2d35be/main.spi
00:00:26 verbose #384 > >
00:00:26 verbose #385 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:26 verbose #386 > > //// test
00:00:26 verbose #387 > > ///! rust -d num-complex pyo3
00:00:26 verbose #388 > >
00:00:26 verbose #389 > > types ()
00:00:26 verbose #390 > > test_zeta_at_known_values_ true
00:00:27 verbose #391 > 00:00:26 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b14ad6301a2f8e05c39957667b08b30cf736178e612ddbd47b5f8d9901763629/main.spi
00:00:36 verbose #392 > >
00:00:36 verbose #393 > > ╭─[ 10.21s - return value ]────────────────────────────────────────────────────╮
00:00:36 verbose #394 > > │ zeta_ / s: (2.0, 0.0) / count: 0 │
00:00:36 verbose #395 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:00:36 verbose #396 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:00:36 verbose #397 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:36 verbose #398 > > │ / arg: None │
00:00:36 verbose #399 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:00:36 verbose #400 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:00:36 verbose #401 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:36 verbose #402 > > │ / arg: None │
00:00:36 verbose #403 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:00:36 verbose #404 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:00:36 verbose #405 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:36 verbose #406 > > │ / arg: None │
00:00:36 verbose #407 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:00:36 verbose #408 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:00:36 verbose #409 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:36 verbose #410 > > │ / arg: None │
00:00:36 verbose #411 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:00:36 verbose #412 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:00:36 verbose #413 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:36 verbose #414 > > │ / arg: None │
00:00:36 verbose #415 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:00:36 verbose #416 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:00:36 verbose #417 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:00:36 verbose #418 > > │ / arg: None │
00:00:36 verbose #419 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:00:36 verbose #420 > > │ / f_linen... │
00:00:36 verbose #421 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #422 > >
00:00:36 verbose #423 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #424 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #425 > > │ ## test_zeta_at_2_minus2 │
00:00:36 verbose #426 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #427 > >
00:00:36 verbose #428 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #429 > > inl test_zeta_at_2_minus2 log = run_test log (6u8, 5u8) fun zeta, gamma =>
00:00:36 verbose #430 > > inl s = .^(2, -2)
00:00:36 verbose #431 > > inl result = zeta s
00:00:36 verbose #432 > >
00:00:36 verbose #433 > > (re result - 0.8673) |> abs |> _assert_lt 0.001
00:00:36 verbose #434 > > (im result - 0.2750) |> abs |> _assert_lt 0.001
00:00:37 verbose #435 > 00:00:36 debug #15 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/162226d58e9fc49a1d03b37a4c59612adbd7890ffc2cd96b254fe3f780acc574/main.spi
00:00:37 verbose #436 > >
00:00:37 verbose #437 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:37 verbose #438 > > //// test
00:00:37 verbose #439 > > ///! rust -d num-complex pyo3
00:00:37 verbose #440 > >
00:00:37 verbose #441 > > types ()
00:00:37 verbose #442 > > test_zeta_at_2_minus2 true
00:00:38 verbose #443 > 00:00:36 debug #16 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ebd2ab1431bb0acebe4be0b3e77624c50ddad3433d0411aa369bf9f9206f6ef9/main.spi
00:00:42 verbose #444 > >
00:00:42 verbose #445 > > ╭─[ 5.06s - return value ]─────────────────────────────────────────────────────╮
00:00:42 verbose #446 > > │ zeta_ / s: (2.0, -2.0) / count: 0 │
00:00:42 verbose #447 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:00:42 verbose #448 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:00:42 verbose #449 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:42 verbose #450 > > │ / arg: None │
00:00:42 verbose #451 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:00:42 verbose #452 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:00:42 verbose #453 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:42 verbose #454 > > │ / arg: None │
00:00:42 verbose #455 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:00:42 verbose #456 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:00:42 verbose #457 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:42 verbose #458 > > │ / arg: None │
00:00:42 verbose #459 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:00:42 verbose #460 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:00:42 verbose #461 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:42 verbose #462 > > │ / arg: None │
00:00:42 verbose #463 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:00:42 verbose #464 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:00:42 verbose #465 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:42 verbose #466 > > │ / arg: None │
00:00:42 verbose #467 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2-2j), kwargs={}, name='zeta' │
00:00:42 verbose #468 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:00:42 verbose #469 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:00:42 verbose #470 > > │ / arg: None │
00:00:42 verbose #471 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2-2j), kwargs={}, name='zeta' │
00:00:42 verbose #472 > > │ / f_line... │
00:00:42 verbose #473 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 verbose #474 > >
00:00:42 verbose #475 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:42 verbose #476 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:42 verbose #477 > > │ ## test_trivial_zero_at_negative_even___ │
00:00:42 verbose #478 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 verbose #479 > >
00:00:42 verbose #480 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:42 verbose #481 > > inl test_trivial_zero_at_negative_even___ log = run_test log (2u8, 1u8) fun
00:00:42 verbose #482 > > zeta, gamma =>
00:00:42 verbose #483 > > (join listm'.init_series -2f64 -40 -2)
00:00:42 verbose #484 > > |> listm.iter fun n =>
00:00:42 verbose #485 > > inl s = .^(n, 0)
00:00:42 verbose #486 > > inl result = zeta s
00:00:42 verbose #487 > >
00:00:42 verbose #488 > > result |> re |> _assert_eq 0
00:00:42 verbose #489 > > result |> im |> _assert_eq 0
00:00:43 verbose #490 > 00:00:42 debug #17 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c6c23837aebe0ddd241dfd148e84803e8364bd1f16f26fdb9c67798df197998a/main.spi
00:00:43 verbose #491 > >
00:00:43 verbose #492 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:43 verbose #493 > > //// test
00:00:43 verbose #494 > > ///! rust -d num-complex pyo3
00:00:43 verbose #495 > >
00:00:43 verbose #496 > > types ()
00:00:43 verbose #497 > > test_trivial_zero_at_negative_even___ true
00:00:43 verbose #498 > 00:00:42 debug #18 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b15c7a4a4778b2da0e9312612abe7fc97d0de837a144ae042abd609297c57e6b/main.spi
00:00:49 verbose #499 > >
00:00:49 verbose #500 > > ╭─[ 6.08s - return value ]─────────────────────────────────────────────────────╮
00:00:49 verbose #501 > > │ zeta_ / s: (-2.0, 0.0) / count: 0 │
00:00:49 verbose #502 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:00:49 verbose #503 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:00:49 verbose #504 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:49 verbose #505 > > │ / arg: None │
00:00:49 verbose #506 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:00:49 verbose #507 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:00:49 verbose #508 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:49 verbose #509 > > │ / arg: None │
00:00:49 verbose #510 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:00:49 verbose #511 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:00:49 verbose #512 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:49 verbose #513 > > │ / arg: None │
00:00:49 verbose #514 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:00:49 verbose #515 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:00:49 verbose #516 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:49 verbose #517 > > │ / arg: None │
00:00:49 verbose #518 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:00:49 verbose #519 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:00:49 verbose #520 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:49 verbose #521 > > │ / arg: None │
00:00:49 verbose #522 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(-2+0j), kwargs={}, │
00:00:49 verbose #523 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:00:49 verbose #524 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:00:49 verbose #525 > > │ \mpmath\functions\zeta.py / arg: None │
00:00:49 verbose #526 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(-2+0j), kwargs={}, │
00:00:49 verbose #527 > > │ name='zeta' /... │
00:00:49 verbose #528 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:49 verbose #529 > >
00:00:49 verbose #530 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:49 verbose #531 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:49 verbose #532 > > │ ## test_non_trivial_zero___ │
00:00:49 verbose #533 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:49 verbose #534 > >
00:00:49 verbose #535 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:49 verbose #536 > > inl test_non_trivial_zero___ log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:00:49 verbose #537 > > ;[[
00:00:49 verbose #538 > > .^(0.5, 14.134725)
00:00:49 verbose #539 > > .^(0.5, 21.022040)
00:00:49 verbose #540 > > .^(0.5, 25.010857)
00:00:49 verbose #541 > > .^(0.5, 30.424876)
00:00:49 verbose #542 > > .^(0.5, 32.935062)
00:00:49 verbose #543 > > .^(0.5, 37.586178)
00:00:49 verbose #544 > > ]]
00:00:49 verbose #545 > > |> fun x => a x : _ i32 _
00:00:49 verbose #546 > > |> am.iter fun x =>
00:00:49 verbose #547 > > inl result = zeta x
00:00:49 verbose #548 > > result |> re |> abs |> _assert_lt 0.0001
00:00:49 verbose #549 > > result |> im |> abs |> _assert_lt 0.0001
00:00:49 verbose #550 > 00:00:48 debug #19 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/da8db4d487ce11b8b32ed7d88cba4d5cb64e69ce2ba0da022eebbacfe8c214c2/main.spi
00:00:49 verbose #551 > >
00:00:49 verbose #552 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:49 verbose #553 > > //// test
00:00:49 verbose #554 > > ///! rust -d num-complex pyo3
00:00:49 verbose #555 > >
00:00:49 verbose #556 > > types ()
00:00:49 verbose #557 > > test_non_trivial_zero___ true
00:00:50 verbose #558 > 00:00:49 debug #20 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/62f1521e3f058449af4740da05cfebfb250c54cc62dc5f5af3933d7abdc5eee3/main.spi
00:00:55 verbose #559 > >
00:00:55 verbose #560 > > ╭─[ 5.39s - return value ]─────────────────────────────────────────────────────╮
00:00:55 verbose #561 > > │ zeta_ / s: (0.5, 14.134725) / count: 0 │
00:00:55 verbose #562 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:00:55 verbose #563 > > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:00:55 verbose #564 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:55 verbose #565 > > │ / arg: None │
00:00:55 verbose #566 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:00:55 verbose #567 > > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:00:55 verbose #568 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:00:55 verbose #569 > > │ / arg: None │
00:00:55 verbose #570 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:00:55 verbose #571 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │
00:00:55 verbose #572 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:00:55 verbose #573 > > │ f_back.f_code.co_filename: / arg: None │
00:00:55 verbose #574 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:00:55 verbose #575 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │
00:00:55 verbose #576 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:00:55 verbose #577 > > │ f_back.f_code.co_filename: / arg: None │
00:00:55 verbose #578 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:00:55 verbose #579 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │
00:00:55 verbose #580 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:00:55 verbose #581 > > │ f_back.f_code.co_filename: / arg: None │
00:00:55 verbose #582 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.5+14.134725j), kwargs={}, │
00:00:55 verbose #583 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:00:55 verbose #584 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:00:55 verbose #585 > > │ \mpmath\functions\zeta.py / arg: None │
00:00:55 verbose #586 > > │ line(zeta_) / f_code... │
00:00:55 verbose #587 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:55 verbose #588 > >
00:00:55 verbose #589 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:55 verbose #590 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:55 verbose #591 > > │ ## test_real_part_greater_than_one___ │
00:00:55 verbose #592 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:55 verbose #593 > >
00:00:55 verbose #594 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:55 verbose #595 > > inl test_real_part_greater_than_one___ log = run_test log (3u8, 2u8) fun zeta,
00:00:55 verbose #596 > > gamma =>
00:00:55 verbose #597 > > inl points = ;[[2; 3; 4; 5; 10; 20; 50]]
00:00:55 verbose #598 > > (a points : _ i32 _)
00:00:55 verbose #599 > > |> am.iter fun point =>
00:00:55 verbose #600 > > inl s = .^(point, 0)
00:00:55 verbose #601 > > inl result = zeta s
00:00:55 verbose #602 > > result |> re |> _assert_gt 0
00:00:55 verbose #603 > > result |> im |> _assert_eq 0
00:00:55 verbose #604 > 00:00:54 debug #21 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4a4d362d870940211fcf084be9da5a8f90c03170687a1b8da5f6f33163f7d8c4/main.spi
00:00:56 verbose #605 > >
00:00:56 verbose #606 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:56 verbose #607 > > //// test
00:00:56 verbose #608 > > ///! rust -d num-complex pyo3
00:00:56 verbose #609 > >
00:00:56 verbose #610 > > types ()
00:00:56 verbose #611 > > test_real_part_greater_than_one___ true
00:00:56 verbose #612 > 00:00:55 debug #22 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/51f412b943b52730997e89fd94a82b0ec4e9692a6e262ba9e8f5eb72efa17973/main.spi
00:01:01 verbose #613 > >
00:01:01 verbose #614 > > ╭─[ 5.29s - return value ]─────────────────────────────────────────────────────╮
00:01:01 verbose #615 > > │ zeta_ / s: (2.0, 0.0) / count: 0 │
00:01:01 verbose #616 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:01 verbose #617 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:01 verbose #618 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:01 verbose #619 > > │ / arg: None │
00:01:01 verbose #620 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:01 verbose #621 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:01 verbose #622 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:01 verbose #623 > > │ / arg: None │
00:01:01 verbose #624 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:01 verbose #625 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:01:01 verbose #626 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:01 verbose #627 > > │ / arg: None │
00:01:01 verbose #628 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:01 verbose #629 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:01:01 verbose #630 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:01 verbose #631 > > │ / arg: None │
00:01:01 verbose #632 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:01 verbose #633 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:01:01 verbose #634 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:01 verbose #635 > > │ / arg: None │
00:01:01 verbose #636 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:01:01 verbose #637 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:01:01 verbose #638 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:01:01 verbose #639 > > │ / arg: None │
00:01:01 verbose #640 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:01:01 verbose #641 > > │ / f_linen... │
00:01:01 verbose #642 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:01 verbose #643 > >
00:01:01 verbose #644 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:01 verbose #645 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:01 verbose #646 > > │ ## test_zeta_at_1___ │
00:01:01 verbose #647 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:01 verbose #648 > >
00:01:01 verbose #649 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:01 verbose #650 > > inl test_zeta_at_1___ log = run_test log (6u8, 5u8) fun zeta, gamma =>
00:01:01 verbose #651 > > inl s = .^(1, 0)
00:01:01 verbose #652 > > inl result = zeta s
00:01:01 verbose #653 > > result |> re |> _assert_eq limit.max
00:01:01 verbose #654 > > result |> im |> _assert_eq 0
00:01:01 verbose #655 > 00:01:00 debug #23 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2197a04034530299699cc3bd18b653d7c0eaecb16a541593390fccad27289bea/main.spi
00:01:02 verbose #656 > >
00:01:02 verbose #657 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:02 verbose #658 > > //// test
00:01:02 verbose #659 > > ///! rust -d num-complex pyo3
00:01:02 verbose #660 > >
00:01:02 verbose #661 > > types ()
00:01:02 verbose #662 > > test_zeta_at_1___ true
00:01:02 verbose #663 > 00:01:01 debug #24 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/46134be2fcea56b3e86e9ca291b26df7f2b3b5c85fca0eed08a38c3dcf31b7fd/main.spi
00:01:07 verbose #664 > >
00:01:07 verbose #665 > > ╭─[ 5.08s - return value ]─────────────────────────────────────────────────────╮
00:01:07 verbose #666 > > │ zeta_ / s: (1.0, 0.0) / count: 0 │
00:01:07 verbose #667 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:01:07 verbose #668 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:07 verbose #669 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:07 verbose #670 > > │ / arg: None │
00:01:07 verbose #671 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:01:07 verbose #672 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:07 verbose #673 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:07 verbose #674 > > │ / arg: None │
00:01:07 verbose #675 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:01:07 verbose #676 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:01:07 verbose #677 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:07 verbose #678 > > │ / arg: None │
00:01:07 verbose #679 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:01:07 verbose #680 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:01:07 verbose #681 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:07 verbose #682 > > │ / arg: None │
00:01:07 verbose #683 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:01:07 verbose #684 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:01:07 verbose #685 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:07 verbose #686 > > │ / arg: None │
00:01:07 verbose #687 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(1+0j), kwargs={}, name='zeta' │
00:01:07 verbose #688 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:01:07 verbose #689 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:01:07 verbose #690 > > │ / arg: None │
00:01:07 verbose #691 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(1+0j), kwargs={}, name='zeta' │
00:01:07 verbose #692 > > │ / f_linen... │
00:01:07 verbose #693 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:07 verbose #694 > >
00:01:07 verbose #695 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:07 verbose #696 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:07 verbose #697 > > │ ## test_symmetry_across_real_axis___ │
00:01:07 verbose #698 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:07 verbose #699 > >
00:01:07 verbose #700 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:07 verbose #701 > > inl test_symmetry_across_real_axis___ log = run_test log (8u8, 7u8) fun zeta,
00:01:07 verbose #702 > > gamma =>
00:01:07 verbose #703 > > inl s = .^(2, 10)
00:01:07 verbose #704 > > inl result_positive_im = zeta s
00:01:07 verbose #705 > > inl result_negative_im = zeta .^(re s, -(im s))
00:01:07 verbose #706 > > inl conj = result_negative_im |> conj
00:01:07 verbose #707 > > result_positive_im |> re |> _assert_eq (conj |> re)
00:01:07 verbose #708 > > result_positive_im |> im |> _assert_eq (conj |> im)
00:01:07 verbose #709 > 00:01:06 debug #25 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cfef6ee0382242206af8f136a00bef9d1c5c90d95f6a64f559069fcdf9c7f8ec/main.spi
00:01:07 verbose #710 > >
00:01:07 verbose #711 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:07 verbose #712 > > //// test
00:01:07 verbose #713 > > ///! rust -d num-complex pyo3
00:01:07 verbose #714 > >
00:01:07 verbose #715 > > types ()
00:01:07 verbose #716 > > test_symmetry_across_real_axis___ true
00:01:08 verbose #717 > 00:01:07 debug #26 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a7d1f61a535ae172d542e488d1af4d1b238f2ab95a4057dc8593a9101958d66f/main.spi
00:01:12 verbose #718 > >
00:01:12 verbose #719 > > ╭─[ 5.00s - return value ]─────────────────────────────────────────────────────╮
00:01:12 verbose #720 > > │ zeta_ / s: (2.0, 10.0) / count: 0 │
00:01:12 verbose #721 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:01:12 verbose #722 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:12 verbose #723 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:12 verbose #724 > > │ / arg: None │
00:01:12 verbose #725 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:01:12 verbose #726 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:12 verbose #727 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:12 verbose #728 > > │ / arg: None │
00:01:12 verbose #729 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:01:12 verbose #730 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:01:12 verbose #731 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:12 verbose #732 > > │ / arg: None │
00:01:12 verbose #733 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:01:12 verbose #734 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:01:12 verbose #735 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:12 verbose #736 > > │ / arg: None │
00:01:12 verbose #737 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:01:12 verbose #738 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:01:12 verbose #739 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:12 verbose #740 > > │ / arg: None │
00:01:12 verbose #741 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+10j), kwargs={}, │
00:01:12 verbose #742 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:01:12 verbose #743 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:01:12 verbose #744 > > │ \mpmath\functions\zeta.py / arg: None │
00:01:12 verbose #745 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+10j), kwargs={}, │
00:01:12 verbose #746 > > │ name='zeta' /... │
00:01:12 verbose #747 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:12 verbose #748 > >
00:01:12 verbose #749 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:12 verbose #750 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:12 verbose #751 > > │ ## test_behavior_near_origin___ │
00:01:12 verbose #752 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:12 verbose #753 > >
00:01:12 verbose #754 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:12 verbose #755 > > inl test_behavior_near_origin___ log = run_test log (6u8, 5u8) fun zeta, gamma
00:01:12 verbose #756 > > =>
00:01:12 verbose #757 > > inl s = .^(0.01, 0.01)
00:01:12 verbose #758 > > inl result = zeta s
00:01:12 verbose #759 > > result |> re |> _assert_lt limit.max
00:01:12 verbose #760 > > result |> im |> _assert_lt limit.max
00:01:13 verbose #761 > 00:01:12 debug #27 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d0cd8fbd64b11931f53544c8f7050938165a3b48382c7683f95929a9dce932a/main.spi
00:01:13 verbose #762 > >
00:01:13 verbose #763 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:13 verbose #764 > > //// test
00:01:13 verbose #765 > > ///! rust -d num-complex pyo3
00:01:13 verbose #766 > >
00:01:13 verbose #767 > > types ()
00:01:13 verbose #768 > > test_behavior_near_origin___ true
00:01:14 verbose #769 > 00:01:12 debug #28 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6cafd898e2b4e8ec89dd2f0f50d8c2ee02e8012f9ea3b3b6ff6e5b960856c57f/main.spi
00:01:18 verbose #770 > >
00:01:18 verbose #771 > > ╭─[ 5.28s - return value ]─────────────────────────────────────────────────────╮
00:01:18 verbose #772 > > │ zeta_ / s: (0.01, 0.01) / count: 0 │
00:01:18 verbose #773 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:01:18 verbose #774 > > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:18 verbose #775 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:18 verbose #776 > > │ / arg: None │
00:01:18 verbose #777 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:01:18 verbose #778 > > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:18 verbose #779 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:18 verbose #780 > > │ / arg: None │
00:01:18 verbose #781 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:01:18 verbose #782 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │
00:01:18 verbose #783 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:01:18 verbose #784 > > │ f_back.f_code.co_filename: / arg: None │
00:01:18 verbose #785 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:01:18 verbose #786 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │
00:01:18 verbose #787 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:01:18 verbose #788 > > │ f_back.f_code.co_filename: / arg: None │
00:01:18 verbose #789 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:01:18 verbose #790 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │
00:01:18 verbose #791 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:01:18 verbose #792 > > │ f_back.f_code.co_filename: / arg: None │
00:01:18 verbose #793 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.01+0.01j), kwargs={}, │
00:01:18 verbose #794 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:01:18 verbose #795 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:01:18 verbose #796 > > │ \mpmath\functions\zeta.py / arg: None │
00:01:18 verbose #797 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(0... │
00:01:18 verbose #798 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:18 verbose #799 > >
00:01:18 verbose #800 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:18 verbose #801 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:18 verbose #802 > > │ ## test_imaginary_axis │
00:01:18 verbose #803 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:18 verbose #804 > >
00:01:18 verbose #805 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:18 verbose #806 > > inl test_imaginary_axis log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:01:18 verbose #807 > > (join a ;[[10; 20; 30; 40; 50; 60; 70; 80; 90; 100]] : _ i32 _)
00:01:18 verbose #808 > > |> am.iter fun s =>
00:01:18 verbose #809 > > inl s = .^(0, s)
00:01:18 verbose #810 > > inl result = zeta s
00:01:18 verbose #811 > > result |> re |> _assert_ne 0
00:01:18 verbose #812 > > result |> im |> _assert_ne 0
00:01:19 verbose #813 > 00:01:18 debug #29 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f29168860d263879fa77132153e85116276c18e52133acbf539945d5953eefb0/main.spi
00:01:19 verbose #814 > >
00:01:19 verbose #815 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:19 verbose #816 > > //// test
00:01:19 verbose #817 > > ///! rust -d num-complex pyo3
00:01:19 verbose #818 > >
00:01:19 verbose #819 > > types ()
00:01:19 verbose #820 > > test_imaginary_axis true
00:01:20 verbose #821 > 00:01:18 debug #30 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e4a9335c6eff9216e6ec0500bc45296527f98ba0912c7ec397b7c89dc6f48cf0/main.spi
00:01:25 verbose #822 > >
00:01:25 verbose #823 > > ╭─[ 5.62s - return value ]─────────────────────────────────────────────────────╮
00:01:25 verbose #824 > > │ zeta_ / s: (0.0, 10.0) / count: 0 │
00:01:25 verbose #825 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:01:25 verbose #826 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:25 verbose #827 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:25 verbose #828 > > │ / arg: None │
00:01:25 verbose #829 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:01:25 verbose #830 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:25 verbose #831 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:25 verbose #832 > > │ / arg: None │
00:01:25 verbose #833 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:01:25 verbose #834 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:01:25 verbose #835 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:25 verbose #836 > > │ / arg: None │
00:01:25 verbose #837 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:01:25 verbose #838 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:01:25 verbose #839 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:25 verbose #840 > > │ / arg: None │
00:01:25 verbose #841 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:01:25 verbose #842 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:01:25 verbose #843 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:25 verbose #844 > > │ / arg: None │
00:01:25 verbose #845 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=10j, kwargs={}, name='zeta' / │
00:01:25 verbose #846 > > │ f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:01:25 verbose #847 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:01:25 verbose #848 > > │ / arg: None │
00:01:25 verbose #849 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=10j, kwargs={}, name='zeta' / │
00:01:25 verbose #850 > > │ f_lineno: 1114 / f_code.co_... │
00:01:25 verbose #851 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:25 verbose #852 > >
00:01:25 verbose #853 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:25 verbose #854 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:25 verbose #855 > > │ ## test_critical_strip │
00:01:25 verbose #856 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:25 verbose #857 > >
00:01:25 verbose #858 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:25 verbose #859 > > inl test_critical_strip log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:01:25 verbose #860 > > ;[[
00:01:25 verbose #861 > > .^(0.5, 14.134725)
00:01:25 verbose #862 > > .^(0.75, 20.5)
00:01:25 verbose #863 > > .^(1.25, 30.1)
00:01:25 verbose #864 > > .^(0.25, 40.0)
00:01:25 verbose #865 > > .^(1.0, 50.0)
00:01:25 verbose #866 > > ]]
00:01:25 verbose #867 > > |> fun x => a x : _ i32 _
00:01:25 verbose #868 > > |> am.iter fun s =>
00:01:25 verbose #869 > > inl result = zeta s
00:01:25 verbose #870 > > result |> re |> _assert_ne 0
00:01:25 verbose #871 > > result |> im |> _assert_ne 0
00:01:25 verbose #872 > 00:01:24 debug #31 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8d0304a3cc7e7616ebd86bb30158a1ed8f06d5f40cf75238e22d54d1a82f8040/main.spi
00:01:25 verbose #873 > >
00:01:25 verbose #874 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:25 verbose #875 > > //// test
00:01:25 verbose #876 > > ///! rust -d num-complex pyo3
00:01:25 verbose #877 > >
00:01:25 verbose #878 > > types ()
00:01:25 verbose #879 > > test_critical_strip true
00:01:26 verbose #880 > 00:01:25 debug #32 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d2cc0db0ebc8cf631f20e34f74e6be32631b2308bdeb7554d00c39bc4b31e3a7/main.spi
00:01:31 verbose #881 > >
00:01:31 verbose #882 > > ╭─[ 5.25s - return value ]─────────────────────────────────────────────────────╮
00:01:31 verbose #883 > > │ zeta_ / s: (0.5, 14.134725) / count: 0 │
00:01:31 verbose #884 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:01:31 verbose #885 > > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:31 verbose #886 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:31 verbose #887 > > │ / arg: None │
00:01:31 verbose #888 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:01:31 verbose #889 > > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:31 verbose #890 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:31 verbose #891 > > │ / arg: None │
00:01:31 verbose #892 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:01:31 verbose #893 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │
00:01:31 verbose #894 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:01:31 verbose #895 > > │ f_back.f_code.co_filename: / arg: None │
00:01:31 verbose #896 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:01:31 verbose #897 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │
00:01:31 verbose #898 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:01:31 verbose #899 > > │ f_back.f_code.co_filename: / arg: None │
00:01:31 verbose #900 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:01:31 verbose #901 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │
00:01:31 verbose #902 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:01:31 verbose #903 > > │ f_back.f_code.co_filename: / arg: None │
00:01:31 verbose #904 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.5+14.134725j), kwargs={}, │
00:01:31 verbose #905 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:01:31 verbose #906 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:01:31 verbose #907 > > │ \mpmath\functions\zeta.py / arg: None │
00:01:31 verbose #908 > > │ line(zeta_) / f_code... │
00:01:31 verbose #909 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:31 verbose #910 > >
00:01:31 verbose #911 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:31 verbose #912 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:31 verbose #913 > > │ ## test_reflection_formula_for_specific_value │
00:01:31 verbose #914 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:31 verbose #915 > >
00:01:31 verbose #916 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:31 verbose #917 > > inl test_reflection_formula_for_specific_value log = run_test log (3u8, 2u8) fun
00:01:31 verbose #918 > > zeta, gamma =>
00:01:31 verbose #919 > > ;[[
00:01:31 verbose #920 > > .^(3, 4)
00:01:31 verbose #921 > > .^(2.5, -3.5)
00:01:31 verbose #922 > > .^(1.5, 2.5)
00:01:31 verbose #923 > > .^(0.5, 14.134725)
00:01:31 verbose #924 > > ]]
00:01:31 verbose #925 > > |> fun x => a x : _ i32 _
00:01:31 verbose #926 > > |> am.iter fun s =>
00:01:31 verbose #927 > > inl lhs = zeta s
00:01:31 verbose #928 > > inl reflection_coefficient =
00:01:31 verbose #929 > > (.^(2, 0) .** s)
00:01:31 verbose #930 > > .* (.^(pi, 0) .** (s .- .^(1, 0)))
00:01:31 verbose #931 > > .* (.^(pi, 0) .* s ./ .^(2, 0) |> complex_sin)
00:01:31 verbose #932 > > .* gamma (.^(1, 0) .- s)
00:01:31 verbose #933 > >
00:01:31 verbose #934 > > inl one_minus_s = .^(1 - re s, -(im s))
00:01:31 verbose #935 > > inl rhs = reflection_coefficient .* zeta one_minus_s
00:01:31 verbose #936 > >
00:01:31 verbose #937 > > re lhs - re rhs |> abs |> _assert_lt 0.0001
00:01:31 verbose #938 > > im lhs - im rhs |> abs |> _assert_lt 0.0001
00:01:31 verbose #939 > 00:01:30 debug #33 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d1f082d84dde9431613277fecd55074ac63ea5dc75b5e8e14bab9b6312510a19/main.spi
00:01:31 verbose #940 > >
00:01:31 verbose #941 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:31 verbose #942 > > //// test
00:01:31 verbose #943 > > ///! rust -d num-complex pyo3
00:01:31 verbose #944 > >
00:01:31 verbose #945 > > types ()
00:01:31 verbose #946 > > test_reflection_formula_for_specific_value true
00:01:32 verbose #947 > 00:01:31 debug #34 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ee68b20a4e92e00e6ebe113d666f749af3c3935620dd006bfc7a8eec316e77fc/main.spi
00:01:37 verbose #948 > >
00:01:37 verbose #949 > > ╭─[ 5.47s - return value ]─────────────────────────────────────────────────────╮
00:01:37 verbose #950 > > │ zeta_ / s: (3.0, 4.0) / count: 0 │
00:01:37 verbose #951 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:01:37 verbose #952 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:37 verbose #953 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:37 verbose #954 > > │ / arg: None │
00:01:37 verbose #955 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:01:37 verbose #956 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:37 verbose #957 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:37 verbose #958 > > │ / arg: None │
00:01:37 verbose #959 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:01:37 verbose #960 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:01:37 verbose #961 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:37 verbose #962 > > │ / arg: None │
00:01:37 verbose #963 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:01:37 verbose #964 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:01:37 verbose #965 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:37 verbose #966 > > │ / arg: None │
00:01:37 verbose #967 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:01:37 verbose #968 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:01:37 verbose #969 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:37 verbose #970 > > │ / arg: None │
00:01:37 verbose #971 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(3+4j), kwargs={}, name='zeta' │
00:01:37 verbose #972 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:01:37 verbose #973 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:01:37 verbose #974 > > │ / arg: None │
00:01:37 verbose #975 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(3+4j), kwargs={}, name='zeta' │
00:01:37 verbose #976 > > │ / f_linen... │
00:01:37 verbose #977 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:37 verbose #978 > >
00:01:37 verbose #979 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:37 verbose #980 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:37 verbose #981 > > │ ## test_euler_product_formula │
00:01:37 verbose #982 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:37 verbose #983 > >
00:01:37 verbose #984 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:37 verbose #985 > > inl test_euler_product_formula log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:01:37 verbose #986 > > inl s_values = ;[[2; 2.5; 3; 3.5; 4; 4.5; 5]]
00:01:37 verbose #987 > > inl primes = ;[[2; 3; 5; 7; 11; 13; 17; 19; 23; 29; 31; 37; 41; 43; 47; 53;
00:01:37 verbose #988 > > 59; 61; 67; 71]]
00:01:37 verbose #989 > > (a s_values : _ i32 _)
00:01:37 verbose #990 > > |> am.iter fun s_re =>
00:01:37 verbose #991 > > inl s = .^(s_re, 0)
00:01:37 verbose #992 > > inl product =
00:01:37 verbose #993 > > (1, (a primes : _ i32 _))
00:01:37 verbose #994 > > ||> am.fold fun acc x =>
00:01:37 verbose #995 > > acc * 1 / (1 - x ** -s_re)
00:01:37 verbose #996 > >
00:01:37 verbose #997 > > inl result = zeta s
00:01:37 verbose #998 > > re result - product |> abs |> _assert_lt 0.01
00:01:37 verbose #999 > > result |> im |> _assert_lt 0.01
00:01:37 verbose #1000 > 00:01:36 debug #35 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a49af75d8d5f6b70dbd4617a81b286dcfa61fa63d963c5ed6793f94aa1b34e3d/main.spi
00:01:37 verbose #1001 > >
00:01:37 verbose #1002 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:37 verbose #1003 > > //// test
00:01:37 verbose #1004 > > ///! rust -d num-complex pyo3
00:01:37 verbose #1005 > >
00:01:37 verbose #1006 > > types ()
00:01:37 verbose #1007 > > test_euler_product_formula true
00:01:38 verbose #1008 > 00:01:37 debug #36 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c6a1a59f1aa1fcb2020b4a236e82e07c68a993cb9da2c3d0abdb7407e8973915/main.spi
00:01:43 verbose #1009 > >
00:01:43 verbose #1010 > > ╭─[ 5.56s - return value ]─────────────────────────────────────────────────────╮
00:01:43 verbose #1011 > > │ zeta_ / s: (2.0, 0.0) / count: 0 │
00:01:43 verbose #1012 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:43 verbose #1013 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:01:43 verbose #1014 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:43 verbose #1015 > > │ / arg: None │
00:01:43 verbose #1016 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:43 verbose #1017 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:01:43 verbose #1018 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:43 verbose #1019 > > │ / arg: None │
00:01:43 verbose #1020 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:43 verbose #1021 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:01:43 verbose #1022 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:43 verbose #1023 > > │ / arg: None │
00:01:43 verbose #1024 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:43 verbose #1025 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:01:43 verbose #1026 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:43 verbose #1027 > > │ / arg: None │
00:01:43 verbose #1028 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:01:43 verbose #1029 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:01:43 verbose #1030 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:01:43 verbose #1031 > > │ / arg: None │
00:01:43 verbose #1032 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:01:43 verbose #1033 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:01:43 verbose #1034 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:01:43 verbose #1035 > > │ / arg: None │
00:01:43 verbose #1036 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:01:43 verbose #1037 > > │ / f_linen... │
00:01:43 verbose #1038 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:43 verbose #1039 > >
00:01:43 verbose #1040 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:43 verbose #1041 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:43 verbose #1042 > > │ ## graph │
00:01:43 verbose #1043 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:43 verbose #1044 > >
00:01:43 verbose #1045 > > ── mermaid ─────────────────────────────────────────────────────────────────────
00:01:43 verbose #1046 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:43 verbose #1047 > > │ <div class="mermaidMarkdownContainer" style="background-color:white"> │
00:01:43 verbose #1048 > > │ <link rel="stylesheet" │
00:01:43 verbose #1049 > > │ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min. │
00:01:43 verbose #1050 > > │ css"> │
00:01:43 verbose #1051 > > │ <div id="3ea11f9b8a1040e995159ec8954a22de"></div> │
00:01:43 verbose #1052 > > │ <script type="module"> │
00:01:43 verbose #1053 > > │ │
00:01:43 verbose #1054 > > │ import mermaid from │
00:01:43 verbose #1055 > > │ 'https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.esm.min.mjs'; │
00:01:43 verbose #1056 > > │ let renderTarget = │
00:01:43 verbose #1057 > > │ document.getElementById('3ea11f9b8a1040e995159ec8954a22de'); │
00:01:43 verbose #1058 > > │ try { │
00:01:43 verbose #1059 > > │ const {svg, bindFunctions} = await │
00:01:43 verbose #1060 > > │ mermaid.mermaidAPI.render( │
00:01:43 verbose #1061 > > │ 'mermaid_3ea11f9b8a1040e995159ec8954a22de', │
00:01:43 verbose #1062 > > │ `graph TD │
00:01:43 verbose #1063 > > │ zeta("zeta()") --> convert │
00:01:43 verbose #1064 > > │ zeta --> f["f()"] │
00:01:43 verbose #1065 > > │ f --> mpc_f["mpc_zeta()"] │
00:01:43 verbose #1066 > > │ f --> mpf_f["mpf_zeta()"] │
00:01:43 verbose #1067 > > │ convert --> from_float │
00:01:43 verbose #1068 > > │ from_float --> from_man_exp │
00:01:43 verbose #1069 > > │ from_man_exp --> python_bitcount │
00:01:43 verbose #1070 > > │ python_bitcount --> _normalize │
00:01:43 verbose #1071 > > │ _normalize --> make_mpc │
00:01:43 verbose #1072 > > │ make_mpc --> mpc_zeta["mpc_zeta()"] │
00:01:43 verbose #1073 > > │ mpc_zeta --> mpf_zeta["mpf_zeta()"] │
00:01:43 verbose #1074 > > │ mpf_zeta --> to_int │
00:01:43 verbose #1075 > > │ to_int --> mpf_zeta_int["mpf_zeta_int()"] │
00:01:43 verbose #1076 > > │ mpf_zeta_int --> borwein_coefficients │
00:01:43 verbose #1077 > > │ borwein_coefficients --> from_man_exp_2("from_man_exp()") │
00:01:43 verbose #1078 > > │ from_man_exp_2 --> python_bitcount_2("python_bitcount()") │
00:01:43 verbose #1079 > > │ python_bitcount_2 --> _normalize_2("_normalize()") │
00:01:43 verbose #1080 > > │ _normalize_2 --> make_mpc_2("make_mpc()") │
00:01:43 verbose #1081 > > │ make_mpc_2 --> stop_trace │
00:01:43 verbose #1082 > > │ mpf_zeta_int --> mpf_bernoulli │
00:01:43 verbose #1083 > > │ mpf_bernoulli --> bernoulli_size │
00:01:43 verbose #1084 > > │ bernoulli_size --> mpf_rdiv_int │
00:01:43 verbose #1085 > > │ mpf_rdiv_int --> python_bitcount_3("python_bitcount()") │
00:01:43 verbose #1086 > > │ python_bitcount_3 --> _normalize1 │
00:01:43 verbose #1087 > > │ _normalize1 --> from_man_exp_3("from_man_exp()") │
00:01:43 verbose #1088 > > │ from_man_exp_3 --> _normalize_3("_normalize()") │
00:01:43 verbose #1089 > > │ _normalize_3 --> mpf_sub │
00:01:43 verbose #1090 > > │ mpf_sub --> mpf_add │
00:01:43 verbose #1091 > > │ mpf_add --> mpf_neg │
00:01:43 verbose #1092 > > │ mpf_neg --> _normalize1_2("_normalize1()") │
00:01:43 verbose #1093 > > │ _normalize1_2 --> from_int │
00:01:43 verbose #1094 > > │ from_int --> mpf_div │
00:01:43 verbose #1095 > > │ mpf_div --> python_bitcount_4("python_bitcount()") │
00:01:43 verbose #1096 > > │ python_bitcount_4 --> _normalize1_3("_normalize1()") │
00:01:43 verbose #1097 > > │ _normalize1_3 --> make_mpc_3("make_mpc()") │
00:01:43 verbose #1098 > > │ make_mpc_3 --> final_stop["stop_trace()"]`); │
00:01:43 verbose #1099 > > │ renderTarget.innerHTML = svg; │
00:01:43 verbose #1100 > > │ bindFunctions?.(renderTarget); │
00:01:43 verbose #1101 > > │ } │
00:01:43 verbose #1102 > > │ catch (error) { │
00:01:43 verbose #1103 > > │ console.log(error); │
00:01:43 verbose #1104 > > │ } │
00:01:43 verbose #1105 > > │ </script> │
00:01:43 verbose #1106 > > │ </div> │
00:01:43 verbose #1107 > > │ │
00:01:43 verbose #1108 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:43 verbose #1109 > >
00:01:43 verbose #1110 > > ── mermaid ─────────────────────────────────────────────────────────────────────
00:01:43 verbose #1111 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:43 verbose #1112 > > │ <div class="mermaidMarkdownContainer" style="background-color:white"> │
00:01:43 verbose #1113 > > │ <link rel="stylesheet" │
00:01:43 verbose #1114 > > │ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min. │
00:01:43 verbose #1115 > > │ css"> │
00:01:43 verbose #1116 > > │ <div id="2ce9e7e5dc8a4092812269ba5e04ee76"></div> │
00:01:43 verbose #1117 > > │ <script type="module"> │
00:01:43 verbose #1118 > > │ │
00:01:43 verbose #1119 > > │ import mermaid from │
00:01:43 verbose #1120 > > │ 'https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.esm.min.mjs'; │
00:01:43 verbose #1121 > > │ let renderTarget = │
00:01:43 verbose #1122 > > │ document.getElementById('2ce9e7e5dc8a4092812269ba5e04ee76'); │
00:01:43 verbose #1123 > > │ try { │
00:01:43 verbose #1124 > > │ const {svg, bindFunctions} = await │
00:01:43 verbose #1125 > > │ mermaid.mermaidAPI.render( │
00:01:43 verbose #1126 > > │ 'mermaid_2ce9e7e5dc8a4092812269ba5e04ee76', │
00:01:43 verbose #1127 > > │ `graph TD │
00:01:43 verbose #1128 > > │ zeta_rust("zeta() - Rust") --> num_traits("num-traits") │
00:01:43 verbose #1129 > > │ zeta_rust --> num_bigint("num-bigint") │
00:01:43 verbose #1130 > > │ zeta_rust --> rust_decimal("rust_decimal for precision") │
00:01:43 verbose #1131 > > │ zeta_rust --> error_handling("Rust Error Handling") │
00:01:43 verbose #1132 > > │ │
00:01:43 verbose #1133 > > │ num_traits --> num_traits_usage("Use for common traits") │
00:01:43 verbose #1134 > > │ num_bigint --> bigint_operations("Arbitrary-precision arithmetic │
00:01:43 verbose #1135 > > │ operations") │
00:01:43 verbose #1136 > > │ rust_decimal --> decimal_operations("High-precision decimal operations") │
00:01:43 verbose #1137 > > │ error_handling --> result_type("Use Result<T, E> for error handling") │
00:01:43 verbose #1138 > > │ │
00:01:43 verbose #1139 > > │ bigint_operations --> convert_rust("convert() - Rust") │
00:01:43 verbose #1140 > > │ bigint_operations --> normalize_rust("_normalize() - Rust") │
00:01:43 verbose #1141 > > │ │
00:01:43 verbose #1142 > > │ convert_rust --> from_float_rust("from_float() - Rust") │
00:01:43 verbose #1143 > > │ from_float_rust --> from_man_exp_rust("from_man_exp() - Rust") │
00:01:43 verbose #1144 > > │ from_man_exp_rust --> bitcount_rust("bitcount() - Rust") │
00:01:43 verbose #1145 > > │ bitcount_rust --> normalize_rust │
00:01:43 verbose #1146 > > │ normalize_rust --> mpc_zeta_rust("mpc_zeta() - Rust") │
00:01:43 verbose #1147 > > │ mpc_zeta_rust --> mpf_zeta_rust("mpf_zeta() - Rust") │
00:01:43 verbose #1148 > > │ mpf_zeta_rust --> to_int_rust("to_int() - Rust") │
00:01:43 verbose #1149 > > │ to_int_rust --> mpf_zeta_int_rust("mpf_zeta_int() - Rust") │
00:01:43 verbose #1150 > > │ │
00:01:43 verbose #1151 > > │ mpf_zeta_int_rust --> borwein_coefficients_rust("borwein_coefficients() │
00:01:43 verbose #1152 > > │ - Rust") │
00:01:43 verbose #1153 > > │ borwein_coefficients_rust --> from_man_exp_rust_2("from_man_exp() - │
00:01:43 verbose #1154 > > │ Rust") │
00:01:43 verbose #1155 > > │ from_man_exp_rust_2 --> bitcount_rust_2("bitcount() - Rust") │
00:01:43 verbose #1156 > > │ bitcount_rust_2 --> normalize_rust_2("_normalize() - Rust") │
00:01:43 verbose #1157 > > │ normalize_rust_2 --> make_mpc_rust("make_mpc() - Rust") │
00:01:43 verbose #1158 > > │ │
00:01:43 verbose #1159 > > │ mpf_zeta_int_rust --> mpf_bernoulli_rust("mpf_bernoulli() - Rust") │
00:01:43 verbose #1160 > > │ mpf_bernoulli_rust --> bernoulli_size_rust("bernoulli_size() - Rust") │
00:01:43 verbose #1161 > > │ bernoulli_size_rust --> mpf_rdiv_int_rust("mpf_rdiv_int() - Rust") │
00:01:43 verbose #1162 > > │ mpf_rdiv_int_rust --> bitcount_rust_3("bitcount() - Rust") │
00:01:43 verbose #1163 > > │ bitcount_rust_3 --> normalize1_rust("_normalize1() - Rust") │
00:01:43 verbose #1164 > > │ normalize1_rust --> from_man_exp_rust_3("from_man_exp() - Rust") │
00:01:43 verbose #1165 > > │ from_man_exp_rust_3 --> normalize_rust_3("_normalize() - Rust") │
00:01:43 verbose #1166 > > │ normalize_rust_3 --> mpf_sub_rust("mpf_sub() - Rust") │
00:01:43 verbose #1167 > > │ mpf_sub_rust --> mpf_add_rust("mpf_add() - Rust") │
00:01:43 verbose #1168 > > │ mpf_add_rust --> mpf_neg_rust("mpf_neg() - Rust") │
00:01:43 verbose #1169 > > │ mpf_neg_rust --> normalize1_rust_2("_normalize1() - Rust") │
00:01:43 verbose #1170 > > │ normalize1_rust_2 --> from_int_rust("from_int() - Rust") │
00:01:43 verbose #1171 > > │ from_int_rust --> mpf_div_rust("mpf_div() - Rust") │
00:01:43 verbose #1172 > > │ mpf_div_rust --> bitcount_rust_4("bitcount() - Rust") │
00:01:43 verbose #1173 > > │ bitcount_rust_4 --> normalize1_rust_3("_normalize1() - Rust") │
00:01:43 verbose #1174 > > │ │
00:01:43 verbose #1175 > > │ style zeta_rust fill:#f9f,stroke:#333,stroke-width:4px │
00:01:43 verbose #1176 > > │ style num_traits fill:#bbf,stroke:#333,stroke-width:2px │
00:01:43 verbose #1177 > > │ style num_bigint fill:#bbf,stroke:#333,stroke-width:2px │
00:01:43 verbose #1178 > > │ style rust_decimal fill:#bbf,stroke:#333,stroke-width:2px │
00:01:43 verbose #1179 > > │ style error_handling fill:#bbf,stroke:#333,stroke-width:2px │
00:01:43 verbose #1180 > > │ style bigint_operations fill:#bfb,stroke:#333,stroke-width:2px │
00:01:43 verbose #1181 > > │ style decimal_operations fill:#bfb,stroke:#333,stroke-width:2px │
00:01:43 verbose #1182 > > │ style result_type fill:#bfb,stroke:#333,stroke-width:2px`); │
00:01:43 verbose #1183 > > │ renderTarget.innerHTML = svg; │
00:01:43 verbose #1184 > > │ bindFunctions?.(renderTarget); │
00:01:43 verbose #1185 > > │ } │
00:01:43 verbose #1186 > > │ catch (error) { │
00:01:43 verbose #1187 > > │ console.log(error); │
00:01:43 verbose #1188 > > │ } │
00:01:43 verbose #1189 > > │ </script> │
00:01:43 verbose #1190 > > │ </div> │
00:01:43 verbose #1191 > > │ │
00:01:43 verbose #1192 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:43 verbose #1193 > >
00:01:43 verbose #1194 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:43 verbose #1195 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:43 verbose #1196 > > │ ## tests │
00:01:43 verbose #1197 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:43 verbose #1198 > >
00:01:43 verbose #1199 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:43 verbose #1200 > > inl tests () =
00:01:43 verbose #1201 > > rust.run_tests [[
00:01:43 verbose #1202 > > "test_zeta_at_known_values_", fun _ =>
00:01:43 verbose #1203 > > test_zeta_at_known_values_ false
00:01:43 verbose #1204 > >
00:01:43 verbose #1205 > > "test_zeta_at_2_minus2", fun _ =>
00:01:43 verbose #1206 > > test_zeta_at_2_minus2 false
00:01:43 verbose #1207 > >
00:01:43 verbose #1208 > > "test_trivial_zero_at_negative_even___", fun _ =>
00:01:43 verbose #1209 > > test_trivial_zero_at_negative_even___ false
00:01:43 verbose #1210 > >
00:01:43 verbose #1211 > > "test_non_trivial_zero___", fun _ =>
00:01:43 verbose #1212 > > test_non_trivial_zero___ false
00:01:43 verbose #1213 > >
00:01:43 verbose #1214 > > "test_real_part_greater_than_one___", fun _ =>
00:01:43 verbose #1215 > > test_real_part_greater_than_one___ false
00:01:43 verbose #1216 > >
00:01:43 verbose #1217 > > "test_zeta_at_1___", fun _ =>
00:01:43 verbose #1218 > > test_zeta_at_1___ false
00:01:43 verbose #1219 > >
00:01:43 verbose #1220 > > "test_symmetry_across_real_axis___", fun _ =>
00:01:43 verbose #1221 > > test_symmetry_across_real_axis___ false
00:01:43 verbose #1222 > >
00:01:43 verbose #1223 > > "test_behavior_near_origin___", fun _ =>
00:01:43 verbose #1224 > > test_behavior_near_origin___ false
00:01:43 verbose #1225 > >
00:01:43 verbose #1226 > > "test_imaginary_axis", fun _ =>
00:01:43 verbose #1227 > > test_imaginary_axis false
00:01:43 verbose #1228 > >
00:01:43 verbose #1229 > > "test_critical_strip", fun _ =>
00:01:43 verbose #1230 > > test_critical_strip false
00:01:43 verbose #1231 > >
00:01:43 verbose #1232 > > "test_reflection_formula_for_specific_value", fun _ =>
00:01:43 verbose #1233 > > test_reflection_formula_for_specific_value false
00:01:43 verbose #1234 > >
00:01:43 verbose #1235 > > "test_euler_product_formula", fun _ =>
00:01:43 verbose #1236 > > test_euler_product_formula false
00:01:43 verbose #1237 > > ]]
00:01:44 verbose #1238 > 00:01:42 debug #37 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/da1fecddeb42fcae427f290e38e38db45ee4f1b14f2a7c427b0e80ba51b57937/main.spi
00:01:44 verbose #1239 > >
00:01:44 verbose #1240 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:44 verbose #1241 > > ///!
00:01:44 verbose #1242 > >
00:01:44 verbose #1243 > > inl main (_args : array_base string) =
00:01:44 verbose #1244 > > inl value = 1i32
00:01:44 verbose #1245 > > console.write_line ($'$"value: {!value}"' : string)
00:01:44 verbose #1246 > > 0i32
00:01:44 verbose #1247 > >
00:01:44 verbose #1248 > > inl main () =
00:01:44 verbose #1249 > > types ()
00:01:44 verbose #1250 > > $'let tests () = !tests ()' : ()
00:01:44 verbose #1251 > > $'let main args = !main args' : ()
00:01:44 verbose #1252 > 00:01:43 debug #38 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/99500355997ffa5cdc019f24fadad2ac560a18f2d11c2a70220de956f1bc1209/main.spi
00:01:45 verbose #1253 > 00:01:43 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 65982
00:01:45 verbose #1254 > 00:01:43 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/math/math.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/math/math.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:47 verbose #1255 > 00:01:45 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/math/math.dib.ipynb to html
00:01:47 verbose #1256 > 00:01:45 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:47 verbose #1257 > 00:01:45 verbose #7 ! validate(nb)
00:01:49 verbose #1258 > 00:01:47 verbose #8 ! [NbConvertApp] Writing 7276498 bytes to c:\home\git\polyglot\lib\math\math.dib.html
00:01:50 verbose #1259 > 00:01:48 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 636
00:01:50 verbose #1260 > 00:01:48 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 636
00:01:50 verbose #1261 > 00:01:48 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/math/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/math/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:51 verbose #1262 > 00:01:49 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:51 verbose #1263 > 00:01:49 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:51 verbose #1264 > 00:01:49 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 66677
00:01:51 debug #1265 execute_with_options_async / exit_code: 0 / output.Length: 71288
00:01:51 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 1
00:01:51 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:01:51 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Spi / path: math.dib
00:00:00 debug #2 parseDibCode / output: Spi / file: math.dib
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 500
00:00:02 debug #3 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #4 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 verbose #5 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # math\nopen testing\nopen rust_operators\n\ninl types () =\n global ...027let main args = !main args\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/math/math.spi"}} / result:
00:00:02 verbose #6 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/math/math.spi"}} / result:
00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/math/math.spi
00:00:03 debug #7 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #8 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #9 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #10 buildFile / takeWhileInclusive / path: math.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type core_ops_Try<'... let v2 : (string -> unit) = System.Console.WriteLine
v2 v1
0
let v0 : (unit -> unit) = closure0()
let tests () = v0 ()
let v1 : ((string []) -> int32) = closure5()
let main args = v1 args
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #11 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:06 debug #8 run_with_timeout_async / timeout: 100
00:00:00 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: math / hash: / code.Length: 142762
00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj
00:00:00 debug #1 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\math\math.fsproj" --configuration Release --output "C:\home\git\polyglot\lib\math\dist" --runtime linux-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\math")
00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:01 verbose #3 > Determining projects to restore...
00:00:04 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj (in 2.02 sec).
00:00:04 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj]
00:00:15 verbose #6 > math -> C:\home\git\polyglot\target\polyglot\builder\math\bin\Release\net9.0\linux-x64\math.dll
00:00:16 verbose #7 > math -> C:\home\git\polyglot\lib\math\dist\
00:00:16 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 666
00:00:16 debug #9 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\math\math.fsproj" --configuration Release --output "C:\home\git\polyglot\lib\math\dist" --runtime win-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\math")
00:00:17 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:17 verbose #11 > Determining projects to restore...
00:00:18 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj (in 356 ms).
00:00:18 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj]
00:00:28 verbose #14 > math -> C:\home\git\polyglot\target\polyglot\builder\math\bin\Release\net9.0\win-x64\math.dll
00:00:31 verbose #15 > math -> C:\home\git\polyglot\lib\math\dist\
00:00:32 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 662
targetDir: C:\home\git\polyglot\target\polyglot\builder\math
Fable 4.17.0: F# to Rust compiler (status: alpha)
Thanks to the contributor! @josselinauguste
Stand with Ukraine! https://standwithukraine.com.ua/
Parsing target\polyglot\builder\math\math.fsproj...
Retrieving project options from cache, in case of issues run `dotnet fable clean` or try `--noCache` option.
Project and references (13 source files) parsed in 202ms
Started Fable compilation...
Fable compilation finished in 7121ms
.\lib\spiral\crypto.fsx(490,0): (490,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\async_.fsx(112,0): (112,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\threading.fsx(167,0): (167,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(832,0): (832,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(839,0): (839,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\sm.fsx(597,0): (597,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\date_time.fsx(641,0): (641,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2843,0): (2843,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2852,0): (2852,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(711,0): (711,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(714,0): (714,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5645,0): (5645,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5684,0): (5684,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3838,0): (3838,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3851,0): (3851,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\target\polyglot\builder\math\math.fs(213,0): (215,3) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust)
Compiling math v0.0.1 (C:\home\git\polyglot\lib\math)
Finished `release` profile [optimized] target(s) in 28.78s
Running unittests math.rs (C:\home\git\polyglot\workspace\target\release\deps\math-fae85ce3614f69b4.exe)
running 12 tests
test module_b7a9935b::Math::test_critical_strip ... ok
test module_b7a9935b::Math::test_behavior_near_origin___ ... ok
test module_b7a9935b::Math::test_zeta_at_1___ ... ok
test module_b7a9935b::Math::test_zeta_at_2_minus2 ... ok
test module_b7a9935b::Math::test_non_trivial_zero___ ... ok
test module_b7a9935b::Math::test_euler_product_formula ... ok
test module_b7a9935b::Math::test_symmetry_across_real_axis___ ... ok
test module_b7a9935b::Math::test_reflection_formula_for_specific_value ... ok
test module_b7a9935b::Math::test_trivial_zero_at_negative_even___ ... ok
test module_b7a9935b::Math::test_zeta_at_known_values_ ... ok
test module_b7a9935b::Math::test_real_part_greater_than_one___ ... ok
test module_b7a9935b::Math::test_imaginary_axis ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.52s
In [ ]:
{ pwsh ../apps/plot/build.ps1 } | Invoke-Block
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) Compiling plot v0.0.1 (C:\home\git\polyglot\apps\plot) Finished `release` profile [optimized] target(s) in 23.81s
In [ ]:
{ pwsh ../apps/perf/build.ps1 } | Invoke-Block
00:00:01 debug #1 run_with_timeout_async / timeout: 500
00:00:01 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:02 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:02 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:02 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:02 debug #2 run_with_timeout_async / timeout: 100
00:00:02 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:02 debug #4 run_with_timeout_async / timeout: 100
00:00:02 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 100
00:00:03 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:03 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:03 verbose #6 > Server bound to: http://localhost:13805
00:00:03 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path Perf.dib --retries 3",
[||], None, None, true, None)
00:00:03 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Perf.dib", "--retries", "3"])
00:00:03 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/perf/Perf.dib", "--output-path", "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/perf/Perf.dib" --output-path "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:06 verbose #10 > >
00:00:06 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #13 > > │ # Perf (Polyglot) │
00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #15 > >
00:00:06 verbose #16 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:06 verbose #17 > > #!import ../../lib/fsharp/Notebooks.dib
00:00:06 verbose #18 > > #!import ../../lib/fsharp/Testing.dib
00:00:06 verbose #19 > >
00:00:06 verbose #20 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:06 verbose #21 > > #r
00:00:06 verbose #22 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:06 verbose #23 > > spNetCore.Html.Abstractions.dll"
00:00:06 verbose #24 > > #r
00:00:06 verbose #25 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #26 > > otNet.Interactive.dll"
00:00:06 verbose #27 > > #r
00:00:06 verbose #28 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #29 > > otNet.Interactive.FSharp.dll"
00:00:06 verbose #30 > > #r
00:00:06 verbose #31 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #32 > > otNet.Interactive.Formatting.dll"
00:00:06 verbose #33 > > open System
00:00:06 verbose #34 > > open System.IO
00:00:06 verbose #35 > > open System.Text
00:00:06 verbose #36 > > open Microsoft.DotNet.Interactive.Formatting
00:00:11 verbose #37 > >
00:00:11 verbose #38 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:11 verbose #39 > > #r
00:00:11 verbose #40 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:11 verbose #41 > > otNet.Interactive.FSharp.dll"
00:00:11 verbose #42 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:11 verbose #43 > > #r
00:00:11 verbose #44 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:11 verbose #45 > > otNet.Interactive.dll"
00:00:11 verbose #46 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:11 verbose #47 > >
00:00:11 verbose #48 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:11 verbose #49 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:00:12 verbose #50 > >
00:00:12 verbose #51 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #52 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:00:12 verbose #53 > > TextWriter)->fprintfn writer "%120A" x)
00:00:12 verbose #54 > >
00:00:12 verbose #55 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #56 > > //// test
00:00:12 verbose #57 > >
00:00:12 verbose #58 > > Formatter.ListExpansionLimit <- 100
00:00:12 verbose #59 > >
00:00:12 verbose #60 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #61 > > #if FABLE_COMPILER
00:00:12 verbose #62 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:12 verbose #63 > > #endif
00:00:12 verbose #64 > > type std_env_VarError = class end
00:00:12 verbose #65 > > #if FABLE_COMPILER
00:00:12 verbose #66 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:12 verbose #67 > > #endif
00:00:12 verbose #68 > > type core_any_Any = class end
00:00:12 verbose #69 > > #if FABLE_COMPILER
00:00:12 verbose #70 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:12 verbose #71 > > #endif
00:00:12 verbose #72 > > type core_ops_Try<'T> = class end
00:00:12 verbose #73 > > #if FABLE_COMPILER
00:00:12 verbose #74 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:12 verbose #75 > > #endif
00:00:12 verbose #76 > > type Func0<'T> = class end
00:00:12 verbose #77 > > #if FABLE_COMPILER
00:00:12 verbose #78 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:12 verbose #79 > > #endif
00:00:12 verbose #80 > > type Func0<'T, 'U> = class end
00:00:12 verbose #81 > > #if FABLE_COMPILER
00:00:12 verbose #82 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:12 verbose #83 > > #endif
00:00:12 verbose #84 > > type Box<'T> = class end
00:00:12 verbose #85 > > #if FABLE_COMPILER
00:00:12 verbose #86 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:12 verbose #87 > > #endif
00:00:12 verbose #88 > > type Dyn<'T> = class end
00:00:12 verbose #89 > > #if FABLE_COMPILER
00:00:12 verbose #90 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:12 verbose #91 > > #endif
00:00:12 verbose #92 > > type Send<'T> = class end
00:00:12 verbose #93 > > #if FABLE_COMPILER
00:00:12 verbose #94 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:12 verbose #95 > > #endif
00:00:12 verbose #96 > > type Fn<'T> = class end
00:00:12 verbose #97 > > #if FABLE_COMPILER
00:00:12 verbose #98 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:12 verbose #99 > > #endif
00:00:12 verbose #100 > > type FnUnit = class end
00:00:12 verbose #101 > > #if FABLE_COMPILER
00:00:12 verbose #102 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:12 verbose #103 > > #endif
00:00:12 verbose #104 > > type FnOnce<'T> = class end
00:00:12 verbose #105 > > #if FABLE_COMPILER
00:00:12 verbose #106 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:12 verbose #107 > > #endif
00:00:12 verbose #108 > > type ActionFn<'T> = class end
00:00:12 verbose #109 > > #if FABLE_COMPILER
00:00:12 verbose #110 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:12 verbose #111 > > #endif
00:00:12 verbose #112 > > type ActionFn2<'T, 'U> = class end
00:00:12 verbose #113 > > #if FABLE_COMPILER
00:00:12 verbose #114 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:12 verbose #115 > > #endif
00:00:12 verbose #116 > > type Impl<'T> = class end
00:00:12 verbose #117 > > #if FABLE_COMPILER
00:00:12 verbose #118 > > [[<Fable...
00:00:14 verbose #119 > >
00:00:14 verbose #120 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:14 verbose #121 > > #if FABLE_COMPILER
00:00:14 verbose #122 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:14 verbose #123 > > #endif
00:00:14 verbose #124 > > type core_any_Any = class end
00:00:14 verbose #125 > > #if FABLE_COMPILER
00:00:14 verbose #126 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:14 verbose #127 > > #endif
00:00:14 verbose #128 > > type core_ops_Try<'T> = class end
00:00:14 verbose #129 > > #if FABLE_COMPILER
00:00:14 verbose #130 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:14 verbose #131 > > #endif
00:00:14 verbose #132 > > type Func0<'T> = class end
00:00:14 verbose #133 > > #if FABLE_COMPILER
00:00:14 verbose #134 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:14 verbose #135 > > #endif
00:00:14 verbose #136 > > type Func0<'T, 'U> = class end
00:00:14 verbose #137 > > #if FABLE_COMPILER
00:00:14 verbose #138 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:14 verbose #139 > > #endif
00:00:14 verbose #140 > > type Box<'T> = class end
00:00:14 verbose #141 > > #if FABLE_COMPILER
00:00:14 verbose #142 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:14 verbose #143 > > #endif
00:00:14 verbose #144 > > type Dyn<'T> = class end
00:00:14 verbose #145 > > #if FABLE_COMPILER
00:00:14 verbose #146 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:14 verbose #147 > > #endif
00:00:14 verbose #148 > > type Send<'T> = class end
00:00:14 verbose #149 > > #if FABLE_COMPILER
00:00:14 verbose #150 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:14 verbose #151 > > #endif
00:00:14 verbose #152 > > type Fn<'T> = class end
00:00:14 verbose #153 > > #if FABLE_COMPILER
00:00:14 verbose #154 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:14 verbose #155 > > #endif
00:00:14 verbose #156 > > type FnUnit = class end
00:00:14 verbose #157 > > #if FABLE_COMPILER
00:00:14 verbose #158 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:14 verbose #159 > > #endif
00:00:14 verbose #160 > > type FnOnce<'T> = class end
00:00:14 verbose #161 > > #if FABLE_COMPILER
00:00:14 verbose #162 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:14 verbose #163 > > #endif
00:00:14 verbose #164 > > type ActionFn<'T> = class end
00:00:14 verbose #165 > > #if FABLE_COMPILER
00:00:14 verbose #166 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:14 verbose #167 > > #endif
00:00:14 verbose #168 > > type ActionFn2<'T, 'U> = class end
00:00:14 verbose #169 > > #if FABLE_COMPILER
00:00:14 verbose #170 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:14 verbose #171 > > #endif
00:00:14 verbose #172 > > type Impl<'T> = class end
00:00:14 verbose #173 > > #if FABLE_COMPILER
00:00:14 verbose #174 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:14 verbose #175 > > #endif
00:00:14 verbose #176 > > type Mut<'T> = class end
00:00:14 verbose #177 > > #if FABLE_COMPILER
00:00:14 verbose #178 > > [[<Fable.Core.Erase; Fable.Co...
00:00:16 verbose #179 > >
00:00:16 verbose #180 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:16 verbose #181 > > #if FABLE_COMPILER
00:00:16 verbose #182 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:00:16 verbose #183 > > #endif
00:00:16 verbose #184 > > type async_std_task_JoinHandle<'T> = class end
00:00:16 verbose #185 > > #if FABLE_COMPILER
00:00:16 verbose #186 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:00:16 verbose #187 > > #endif
00:00:16 verbose #188 > > type std_future_Future<'T> = class end
00:00:16 verbose #189 > > #if FABLE_COMPILER
00:00:16 verbose #190 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:00:16 verbose #191 > > #endif
00:00:16 verbose #192 > > type rayon_vec_IntoIter<'T> = class end
00:00:16 verbose #193 > > #if FABLE_COMPILER
00:00:16 verbose #194 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:00:16 verbose #195 > > #endif
00:00:16 verbose #196 > > type rayon_iter_Map<'T> = class end
00:00:16 verbose #197 > > #if FABLE_COMPILER
00:00:16 verbose #198 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:00:16 verbose #199 > > #endif
00:00:16 verbose #200 > > type futures_lite_stream_StreamExt = class end
00:00:16 verbose #201 > > #if FABLE_COMPILER
00:00:16 verbose #202 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:00:16 verbose #203 > > #endif
00:00:16 verbose #204 > > type futures_future_TryJoinAll<'T> = class end
00:00:16 verbose #205 > > #if FABLE_COMPILER
00:00:16 verbose #206 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:00:16 verbose #207 > > #endif
00:00:16 verbose #208 > > type futures_future_Fuse<'T> = class end
00:00:16 verbose #209 > > #if FABLE_COMPILER
00:00:16 verbose #210 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:00:16 verbose #211 > > #endif
00:00:16 verbose #212 > > type futures_future_JoinAll<'T> = class end
00:00:16 verbose #213 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:00:16 verbose #214 > > Async<System.Threading.CancellationToken> =
00:00:16 verbose #215 > > let v1 : bool = true
00:00:16 verbose #216 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:00:16 verbose #217 > >
00:00:16 verbose #218 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:16 verbose #219 > >
00:00:16 verbose #220 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:16 verbose #221 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:00:16 verbose #222 > > unbox<Async<System...
00:00:16 verbose #223 > >
00:00:16 verbose #224 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:16 verbose #225 > > #if FABLE_COMPILER
00:00:16 verbose #226 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:00:16 verbose #227 > > #endif
00:00:16 verbose #228 > > type std_thread_JoinHandle<'T> = class end
00:00:16 verbose #229 > > #if FABLE_COMPILER
00:00:16 verbose #230 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:00:16 verbose #231 > > #endif
00:00:16 verbose #232 > > type std_sync_Arc<'T> = class end
00:00:16 verbose #233 > > #if FABLE_COMPILER
00:00:16 verbose #234 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:00:16 verbose #235 > > #endif
00:00:16 verbose #236 > > type std_sync_Mutex<'T> = class end
00:00:16 verbose #237 > > #if FABLE_COMPILER
00:00:16 verbose #238 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:00:16 verbose #239 > > #endif
00:00:16 verbose #240 > > type std_sync_MutexGuard<'T> = class end
00:00:16 verbose #241 > > #if FABLE_COMPILER
00:00:16 verbose #242 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:00:16 verbose #243 > > #endif
00:00:16 verbose #244 > > type std_sync_PoisonError<'T> = class end
00:00:16 verbose #245 > > #if FABLE_COMPILER
00:00:16 verbose #246 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:00:16 verbose #247 > > #endif
00:00:16 verbose #248 > > type std_sync_mpsc_Receiver<'T> = class end
00:00:16 verbose #249 > > #if FABLE_COMPILER
00:00:16 verbose #250 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:00:16 verbose #251 > > #endif
00:00:16 verbose #252 > > type std_sync_mpsc_SendError<'T> = class end
00:00:16 verbose #253 > > #if FABLE_COMPILER
00:00:16 verbose #254 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:00:16 verbose #255 > > #endif
00:00:16 verbose #256 > > type std_sync_mpsc_Sender<'T> = class end
00:00:16 verbose #257 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:00:16 verbose #258 > > _.Dispose () = f ()
00:00:16 verbose #259 > > type [[<Struct>]] US0 =
00:00:16 verbose #260 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:00:16 verbose #261 > > | US0_1
00:00:16 verbose #262 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:00:16 verbose #263 > > let v1 : bool = true
00:00:16 verbose #264 > > let mutable _v1 : unit option = None
00:00:16 verbose #265 > >
00:00:16 verbose #266 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:16 verbose #267 > >
00:00:16 verbose #268 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:00:17 verbose #269 > >
00:00:17 verbose #270 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:17 verbose #271 > > #if FABLE_COMPILER
00:00:17 verbose #272 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:00:17 verbose #273 > > #endif
00:00:17 verbose #274 > > type reqwest_Error = class end
00:00:17 verbose #275 > > #if FABLE_COMPILER
00:00:17 verbose #276 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:00:17 verbose #277 > > #endif
00:00:17 verbose #278 > > type reqwest_RequestBuilder = class end
00:00:17 verbose #279 > > #if FABLE_COMPILER
00:00:17 verbose #280 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:00:17 verbose #281 > > #endif
00:00:17 verbose #282 > > type reqwest_Response = class end
00:00:17 verbose #283 > > #if FABLE_COMPILER
00:00:17 verbose #284 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:17 verbose #285 > > #endif
00:00:17 verbose #286 > > type std_env_VarError = class end
00:00:17 verbose #287 > > #if FABLE_COMPILER
00:00:17 verbose #288 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:17 verbose #289 > > #endif
00:00:17 verbose #290 > > type core_any_Any = class end
00:00:17 verbose #291 > > #if FABLE_COMPILER
00:00:17 verbose #292 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:17 verbose #293 > > #endif
00:00:17 verbose #294 > > type core_ops_Try<'T> = class end
00:00:17 verbose #295 > > #if FABLE_COMPILER
00:00:17 verbose #296 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:17 verbose #297 > > #endif
00:00:17 verbose #298 > > type Func0<'T> = class end
00:00:17 verbose #299 > > #if FABLE_COMPILER
00:00:17 verbose #300 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:17 verbose #301 > > #endif
00:00:17 verbose #302 > > type Func0<'T, 'U> = class end
00:00:17 verbose #303 > > #if FABLE_COMPILER
00:00:17 verbose #304 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:17 verbose #305 > > #endif
00:00:17 verbose #306 > > type Box<'T> = class end
00:00:17 verbose #307 > > #if FABLE_COMPILER
00:00:17 verbose #308 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:17 verbose #309 > > #endif
00:00:17 verbose #310 > > type Dyn<'T> = class end
00:00:17 verbose #311 > > #if FABLE_COMPILER
00:00:17 verbose #312 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:17 verbose #313 > > #endif
00:00:17 verbose #314 > > type Send<'T> = class end
00:00:17 verbose #315 > > #if FABLE_COMPILER
00:00:17 verbose #316 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:17 verbose #317 > > #endif
00:00:17 verbose #318 > > type Fn<'T> = class end
00:00:17 verbose #319 > > #if FABLE_COMPILER
00:00:17 verbose #320 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:17 verbose #321 > > #endif
00:00:17 verbose #322 > > type FnUnit = class end
00:00:17 verbose #323 > > #if FABLE_COMPILER
00:00:17 verbose #324 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:17 verbose #325 > > #...
00:00:19 verbose #326 > >
00:00:19 verbose #327 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:19 verbose #328 > > #if FABLE_COMPILER
00:00:19 verbose #329 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:00:19 verbose #330 > > #endif
00:00:19 verbose #331 > > type clap_Arg = class end
00:00:19 verbose #332 > > #if FABLE_COMPILER
00:00:19 verbose #333 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:00:19 verbose #334 > > #endif
00:00:19 verbose #335 > > type clap_ArgAction = class end
00:00:19 verbose #336 > > #if FABLE_COMPILER
00:00:19 verbose #337 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:00:19 verbose #338 > > #endif
00:00:19 verbose #339 > > type clap_Command = class end
00:00:19 verbose #340 > > #if FABLE_COMPILER
00:00:19 verbose #341 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:00:19 verbose #342 > > #endif
00:00:19 verbose #343 > > type clap_ArgMatches = class end
00:00:19 verbose #344 > > #if FABLE_COMPILER
00:00:19 verbose #345 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:00:19 verbose #346 > > #endif
00:00:19 verbose #347 > > type clap_builder_ValueRange = class end
00:00:19 verbose #348 > > #if FABLE_COMPILER
00:00:19 verbose #349 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:00:19 verbose #350 > > #endif
00:00:19 verbose #351 > > type clap_builder_ValueParser = class end
00:00:19 verbose #352 > > #if FABLE_COMPILER
00:00:19 verbose #353 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:00:19 verbose #354 > > #endif
00:00:19 verbose #355 > > type clap_builder_PossibleValue = class end
00:00:19 verbose #356 > > #if FABLE_COMPILER
00:00:19 verbose #357 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:00:19 verbose #358 > > #endif
00:00:19 verbose #359 > > type std_process_Child = class end
00:00:19 verbose #360 > > #if FABLE_COMPILER
00:00:19 verbose #361 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:00:19 verbose #362 > > #endif
00:00:19 verbose #363 > > type std_process_ChildStderr = class end
00:00:19 verbose #364 > > #if FABLE_COMPILER
00:00:19 verbose #365 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:00:19 verbose #366 > > #endif
00:00:19 verbose #367 > > type std_process_ChildStdout = class end
00:00:19 verbose #368 > > #if FABLE_COMPILER
00:00:19 verbose #369 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:00:19 verbose #370 > > #endif
00:00:19 verbose #371 > > type std_process_ChildStdin = class end
00:00:19 verbose #372 > > #if FABLE_COMPILER
00:00:19 verbose #373 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:00:19 verbose #374 > > #endif
00:00:19 verbose #375 > > type std_process_Command = class ...
00:00:22 verbose #376 > >
00:00:22 verbose #377 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:22 verbose #378 > > #if FABLE_COMPILER
00:00:22 verbose #379 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:00:22 verbose #380 > > #endif
00:00:22 verbose #381 > > type std_fs_File = class end
00:00:22 verbose #382 > > #if FABLE_COMPILER
00:00:22 verbose #383 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:00:22 verbose #384 > > #endif
00:00:22 verbose #385 > > type std_fs_FileType = class end
00:00:22 verbose #386 > > #if FABLE_COMPILER
00:00:22 verbose #387 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:00:22 verbose #388 > > #endif
00:00:22 verbose #389 > > type std_path_Display = class end
00:00:22 verbose #390 > > #if FABLE_COMPILER
00:00:22 verbose #391 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:00:22 verbose #392 > > #endif
00:00:22 verbose #393 > > type std_path_Path = class end
00:00:22 verbose #394 > > #if FABLE_COMPILER
00:00:22 verbose #395 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:00:22 verbose #396 > > #endif
00:00:22 verbose #397 > > type std_path_PathBuf = class end
00:00:22 verbose #398 > > #if FABLE_COMPILER
00:00:22 verbose #399 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:00:22 verbose #400 > > #endif
00:00:22 verbose #401 > > type async_walkdir_DirEntry = class end
00:00:22 verbose #402 > > #if FABLE_COMPILER
00:00:22 verbose #403 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:00:22 verbose #404 > > #endif
00:00:22 verbose #405 > > type async_walkdir_Filtering = class end
00:00:22 verbose #406 > > #if FABLE_COMPILER
00:00:22 verbose #407 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:00:22 verbose #408 > > #endif
00:00:22 verbose #409 > > type async_walkdir_WalkDir = class end
00:00:22 verbose #410 > > #if FABLE_COMPILER
00:00:22 verbose #411 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:22 verbose #412 > > #endif
00:00:22 verbose #413 > > type core_any_Any = class end
00:00:22 verbose #414 > > #if FABLE_COMPILER
00:00:22 verbose #415 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:22 verbose #416 > > #endif
00:00:22 verbose #417 > > type core_ops_Try<'T> = class end
00:00:22 verbose #418 > > #if FABLE_COMPILER
00:00:22 verbose #419 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:22 verbose #420 > > #endif
00:00:22 verbose #421 > > type Func0<'T> = class end
00:00:22 verbose #422 > > #if FABLE_COMPILER
00:00:22 verbose #423 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:22 verbose #424 > > #endif
00:00:22 verbose #425 > > type Func0<'T, 'U> = class end
00:00:22 verbose #426 > > #if FABLE_COMPILER
00:00:22 verbose #427 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:22 verbose #428 > > #endif
00:00:22 verbose #429 > > type Box<'T> = clas...
00:00:26 verbose #430 > >
00:00:26 verbose #431 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #432 > > module SpiralTrace =
00:00:26 verbose #433 > > let trace x =
00:00:26 verbose #434 > > #if !INTERACTIVE
00:00:26 verbose #435 > > Trace.trace x
00:00:26 verbose #436 > > #else
00:00:26 verbose #437 > > trace x
00:00:26 verbose #438 > > #endif
00:00:26 verbose #439 > >
00:00:26 verbose #440 > > type TraceLevel =
00:00:26 verbose #441 > > #if !INTERACTIVE
00:00:26 verbose #442 > > Trace.US0
00:00:26 verbose #443 > > #else
00:00:26 verbose #444 > > US0
00:00:26 verbose #445 > > #endif
00:00:26 verbose #446 > >
00:00:26 verbose #447 > > module SpiralCrypto =
00:00:26 verbose #448 > > let hash_text x =
00:00:26 verbose #449 > > #if !INTERACTIVE
00:00:26 verbose #450 > > Crypto.hash_text x
00:00:26 verbose #451 > > #else
00:00:26 verbose #452 > > hash_text x
00:00:26 verbose #453 > > #endif
00:00:26 verbose #454 > >
00:00:26 verbose #455 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:00:26 verbose #456 > >
00:00:26 verbose #457 > > module SpiralAsync =
00:00:26 verbose #458 > > let merge_cancellation_token_with_default_async x =
00:00:26 verbose #459 > > #if !INTERACTIVE
00:00:26 verbose #460 > > Async_.merge_cancellation_token_with_default_async x
00:00:26 verbose #461 > > #else
00:00:26 verbose #462 > > merge_cancellation_token_with_default_async x
00:00:26 verbose #463 > > #endif
00:00:26 verbose #464 > >
00:00:26 verbose #465 > > module SpiralThreading =
00:00:26 verbose #466 > > let new_disposable_token x =
00:00:26 verbose #467 > > #if !INTERACTIVE
00:00:26 verbose #468 > > Threading.new_disposable_token x
00:00:26 verbose #469 > > #else
00:00:26 verbose #470 > > new_disposable_token x
00:00:26 verbose #471 > > #endif
00:00:26 verbose #472 > >
00:00:26 verbose #473 > > module SpiralNetworking =
00:00:26 verbose #474 > > let test_port_open x =
00:00:26 verbose #475 > > #if !INTERACTIVE
00:00:26 verbose #476 > > Networking.test_port_open x
00:00:26 verbose #477 > > #else
00:00:26 verbose #478 > > test_port_open x
00:00:26 verbose #479 > > #endif
00:00:26 verbose #480 > >
00:00:26 verbose #481 > > let test_port_open_timeout x =
00:00:26 verbose #482 > > #if !INTERACTIVE
00:00:26 verbose #483 > > Networking.test_port_open_timeout x
00:00:26 verbose #484 > > #else
00:00:26 verbose #485 > > test_port_open_timeout x
00:00:26 verbose #486 > > #endif
00:00:26 verbose #487 > >
00:00:26 verbose #488 > > let wait_for_port_access x =
00:00:26 verbose #489 > > #if !INTERACTIVE
00:00:26 verbose #490 > > Networking.wait_for_port_access x
00:00:26 verbose #491 > > #else
00:00:26 verbose #492 > > wait_for_port_access x
00:00:26 verbose #493 > > #endif
00:00:26 verbose #494 > >
00:00:26 verbose #495 > > let get_available_port x =
00:00:26 verbose #496 > > #if !INTERACTIVE
00:00:26 verbose #497 > > Networking.get_available_port x
00:00:26 verbose #498 > > #else
00:00:26 verbose #499 > > get_available_port x
00:00:26 verbose #500 > > #endif
00:00:26 verbose #501 > >
00:00:26 verbose #502 > > module SpiralRuntime =
00:00:26 verbose #503 > > let get_executable_suffix () =
00:00:26 verbose #504 > > #if !INTERACTIVE
00:00:26 verbose #505 > > Runtime.get_executable_suffix ()
00:00:26 verbose #506 > > #else
00:00:26 verbose #507 > > get_executable_suffix ()
00:00:26 verbose #508 > > #endif
00:00:26 verbose #509 > >
00:00:26 verbose #510 > > let is_windows () =
00:00:26 verbose #511 > > #if !INTERACTIVE
00:00:26 verbose #512 > > ...
00:00:26 verbose #513 > >
00:00:26 verbose #514 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #515 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:00:26 verbose #516 > >
00:00:26 verbose #517 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #518 > > //// test
00:00:26 verbose #519 > >
00:00:26 verbose #520 > > type AssertExceptionFormatter (ex) =
00:00:26 verbose #521 > > member _.Text =
00:00:26 verbose #522 > > ex.ToString()
00:00:26 verbose #523 > > .Replace("32m", "<span style=\"color: green;\">")
00:00:26 verbose #524 > > .Replace("36m", "</span>")
00:00:26 verbose #525 > > .Replace("31m", "<span style=\"color: red;\">")
00:00:26 verbose #526 > > .Replace("\n", "<br/>\n")
00:00:26 verbose #527 > >
00:00:26 verbose #528 > >
00:00:26 verbose #529 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:00:26 verbose #530 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:00:26 verbose #531 > >
00:00:26 verbose #532 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #533 > > //// test
00:00:26 verbose #534 > >
00:00:26 verbose #535 > > let inline __expect fn log expected actual =
00:00:26 verbose #536 > > if log then printfn $"{actual.ToDisplayString ()}"
00:00:26 verbose #537 > > try
00:00:26 verbose #538 > > "Testing.__expect" |> fn actual expected
00:00:26 verbose #539 > > with :? Expecto.AssertException as ex ->
00:00:26 verbose #540 > > AssertExceptionFormatter(ex).Display () |> ignore
00:00:26 verbose #541 > > failwith (ex.GetType().FullName)
00:00:26 verbose #542 > >
00:00:26 verbose #543 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:00:26 verbose #544 > > expected actual
00:00:26 verbose #545 > > let inline _contains expected actual = __contains true expected actual
00:00:26 verbose #546 > >
00:00:26 verbose #547 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:00:26 verbose #548 > > expected actual
00:00:26 verbose #549 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:00:26 verbose #550 > >
00:00:26 verbose #551 > > let inline __isGreaterThan log expected actual = __expect
00:00:26 verbose #552 > > Expecto.Expect.isGreaterThan log expected actual
00:00:26 verbose #553 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:00:26 verbose #554 > >
00:00:26 verbose #555 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:00:26 verbose #556 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:00:26 verbose #557 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:00:26 verbose #558 > > expected actual
00:00:26 verbose #559 > >
00:00:26 verbose #560 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:00:26 verbose #561 > > log expected actual
00:00:26 verbose #562 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:00:26 verbose #563 > >
00:00:26 verbose #564 > > let inline __isLessThanOrEqual log expected actual = __expect
00:00:26 verbose #565 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:00:26 verbose #566 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:00:26 verbose #567 > > expected actual
00:00:26 verbose #568 > >
00:00:26 verbose #569 > > let inline __sequenceEqual log expected actual = __expe...
00:00:26 verbose #570 > >
00:00:26 verbose #571 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #572 > > //// test
00:00:26 verbose #573 > >
00:00:26 verbose #574 > > let inline __isBetween log a b actual =
00:00:26 verbose #575 > > let inline isBetween actual (a, b) _ =
00:00:26 verbose #576 > > __isGreaterThanOrEqual log a actual
00:00:26 verbose #577 > > __isLessThanOrEqual log b actual
00:00:26 verbose #578 > > __expect isBetween log (a, b) actual
00:00:26 verbose #579 > > let inline _isBetween a b actual = __isBetween true a b actual
00:00:26 verbose #580 > >
00:00:26 verbose #581 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:26 verbose #582 > > //// test
00:00:26 verbose #583 > >
00:00:26 verbose #584 > > open testing
00:00:26 verbose #585 > > open benchmark
00:00:26 verbose #586 > >
00:00:26 verbose #587 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #588 > > #r
00:00:26 verbose #589 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:26 verbose #590 > > otNet.Interactive.Spiral.dll"
00:00:26 verbose #591 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:00:26 verbose #592 > > #r
00:00:26 verbose #593 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:26 verbose #594 > > otNet.Interactive.dll"
00:00:26 verbose #595 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:28 verbose #596 > >
00:00:28 verbose #597 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #598 > > #if !INTERACTIVE
00:00:28 verbose #599 > > open Lib
00:00:28 verbose #600 > > #endif
00:00:28 verbose #601 > >
00:00:28 verbose #602 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:28 verbose #603 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:28 verbose #604 > > │ ## TestCaseResult │
00:00:28 verbose #605 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 verbose #606 > >
00:00:28 verbose #607 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #608 > > type TestCaseResult =
00:00:28 verbose #609 > > {
00:00:28 verbose #610 > > Input: string
00:00:28 verbose #611 > > Expected: string
00:00:28 verbose #612 > > Result: string
00:00:28 verbose #613 > > TimeList: int64 list
00:00:28 verbose #614 > > }
00:00:28 verbose #615 > >
00:00:28 verbose #616 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:28 verbose #617 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:28 verbose #618 > > │ ## run │
00:00:28 verbose #619 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 verbose #620 > >
00:00:28 verbose #621 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #622 > > let run count (solutions: (string * ('TInput -> 'TExpected)) list) (input,
00:00:28 verbose #623 > > expected) =
00:00:28 verbose #624 > > let inputStr =
00:00:28 verbose #625 > > match box input with
00:00:28 verbose #626 > > | :? System.Collections.ICollection as input ->
00:00:28 verbose #627 > > System.Linq.Enumerable.Cast<obj> input
00:00:28 verbose #628 > > |> Seq.map string
00:00:28 verbose #629 > > |> SpiralSm.concat ","
00:00:28 verbose #630 > > | _ -> input.ToString ()
00:00:28 verbose #631 > >
00:00:28 verbose #632 > > printfn ""
00:00:28 verbose #633 > > printfn $"Solution: {inputStr} "
00:00:28 verbose #634 > >
00:00:28 verbose #635 > > let performanceInvoke (fn: unit -> 'T) =
00:00:28 verbose #636 > > GC.Collect ()
00:00:28 verbose #637 > > let stopwatch = System.Diagnostics.Stopwatch ()
00:00:28 verbose #638 > > stopwatch.Start ()
00:00:28 verbose #639 > > let time1 = stopwatch.ElapsedMilliseconds
00:00:28 verbose #640 > >
00:00:28 verbose #641 > > let result =
00:00:28 verbose #642 > > [[| 0 .. count |]]
00:00:28 verbose #643 > > |> Array.Parallel.map (fun _ ->
00:00:28 verbose #644 > > fn ()
00:00:28 verbose #645 > > )
00:00:28 verbose #646 > > |> Array.last
00:00:28 verbose #647 > >
00:00:28 verbose #648 > > let time2 = stopwatch.ElapsedMilliseconds - time1
00:00:28 verbose #649 > >
00:00:28 verbose #650 > > result, time2
00:00:28 verbose #651 > >
00:00:28 verbose #652 > > let resultsWithTime =
00:00:28 verbose #653 > > solutions
00:00:28 verbose #654 > > |> List.mapi (fun i (testName, solution) ->
00:00:28 verbose #655 > > let result, time = performanceInvoke (fun () -> solution input)
00:00:28 verbose #656 > > printfn $"Test case %d{i + 1}. %s{testName}. Time: %A{time} "
00:00:28 verbose #657 > > result, time
00:00:28 verbose #658 > > )
00:00:28 verbose #659 > >
00:00:28 verbose #660 > >
00:00:28 verbose #661 > > match resultsWithTime |> List.map fst with
00:00:28 verbose #662 > > | ([[]] | [[ _ ]]) -> ()
00:00:28 verbose #663 > > | (head :: tail) when tail |> List.forall ((=) head) -> ()
00:00:28 verbose #664 > > | results -> failwithf $"Challenge error: %A{results}"
00:00:28 verbose #665 > >
00:00:28 verbose #666 > > {
00:00:28 verbose #667 > > Input = inputStr
00:00:28 verbose #668 > > Expected = expected.ToString ()
00:00:28 verbose #669 > > Result = resultsWithTime |> Seq.map fst |> Seq.head |> _.ToString()
00:00:28 verbose #670 > > TimeList = resultsWithTime |> List.map snd
00:00:28 verbose #671 > > }
00:00:29 verbose #672 > >
00:00:29 verbose #673 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:29 verbose #674 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:29 verbose #675 > > │ ## runAll │
00:00:29 verbose #676 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #677 > >
00:00:29 verbose #678 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:29 verbose #679 > > let runAll testName count (solutions: (string * ('TInput -> 'TExpected)) list)
00:00:29 verbose #680 > > testCases =
00:00:29 verbose #681 > > printfn ""
00:00:29 verbose #682 > > printfn ""
00:00:29 verbose #683 > > printfn $"Test: {testName}"
00:00:29 verbose #684 > > testCases
00:00:29 verbose #685 > > |> Seq.map (run count solutions)
00:00:29 verbose #686 > > |> Seq.toList
00:00:29 verbose #687 > >
00:00:29 verbose #688 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:29 verbose #689 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:29 verbose #690 > > │ ## sortResultList │
00:00:29 verbose #691 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #692 > >
00:00:29 verbose #693 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:29 verbose #694 > > let sortResultList resultList =
00:00:29 verbose #695 > > let table =
00:00:29 verbose #696 > > let rows =
00:00:29 verbose #697 > > resultList
00:00:29 verbose #698 > > |> List.map (fun result ->
00:00:29 verbose #699 > > let best =
00:00:29 verbose #700 > > result.TimeList
00:00:29 verbose #701 > > |> List.mapi (fun i time ->
00:00:29 verbose #702 > > i + 1, time
00:00:29 verbose #703 > > )
00:00:29 verbose #704 > > |> List.sortBy snd
00:00:29 verbose #705 > > |> List.head
00:00:29 verbose #706 > > |> _.ToString()
00:00:29 verbose #707 > > let row =
00:00:29 verbose #708 > > [[
00:00:29 verbose #709 > > result.Input
00:00:29 verbose #710 > > result.Expected
00:00:29 verbose #711 > > result.Result
00:00:29 verbose #712 > > best
00:00:29 verbose #713 > > ]]
00:00:29 verbose #714 > > let color =
00:00:29 verbose #715 > > match result.Expected = result.Result with
00:00:29 verbose #716 > > | true -> Some ConsoleColor.DarkGreen
00:00:29 verbose #717 > > | false -> Some ConsoleColor.DarkRed
00:00:29 verbose #718 > > row, color
00:00:29 verbose #719 > > )
00:00:29 verbose #720 > > let header =
00:00:29 verbose #721 > > [[
00:00:29 verbose #722 > > [[
00:00:29 verbose #723 > > "Input"
00:00:29 verbose #724 > > "Expected"
00:00:29 verbose #725 > > "Result"
00:00:29 verbose #726 > > "Best"
00:00:29 verbose #727 > > ]]
00:00:29 verbose #728 > > [[
00:00:29 verbose #729 > > "---"
00:00:29 verbose #730 > > "---"
00:00:29 verbose #731 > > "---"
00:00:29 verbose #732 > > "---"
00:00:29 verbose #733 > > ]]
00:00:29 verbose #734 > > ]]
00:00:29 verbose #735 > > |> List.map (fun row -> row, None)
00:00:29 verbose #736 > > header @ rows
00:00:29 verbose #737 > >
00:00:29 verbose #738 > > let formattedTable =
00:00:29 verbose #739 > > let lengthMap =
00:00:29 verbose #740 > > table
00:00:29 verbose #741 > > |> List.map fst
00:00:29 verbose #742 > > |> List.transpose
00:00:29 verbose #743 > > |> List.map (fun column ->
00:00:29 verbose #744 > > column
00:00:29 verbose #745 > > |> List.map String.length
00:00:29 verbose #746 > > |> List.sortDescending
00:00:29 verbose #747 > > |> List.tryHead
00:00:29 verbose #748 > > |> Option.defaultValue 0
00:00:29 verbose #749 > > )
00:00:29 verbose #750 > > |> List.indexed
00:00:29 verbose #751 > > |> Map.ofList
00:00:29 verbose #752 > > table
00:00:29 verbose #753 > > |> List.map (fun (row, color) ->
00:00:29 verbose #754 > > let newRow =
00:00:29 verbose #755 > > row
00:00:29 verbose #756 > > |> List.mapi (fun i cell ->
00:00:29 verbose #757 > > cell.PadRight lengthMap.[[i]]
00:00:29 verbose #758 > > )
00:00:29 verbose #759 > > newRow, color
00:00:29 verbose #760 > > )
00:00:29 verbose #761 > >
00:00:29 verbose #762 > > printfn ""
00:00:29 verbose #763 > > formattedTable
00:00:29 verbose #764 > > |> List.iter (fun (row, color) ->
00:00:29 verbose #765 > > match color with
00:00:29 verbose #766 > > | Some color -> Console.ForegroundColor <- color
00:00:29 verbose #767 > > | None -> Console.ResetColor ()
00:00:29 verbose #768 > >
00:00:29 verbose #769 > > printfn "%s" (String.Join ("\t| ", row))
00:00:29 verbose #770 > >
00:00:29 verbose #771 > > Console.ResetColor ()
00:00:29 verbose #772 > > )
00:00:29 verbose #773 > >
00:00:29 verbose #774 > > let averages =
00:00:29 verbose #775 > > resultList
00:00:29 verbose #776 > > |> List.map (fun result -> result.TimeList |> List.map float)
00:00:29 verbose #777 > > |> List.transpose
00:00:29 verbose #778 > > |> List.map List.average
00:00:29 verbose #779 > > |> List.map int64
00:00:29 verbose #780 > > |> List.indexed
00:00:29 verbose #781 > >
00:00:29 verbose #782 > > printfn ""
00:00:29 verbose #783 > > printfn "Average Ranking "
00:00:29 verbose #784 > > averages
00:00:29 verbose #785 > > |> List.sortBy snd
00:00:29 verbose #786 > > |> List.iter (fun (i, avg) ->
00:00:29 verbose #787 > > printfn $"Test case %d{i + 1}. Average Time: %A{avg} "
00:00:29 verbose #788 > > )
00:00:29 verbose #789 > >
00:00:29 verbose #790 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:29 verbose #791 > > let mutable _count =
00:00:29 verbose #792 > > if ("CI" |> System.Environment.GetEnvironmentVariable |> fun x -> $"%A{x}")
00:00:29 verbose #793 > > <> "<null>"
00:00:29 verbose #794 > > then 2000000
00:00:29 verbose #795 > > else 2000
00:00:29 verbose #796 > >
00:00:29 verbose #797 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:29 verbose #798 > > inl is_fast () =
00:00:29 verbose #799 > > false
00:00:29 verbose #800 > >
00:00:29 verbose #801 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:29 verbose #802 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:29 verbose #803 > > │ ## empty3Tests │
00:00:29 verbose #804 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #805 > >
00:00:29 verbose #806 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:29 verbose #807 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:29 verbose #808 > > │ Test: Empty3 │
00:00:29 verbose #809 > > │ │
00:00:29 verbose #810 > > │ Solution: (a, a) │
00:00:29 verbose #811 > > │ Test case 1. A. Time: 91L │
00:00:29 verbose #812 > > │ │
00:00:29 verbose #813 > > │ Solution: (a, a) │
00:00:29 verbose #814 > > │ Test case 1. A. Time: 56L │
00:00:29 verbose #815 > > │ │
00:00:29 verbose #816 > > │ Input | Expected | Result | Best │
00:00:29 verbose #817 > > │ --- | --- | --- | --- │
00:00:29 verbose #818 > > │ (a, a) | a | a | (1, 91) │
00:00:29 verbose #819 > > │ (a, a) | a | a | (1, 56) │
00:00:29 verbose #820 > > │ │
00:00:29 verbose #821 > > │ Averages │
00:00:29 verbose #822 > > │ Test case 1. Average Time: 73L │
00:00:29 verbose #823 > > │ │
00:00:29 verbose #824 > > │ Ranking │
00:00:29 verbose #825 > > │ Test case 1. Average Time: 73L │
00:00:29 verbose #826 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #827 > >
00:00:29 verbose #828 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:29 verbose #829 > > //// test
00:00:29 verbose #830 > >
00:00:29 verbose #831 > > let solutions = [[
00:00:29 verbose #832 > > "A",
00:00:29 verbose #833 > > fun (a, _b) ->
00:00:29 verbose #834 > > a
00:00:29 verbose #835 > > ]]
00:00:29 verbose #836 > > let testCases = seq {
00:00:29 verbose #837 > > ("a", "a"), "a"
00:00:29 verbose #838 > > ("a", "a"), "a"
00:00:29 verbose #839 > > }
00:00:29 verbose #840 > > let rec empty3Tests = runAll (nameof empty3Tests) _count solutions testCases
00:00:29 verbose #841 > > empty3Tests
00:00:29 verbose #842 > > |> sortResultList
00:00:29 verbose #843 > >
00:00:29 verbose #844 > > ╭─[ 591.23ms - stdout ]────────────────────────────────────────────────────────╮
00:00:29 verbose #845 > > │ │
00:00:29 verbose #846 > > │ │
00:00:29 verbose #847 > > │ Test: empty3Tests │
00:00:29 verbose #848 > > │ │
00:00:29 verbose #849 > > │ Solution: (a, a) │
00:00:29 verbose #850 > > │ Test case 1. A. Time: 2L │
00:00:29 verbose #851 > > │ │
00:00:29 verbose #852 > > │ Solution: (a, a) │
00:00:29 verbose #853 > > │ Test case 1. A. Time: 0L │
00:00:29 verbose #854 > > │ │
00:00:29 verbose #855 > > │ Input | Expected | Result | Best │
00:00:29 verbose #856 > > │ --- | --- | --- | --- │
00:00:29 verbose #857 > > │ (a, a) | a | a | (1, 2) │
00:00:29 verbose #858 > > │ (a, a) | a | a | (1, 0) │
00:00:29 verbose #859 > > │ │
00:00:29 verbose #860 > > │ Average Ranking │
00:00:29 verbose #861 > > │ Test case 1. Average Time: 1L │
00:00:29 verbose #862 > > │ │
00:00:29 verbose #863 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #864 > >
00:00:29 verbose #865 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:29 verbose #866 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:29 verbose #867 > > │ ## empty2Tests │
00:00:29 verbose #868 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #869 > >
00:00:29 verbose #870 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:29 verbose #871 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:29 verbose #872 > > │ Test: Empty2 │
00:00:29 verbose #873 > > │ │
00:00:29 verbose #874 > > │ Solution: (a, a) │
00:00:29 verbose #875 > > │ Test case 1. A. Time: 59L │
00:00:29 verbose #876 > > │ │
00:00:29 verbose #877 > > │ Solution: (a, a) │
00:00:29 verbose #878 > > │ Test case 1. A. Time: 53L │
00:00:29 verbose #879 > > │ │
00:00:29 verbose #880 > > │ Input | Expected | Result | Best │
00:00:29 verbose #881 > > │ --- | --- | --- | --- │
00:00:29 verbose #882 > > │ (a, a) | a | a | (1, 59) │
00:00:29 verbose #883 > > │ (a, a) | a | a | (1, 53) │
00:00:29 verbose #884 > > │ │
00:00:29 verbose #885 > > │ Averages │
00:00:29 verbose #886 > > │ Test case 1. Average Time: 56L │
00:00:29 verbose #887 > > │ │
00:00:29 verbose #888 > > │ Ranking │
00:00:29 verbose #889 > > │ Test case 1. Average Time: 56L │
00:00:29 verbose #890 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #891 > >
00:00:29 verbose #892 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:29 verbose #893 > > //// test
00:00:29 verbose #894 > >
00:00:29 verbose #895 > > let solutions = [[
00:00:29 verbose #896 > > "A",
00:00:29 verbose #897 > > fun (a, _b) ->
00:00:29 verbose #898 > > a
00:00:29 verbose #899 > > ]]
00:00:29 verbose #900 > > let testCases = seq {
00:00:29 verbose #901 > > ("a", "a"), "a"
00:00:29 verbose #902 > > ("a", "a"), "a"
00:00:29 verbose #903 > > }
00:00:29 verbose #904 > > let rec empty2Tests = runAll (nameof empty2Tests) _count solutions testCases
00:00:29 verbose #905 > > empty2Tests
00:00:29 verbose #906 > > |> sortResultList
00:00:30 verbose #907 > >
00:00:30 verbose #908 > > ╭─[ 555.19ms - stdout ]────────────────────────────────────────────────────────╮
00:00:30 verbose #909 > > │ │
00:00:30 verbose #910 > > │ │
00:00:30 verbose #911 > > │ Test: empty2Tests │
00:00:30 verbose #912 > > │ │
00:00:30 verbose #913 > > │ Solution: (a, a) │
00:00:30 verbose #914 > > │ Test case 1. A. Time: 0L │
00:00:30 verbose #915 > > │ │
00:00:30 verbose #916 > > │ Solution: (a, a) │
00:00:30 verbose #917 > > │ Test case 1. A. Time: 0L │
00:00:30 verbose #918 > > │ │
00:00:30 verbose #919 > > │ Input | Expected | Result | Best │
00:00:30 verbose #920 > > │ --- | --- | --- | --- │
00:00:30 verbose #921 > > │ (a, a) | a | a | (1, 0) │
00:00:30 verbose #922 > > │ (a, a) | a | a | (1, 0) │
00:00:30 verbose #923 > > │ │
00:00:30 verbose #924 > > │ Average Ranking │
00:00:30 verbose #925 > > │ Test case 1. Average Time: 0L │
00:00:30 verbose #926 > > │ │
00:00:30 verbose #927 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 verbose #928 > >
00:00:30 verbose #929 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:30 verbose #930 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:30 verbose #931 > > │ ## emptyTests │
00:00:30 verbose #932 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 verbose #933 > >
00:00:30 verbose #934 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:30 verbose #935 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:30 verbose #936 > > │ Test: Empty │
00:00:30 verbose #937 > > │ │
00:00:30 verbose #938 > > │ Solution: 0 │
00:00:30 verbose #939 > > │ Test case 1. A. Time: 61L │
00:00:30 verbose #940 > > │ │
00:00:30 verbose #941 > > │ Solution: 2 │
00:00:30 verbose #942 > > │ Test case 1. A. Time: 62L │
00:00:30 verbose #943 > > │ │
00:00:30 verbose #944 > > │ Solution: 5 │
00:00:30 verbose #945 > > │ Test case 1. A. Time: 70L │
00:00:30 verbose #946 > > │ │
00:00:30 verbose #947 > > │ Input | Expected | Result | Best │
00:00:30 verbose #948 > > │ --- | --- | --- | --- │
00:00:30 verbose #949 > > │ 0 | 0 | 0 | (1, 61) │
00:00:30 verbose #950 > > │ 2 | 2 | 2 | (1, 62) │
00:00:30 verbose #951 > > │ 5 | 5 | 5 | (1, 70) │
00:00:30 verbose #952 > > │ │
00:00:30 verbose #953 > > │ Averages │
00:00:30 verbose #954 > > │ Test case 1. Average Time: 64L │
00:00:30 verbose #955 > > │ │
00:00:30 verbose #956 > > │ Ranking │
00:00:30 verbose #957 > > │ Test case 1. Average Time: 64L │
00:00:30 verbose #958 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 verbose #959 > >
00:00:30 verbose #960 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:30 verbose #961 > > //// test
00:00:30 verbose #962 > >
00:00:30 verbose #963 > > let solutions = [[
00:00:30 verbose #964 > > "A",
00:00:30 verbose #965 > > fun n ->
00:00:30 verbose #966 > > n + 0
00:00:30 verbose #967 > > ]]
00:00:30 verbose #968 > > let testCases = seq {
00:00:30 verbose #969 > > 0, 0
00:00:30 verbose #970 > > 2, 2
00:00:30 verbose #971 > > 5, 5
00:00:30 verbose #972 > > }
00:00:30 verbose #973 > > let rec emptyTests = runAll (nameof emptyTests) _count solutions testCases
00:00:30 verbose #974 > > emptyTests
00:00:30 verbose #975 > > |> sortResultList
00:00:31 verbose #976 > >
00:00:31 verbose #977 > > ╭─[ 832.32ms - stdout ]────────────────────────────────────────────────────────╮
00:00:31 verbose #978 > > │ │
00:00:31 verbose #979 > > │ │
00:00:31 verbose #980 > > │ Test: emptyTests │
00:00:31 verbose #981 > > │ │
00:00:31 verbose #982 > > │ Solution: 0 │
00:00:31 verbose #983 > > │ Test case 1. A. Time: 3L │
00:00:31 verbose #984 > > │ │
00:00:31 verbose #985 > > │ Solution: 2 │
00:00:31 verbose #986 > > │ Test case 1. A. Time: 0L │
00:00:31 verbose #987 > > │ │
00:00:31 verbose #988 > > │ Solution: 5 │
00:00:31 verbose #989 > > │ Test case 1. A. Time: 0L │
00:00:31 verbose #990 > > │ │
00:00:31 verbose #991 > > │ Input | Expected | Result | Best │
00:00:31 verbose #992 > > │ --- | --- | --- | --- │
00:00:31 verbose #993 > > │ 0 | 0 | 0 | (1, 3) │
00:00:31 verbose #994 > > │ 2 | 2 | 2 | (1, 0) │
00:00:31 verbose #995 > > │ 5 | 5 | 5 | (1, 0) │
00:00:31 verbose #996 > > │ │
00:00:31 verbose #997 > > │ Average Ranking │
00:00:31 verbose #998 > > │ Test case 1. Average Time: 1L │
00:00:31 verbose #999 > > │ │
00:00:31 verbose #1000 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 verbose #1001 > >
00:00:31 verbose #1002 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:31 verbose #1003 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:31 verbose #1004 > > │ ## uniqueLettersTests │
00:00:31 verbose #1005 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 verbose #1006 > >
00:00:31 verbose #1007 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:31 verbose #1008 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:31 verbose #1009 > > │ Test: UniqueLetters │
00:00:31 verbose #1010 > > │ │
00:00:31 verbose #1011 > > │ Solution: abc │
00:00:31 verbose #1012 > > │ Test case 1. A. Time: 1512L │
00:00:31 verbose #1013 > > │ Test case 2. B. Time: 1947L │
00:00:31 verbose #1014 > > │ Test case 3. C. Time: 2023L │
00:00:31 verbose #1015 > > │ Test case 4. D. Time: 1358L │
00:00:31 verbose #1016 > > │ Test case 5. E. Time: 1321L │
00:00:31 verbose #1017 > > │ Test case 6. F. Time: 1346L │
00:00:31 verbose #1018 > > │ Test case 7. G. Time: 1304L │
00:00:31 verbose #1019 > > │ Test case 8. H. Time: 1383L │
00:00:31 verbose #1020 > > │ Test case 9. I. Time: 1495L │
00:00:31 verbose #1021 > > │ Test case 10. J. Time: 1245L │
00:00:31 verbose #1022 > > │ Test case 11. K. Time: 1219L │
00:00:31 verbose #1023 > > │ │
00:00:31 verbose #1024 > > │ Solution: accabb │
00:00:31 verbose #1025 > > │ Test case 1. A. Time: 1648L │
00:00:31 verbose #1026 > > │ Test case 2. B. Time: 2061L │
00:00:31 verbose #1027 > > │ Test case 3. C. Time: 2413L │
00:00:31 verbose #1028 > > │ Test case 4. D. Time: 1561L │
00:00:31 verbose #1029 > > │ Test case 5. E. Time: 1593L │
00:00:31 verbose #1030 > > │ Test case 6. F. Time: 1518L │
00:00:31 verbose #1031 > > │ Test case 7. G. Time: 1415L │
00:00:31 verbose #1032 > > │ Test case 8. H. Time: 1510L │
00:00:31 verbose #1033 > > │ Test case 9. I. Time: 1445L │
00:00:31 verbose #1034 > > │ Test case 10. J. Time: 1636L │
00:00:31 verbose #1035 > > │ Test case 11. K. Time: 1317L │
00:00:31 verbose #1036 > > │ │
00:00:31 verbose #1037 > > │ Solution: pprrqqpp │
00:00:31 verbose #1038 > > │ Test case 1. A. Time: 2255L │
00:00:31 verbose #1039 > > │ Test case 2. B. Time: 2408L │
00:00:31 verbose #1040 > > │ Test case 3. C. Time: 2393L │
00:00:31 verbose #1041 > > │ Test case 4. D. Time: 1675L │
00:00:31 verbose #1042 > > │ Test case 5. E. Time: 1911L │
00:00:31 verbose #1043 > > │ Test case 6. F. Time: 2126L │
00:00:31 verbose #1044 > > │ Test case 7. G. Time: 1504L │
00:00:31 verbose #1045 > > │ Test case 8. H. Time: 1715L │
00:00:31 verbose #1046 > > │ Test case 9. I. Time: 1537L │
00:00:31 verbose #1047 > > │ Test case 10. J. Time: 1522L │
00:00:31 verbose #1048 > > │ Test case 11. K. Time: 1322L │
00:00:31 verbose #1049 > > │ │
00:00:31 verbose #1050 > > │ Solution: │
00:00:31 verbose #1051 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:31 verbose #1052 > > │ bbb │
00:00:31 verbose #1053 > > │ Test case 1. A. Time: 13073L │
00:00:31 verbose #1054 > > │ Test case 2. B. Time: 11519L │
00:00:31 verbose #1055 > > │ Test case 3. C. Time: 8373L │
00:00:31 verbose #1056 > > │ Test case 4. D. Time: 5860L │
00:00:31 verbose #1057 > > │ Test case 5. E. Time: 6490L │
00:00:31 verbose #1058 > > │ Test case 6. F. Time: 6325L │
00:00:31 verbose #1059 > > │ Test case 7. G. Time: 5799L │
00:00:31 verbose #1060 > > │ Test case 8. H. Time: 7099L │
00:00:31 verbose #1061 > > │ Test case 9. I. Time: 6133L │
00:00:31 verbose #1062 > > │ Test case 10. J. Time: 5993L │
00:00:31 verbose #1063 > > │ Test case 11. K. Time: 2040L │
00:00:31 verbose #1064 > > │ │
00:00:31 verbose #1065 > > │ Input │
00:00:31 verbose #1066 > > │ | Expected | Result | Best │
00:00:31 verbose #1067 > > │ --- │
00:00:31 verbose #1068 > > │ │
00:00:31 verbose #1069 > > │ | --- | --- | --- │
00:00:31 verbose #1070 > > │ abc │
00:00:31 verbose #1071 > > │ │
00:00:31 verbose #1072 > > │ | abc | abc | (11, 1219) │
00:00:31 verbose #1073 > > │ accabb │
00:00:31 verbose #1074 > > │ | acb | acb | (11, 1317) │
00:00:31 verbose #1075 > > │ pprrqqpp │
00:00:31 verbose #1076 > > │ | prq | prq | (11, 1322) │
00:00:31 verbose #1077 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:31 verbose #1078 > > │ bbb | acb | acb | (11, 2040) │
00:00:31 verbose #1079 > > │ │
00:00:31 verbose #1080 > > │ Averages │
00:00:31 verbose #1081 > > │ Test case 1. Average Time: 4622L │
00:00:31 verbose #1082 > > │ Test case 2. Average Time: 4483L │
00:00:31 verbose #1083 > > │ Test case 3. Average Time: 3800L │
00:00:31 verbose #1084 > > │ Test case 4. Average Time: 2613L │
00:00:31 verbose #1085 > > │ Test case 5. Average Time: 2828L │
00:00:31 verbose #1086 > > │ Test case 6. Average Time: 2828L │
00:00:31 verbose #1087 > > │ Test case 7. Average Time: 2505L │
00:00:31 verbose #1088 > > │ Test case 8. Average Time: 2926L │
00:00:31 verbose #1089 > > │ Test case 9. Average Time: 2652L │
00:00:31 verbose #1090 > > │ Test case 10. Average Time: 2599L │
00:00:31 verbose #1091 > > │ Test case 11. Average Time: 1474L │
00:00:31 verbose #1092 > > │ │
00:00:31 verbose #1093 > > │ Ranking │
00:00:31 verbose #1094 > > │ Test case 1. Average Time: 4622L │
00:00:31 verbose #1095 > > │ Test case 2. Average Time: 4483L │
00:00:31 verbose #1096 > > │ Test case 3. Average Time: 3800L │
00:00:31 verbose #1097 > > │ Test case 8. Average Time: 2926L │
00:00:31 verbose #1098 > > │ Test case 5. Average Time: 2828L │
00:00:31 verbose #1099 > > │ Test case 6. Average Time: 2828L │
00:00:31 verbose #1100 > > │ Test case 9. Average Time: 2652L │
00:00:31 verbose #1101 > > │ Test case 4. Average Time: 2613L │
00:00:31 verbose #1102 > > │ Test case 10. Average Time: 2599L │
00:00:31 verbose #1103 > > │ Test case 7. Average Time: 2505L │
00:00:31 verbose #1104 > > │ Test case 11. Average Time: 1474L │
00:00:31 verbose #1105 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 verbose #1106 > >
00:00:31 verbose #1107 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:31 verbose #1108 > > //// test
00:00:31 verbose #1109 > >
00:00:31 verbose #1110 > > let solutions = [[
00:00:31 verbose #1111 > > "A",
00:00:31 verbose #1112 > > fun input ->
00:00:31 verbose #1113 > > input
00:00:31 verbose #1114 > > |> Seq.toList
00:00:31 verbose #1115 > > |> List.fold (fun acc x -> if List.contains x acc then acc else acc @ [[
00:00:31 verbose #1116 > > x ]]) [[]]
00:00:31 verbose #1117 > > |> Seq.toArray
00:00:31 verbose #1118 > > |> String
00:00:31 verbose #1119 > >
00:00:31 verbose #1120 > > "B",
00:00:31 verbose #1121 > > fun input ->
00:00:31 verbose #1122 > > input
00:00:31 verbose #1123 > > |> Seq.rev
00:00:31 verbose #1124 > > |> fun list -> Seq.foldBack (fun x acc -> if List.contains x acc then
00:00:31 verbose #1125 > > acc else x :: acc) list [[]]
00:00:31 verbose #1126 > > |> Seq.rev
00:00:31 verbose #1127 > > |> Seq.toArray
00:00:31 verbose #1128 > > |> String
00:00:31 verbose #1129 > >
00:00:31 verbose #1130 > > "C",
00:00:31 verbose #1131 > > fun input ->
00:00:31 verbose #1132 > > input
00:00:31 verbose #1133 > > |> Seq.rev
00:00:31 verbose #1134 > > |> fun list -> Seq.foldBack (fun x (set, acc) -> if Set.contains x set
00:00:31 verbose #1135 > > then set, acc else set.Add x, x :: acc) list (Set.empty, [[]])
00:00:31 verbose #1136 > > |> snd
00:00:31 verbose #1137 > > |> Seq.rev
00:00:31 verbose #1138 > > |> Seq.toArray
00:00:31 verbose #1139 > > |> String
00:00:31 verbose #1140 > >
00:00:31 verbose #1141 > > "D",
00:00:31 verbose #1142 > > fun input ->
00:00:31 verbose #1143 > > input
00:00:31 verbose #1144 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:31 verbose #1145 > > else set.Add x, Array.append acc [[| x |]]) (Set.empty, [[||]])
00:00:31 verbose #1146 > > |> snd
00:00:31 verbose #1147 > > |> String
00:00:31 verbose #1148 > >
00:00:31 verbose #1149 > > "E",
00:00:31 verbose #1150 > > fun input ->
00:00:31 verbose #1151 > > input
00:00:31 verbose #1152 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:31 verbose #1153 > > else set.Add x, x :: acc) (Set.empty, [[]])
00:00:31 verbose #1154 > > |> snd
00:00:31 verbose #1155 > > |> List.rev
00:00:31 verbose #1156 > > |> List.toArray
00:00:31 verbose #1157 > > |> String
00:00:31 verbose #1158 > >
00:00:31 verbose #1159 > > "F",
00:00:31 verbose #1160 > > fun input ->
00:00:31 verbose #1161 > > input
00:00:31 verbose #1162 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:31 verbose #1163 > > else set.Add x, acc @ [[ x ]]) (Set.empty, [[]])
00:00:31 verbose #1164 > > |> snd
00:00:31 verbose #1165 > > |> List.toArray
00:00:31 verbose #1166 > > |> String
00:00:31 verbose #1167 > >
00:00:31 verbose #1168 > > "G",
00:00:31 verbose #1169 > > fun input ->
00:00:31 verbose #1170 > > input
00:00:31 verbose #1171 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:31 verbose #1172 > > else set.Add x, x :: acc) (Set.empty, [[]])
00:00:31 verbose #1173 > > |> snd
00:00:31 verbose #1174 > > |> List.toArray
00:00:31 verbose #1175 > > |> Array.rev
00:00:31 verbose #1176 > > |> String
00:00:31 verbose #1177 > >
00:00:31 verbose #1178 > > "H",
00:00:31 verbose #1179 > > fun input ->
00:00:31 verbose #1180 > > input
00:00:31 verbose #1181 > > |> Seq.toList
00:00:31 verbose #1182 > > |> fun list ->
00:00:31 verbose #1183 > > let rec loop set = function
00:00:31 verbose #1184 > > | head :: tail when Set.contains head set -> loop set tail
00:00:31 verbose #1185 > > | head :: tail -> (loop (set.Add head) tail) @ [[ head ]]
00:00:31 verbose #1186 > > | [[]] -> [[]]
00:00:31 verbose #1187 > > loop Set.empty list
00:00:31 verbose #1188 > > |> List.rev
00:00:31 verbose #1189 > > |> List.toArray
00:00:31 verbose #1190 > > |> String
00:00:31 verbose #1191 > >
00:00:31 verbose #1192 > > "I",
00:00:31 verbose #1193 > > fun input ->
00:00:31 verbose #1194 > > input
00:00:31 verbose #1195 > > |> Seq.toList
00:00:31 verbose #1196 > > |> fun list ->
00:00:31 verbose #1197 > > let rec loop set = function
00:00:31 verbose #1198 > > | head :: tail when Set.contains head set -> loop set tail
00:00:31 verbose #1199 > > | head :: tail -> loop (set.Add head) tail |> Array.append [[|
00:00:31 verbose #1200 > > head |]]
00:00:31 verbose #1201 > > | [[]] -> [[||]]
00:00:31 verbose #1202 > > loop Set.empty list
00:00:31 verbose #1203 > > |> String
00:00:31 verbose #1204 > >
00:00:31 verbose #1205 > > "J",
00:00:31 verbose #1206 > > fun input ->
00:00:31 verbose #1207 > > input
00:00:31 verbose #1208 > > |> Seq.toList
00:00:31 verbose #1209 > > |> fun list ->
00:00:31 verbose #1210 > > let rec loop set = function
00:00:31 verbose #1211 > > | head :: tail when Set.contains head set -> loop set tail
00:00:31 verbose #1212 > > | head :: tail -> head :: loop (set.Add head) tail
00:00:31 verbose #1213 > > | [[]] -> [[]]
00:00:31 verbose #1214 > > loop Set.empty list
00:00:31 verbose #1215 > > |> List.toArray
00:00:31 verbose #1216 > > |> String
00:00:31 verbose #1217 > >
00:00:31 verbose #1218 > > "K",
00:00:31 verbose #1219 > > fun input ->
00:00:31 verbose #1220 > > input
00:00:31 verbose #1221 > > |> Seq.distinct
00:00:31 verbose #1222 > > |> Seq.toArray
00:00:31 verbose #1223 > > |> String
00:00:31 verbose #1224 > > ]]
00:00:31 verbose #1225 > > let testCases = seq {
00:00:31 verbose #1226 > > "abc", "abc"
00:00:31 verbose #1227 > > "accabb", "acb"
00:00:31 verbose #1228 > > "pprrqqpp", "prq"
00:00:31 verbose #1229 > >
00:00:31 verbose #1230 > > "aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbbbbb
00:00:31 verbose #1231 > > ", "acb"
00:00:31 verbose #1232 > > }
00:00:31 verbose #1233 > > let rec uniqueLettersTests = runAll (nameof uniqueLettersTests) _count solutions
00:00:31 verbose #1234 > > testCases
00:00:31 verbose #1235 > > uniqueLettersTests
00:00:31 verbose #1236 > > |> sortResultList
00:00:43 verbose #1237 > >
00:00:43 verbose #1238 > > ╭─[ 12.24s - stdout ]──────────────────────────────────────────────────────────╮
00:00:43 verbose #1239 > > │ │
00:00:43 verbose #1240 > > │ │
00:00:43 verbose #1241 > > │ Test: uniqueLettersTests │
00:00:43 verbose #1242 > > │ │
00:00:43 verbose #1243 > > │ Solution: abc │
00:00:43 verbose #1244 > > │ Test case 1. A. Time: 6L │
00:00:43 verbose #1245 > > │ Test case 2. B. Time: 5L │
00:00:43 verbose #1246 > > │ Test case 3. C. Time: 4L │
00:00:43 verbose #1247 > > │ Test case 4. D. Time: 3L │
00:00:43 verbose #1248 > > │ Test case 5. E. Time: 3L │
00:00:43 verbose #1249 > > │ Test case 6. F. Time: 2L │
00:00:43 verbose #1250 > > │ Test case 7. G. Time: 1L │
00:00:43 verbose #1251 > > │ Test case 8. H. Time: 2L │
00:00:43 verbose #1252 > > │ Test case 9. I. Time: 2L │
00:00:43 verbose #1253 > > │ Test case 10. J. Time: 2L │
00:00:43 verbose #1254 > > │ Test case 11. K. Time: 5L │
00:00:43 verbose #1255 > > │ │
00:00:43 verbose #1256 > > │ Solution: accabb │
00:00:43 verbose #1257 > > │ Test case 1. A. Time: 2L │
00:00:43 verbose #1258 > > │ Test case 2. B. Time: 2L │
00:00:43 verbose #1259 > > │ Test case 3. C. Time: 4L │
00:00:43 verbose #1260 > > │ Test case 4. D. Time: 1L │
00:00:43 verbose #1261 > > │ Test case 5. E. Time: 1L │
00:00:43 verbose #1262 > > │ Test case 6. F. Time: 2L │
00:00:43 verbose #1263 > > │ Test case 7. G. Time: 1L │
00:00:43 verbose #1264 > > │ Test case 8. H. Time: 1L │
00:00:43 verbose #1265 > > │ Test case 9. I. Time: 1L │
00:00:43 verbose #1266 > > │ Test case 10. J. Time: 1L │
00:00:43 verbose #1267 > > │ Test case 11. K. Time: 1L │
00:00:43 verbose #1268 > > │ │
00:00:43 verbose #1269 > > │ Solution: pprrqqpp │
00:00:43 verbose #1270 > > │ Test case 1. A. Time: 1L │
00:00:43 verbose #1271 > > │ Test case 2. B. Time: 2L │
00:00:43 verbose #1272 > > │ Test case 3. C. Time: 3L │
00:00:43 verbose #1273 > > │ Test case 4. D. Time: 1L │
00:00:43 verbose #1274 > > │ Test case 5. E. Time: 1L │
00:00:43 verbose #1275 > > │ Test case 6. F. Time: 1L │
00:00:43 verbose #1276 > > │ Test case 7. G. Time: 1L │
00:00:43 verbose #1277 > > │ Test case 8. H. Time: 1L │
00:00:43 verbose #1278 > > │ Test case 9. I. Time: 1L │
00:00:43 verbose #1279 > > │ Test case 10. J. Time: 1L │
00:00:43 verbose #1280 > > │ Test case 11. K. Time: 1L │
00:00:43 verbose #1281 > > │ │
00:00:43 verbose #1282 > > │ Solution: │
00:00:43 verbose #1283 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:43 verbose #1284 > > │ bbb │
00:00:43 verbose #1285 > > │ Test case 1. A. Time: 14L │
00:00:43 verbose #1286 > > │ Test case 2. B. Time: 10L │
00:00:43 verbose #1287 > > │ Test case 3. C. Time: 15L │
00:00:43 verbose #1288 > > │ Test case 4. D. Time: 7L │
00:00:43 verbose #1289 > > │ Test case 5. E. Time: 9L │
00:00:43 verbose #1290 > > │ Test case 6. F. Time: 14L │
00:00:43 verbose #1291 > > │ Test case 7. G. Time: 13L │
00:00:43 verbose #1292 > > │ Test case 8. H. Time: 10L │
00:00:43 verbose #1293 > > │ Test case 9. I. Time: 10L │
00:00:43 verbose #1294 > > │ Test case 10. J. Time: 9L │
00:00:43 verbose #1295 > > │ Test case 11. K. Time: 3L │
00:00:43 verbose #1296 > > │ │
00:00:43 verbose #1297 > > │ Input │
00:00:43 verbose #1298 > > │ | Expected | Result | Best │
00:00:43 verbose #1299 > > │ --- │
00:00:43 verbose #1300 > > │ | --- | --- | --- │
00:00:43 verbose #1301 > > │ abc │
00:00:43 verbose #1302 > > │ | abc | abc | (7, 1) │
00:00:43 verbose #1303 > > │ accabb │
00:00:43 verbose #1304 > > │ | acb | acb | (4, 1) │
00:00:43 verbose #1305 > > │ pprrqqpp │
00:00:43 verbose #1306 > > │ | prq | prq | (1, 1) │
00:00:43 verbose #1307 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:43 verbose #1308 > > │ bbb | acb | acb | (11, 3) │
00:00:43 verbose #1309 > > │ │
00:00:43 verbose #1310 > > │ Average Ranking │
00:00:43 verbose #1311 > > │ Test case 11. Average Time: 2L │
00:00:43 verbose #1312 > > │ Test case 4. Average Time: 3L │
00:00:43 verbose #1313 > > │ Test case 5. Average Time: 3L │
00:00:43 verbose #1314 > > │ Test case 8. Average Time: 3L │
00:00:43 verbose #1315 > > │ Test case 9. Average Time: 3L │
00:00:43 verbose #1316 > > │ Test case 10. Average Time: 3L │
00:00:43 verbose #1317 > > │ Test case 2. Average Time: 4L │
00:00:43 verbose #1318 > > │ Test case 6. Average Time: 4L │
00:00:43 verbose #1319 > > │ Test case 7. Average Time: 4L │
00:00:43 verbose #1320 > > │ Test case 1. Average Time: 5L │
00:00:43 verbose #1321 > > │ Test case 3. Average Time: 6L │
00:00:43 verbose #1322 > > │ │
00:00:43 verbose #1323 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:43 verbose #1324 > >
00:00:43 verbose #1325 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:43 verbose #1326 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:43 verbose #1327 > > │ ## rotateStringsTests │
00:00:43 verbose #1328 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:43 verbose #1329 > >
00:00:43 verbose #1330 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:43 verbose #1331 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:43 verbose #1332 > > │ https://www.hackerrank.com/challenges/rotate-string/forum │
00:00:43 verbose #1333 > > │ │
00:00:43 verbose #1334 > > │ Test: RotateStrings │
00:00:43 verbose #1335 > > │ │
00:00:43 verbose #1336 > > │ Solution: abc │
00:00:43 verbose #1337 > > │ Test case 1. A. Time: 1842L │
00:00:43 verbose #1338 > > │ Test case 2. B. Time: 1846L │
00:00:43 verbose #1339 > > │ Test case 3. C. Time: 1936L │
00:00:43 verbose #1340 > > │ Test case 4. CA. Time: 2224L │
00:00:43 verbose #1341 > > │ Test case 5. CB. Time: 2329L │
00:00:43 verbose #1342 > > │ Test case 6. D. Time: 2474L │
00:00:43 verbose #1343 > > │ Test case 7. E. Time: 1664L │
00:00:43 verbose #1344 > > │ Test case 8. F. Time: 1517L │
00:00:43 verbose #1345 > > │ Test case 9. FA. Time: 1651L │
00:00:43 verbose #1346 > > │ Test case 10. FB. Time: 3764L │
00:00:43 verbose #1347 > > │ Test case 11. FC. Time: 5415L │
00:00:43 verbose #1348 > > │ │
00:00:43 verbose #1349 > > │ Solution: abcde │
00:00:43 verbose #1350 > > │ Test case 1. A. Time: 3356L │
00:00:43 verbose #1351 > > │ Test case 2. B. Time: 2592L │
00:00:43 verbose #1352 > > │ Test case 3. C. Time: 2346L │
00:00:43 verbose #1353 > > │ Test case 4. CA. Time: 2997L │
00:00:43 verbose #1354 > > │ Test case 5. CB. Time: 3061L │
00:00:43 verbose #1355 > > │ Test case 6. D. Time: 4051L │
00:00:43 verbose #1356 > > │ Test case 7. E. Time: 1905L │
00:00:43 verbose #1357 > > │ Test case 8. F. Time: 1771L │
00:00:43 verbose #1358 > > │ Test case 9. FA. Time: 2175L │
00:00:43 verbose #1359 > > │ Test case 10. FB. Time: 3275L │
00:00:43 verbose #1360 > > │ Test case 11. FC. Time: 5266L │
00:00:43 verbose #1361 > > │ │
00:00:43 verbose #1362 > > │ Solution: abcdefghi │
00:00:43 verbose #1363 > > │ Test case 1. A. Time: 4492L │
00:00:43 verbose #1364 > > │ Test case 2. B. Time: 3526L │
00:00:43 verbose #1365 > > │ Test case 3. C. Time: 3583L │
00:00:43 verbose #1366 > > │ Test case 4. CA. Time: 3711L │
00:00:43 verbose #1367 > > │ Test case 5. CB. Time: 4783L │
00:00:43 verbose #1368 > > │ Test case 6. D. Time: 7557L │
00:00:43 verbose #1369 > > │ Test case 7. E. Time: 3452L │
00:00:43 verbose #1370 > > │ Test case 8. F. Time: 3050L │
00:00:43 verbose #1371 > > │ Test case 9. FA. Time: 3275L │
00:00:43 verbose #1372 > > │ Test case 10. FB. Time: 4635L │
00:00:43 verbose #1373 > > │ Test case 11. FC. Time: 5616L │
00:00:43 verbose #1374 > > │ │
00:00:43 verbose #1375 > > │ Solution: abab │
00:00:43 verbose #1376 > > │ Test case 1. A. Time: 2093L │
00:00:43 verbose #1377 > > │ Test case 2. B. Time: 1843L │
00:00:43 verbose #1378 > > │ Test case 3. C. Time: 1746L │
00:00:43 verbose #1379 > > │ Test case 4. CA. Time: 2085L │
00:00:43 verbose #1380 > > │ Test case 5. CB. Time: 2139L │
00:00:43 verbose #1381 > > │ Test case 6. D. Time: 2095L │
00:00:43 verbose #1382 > > │ Test case 7. E. Time: 1723L │
00:00:43 verbose #1383 > > │ Test case 8. F. Time: 1558L │
00:00:43 verbose #1384 > > │ Test case 9. FA. Time: 1620L │
00:00:43 verbose #1385 > > │ Test case 10. FB. Time: 2319L │
00:00:43 verbose #1386 > > │ Test case 11. FC. Time: 3918L │
00:00:43 verbose #1387 > > │ │
00:00:43 verbose #1388 > > │ Solution: aa │
00:00:43 verbose #1389 > > │ Test case 1. A. Time: 1107L │
00:00:43 verbose #1390 > > │ Test case 2. B. Time: 1241L │
00:00:43 verbose #1391 > > │ Test case 3. C. Time: 1183L │
00:00:43 verbose #1392 > > │ Test case 4. CA. Time: 1563L │
00:00:43 verbose #1393 > > │ Test case 5. CB. Time: 1525L │
00:00:43 verbose #1394 > > │ Test case 6. D. Time: 1591L │
00:00:43 verbose #1395 > > │ Test case 7. E. Time: 1327L │
00:00:43 verbose #1396 > > │ Test case 8. F. Time: 1151L │
00:00:43 verbose #1397 > > │ Test case 9. FA. Time: 1180L │
00:00:43 verbose #1398 > > │ Test case 10. FB. Time: 1733L │
00:00:43 verbose #1399 > > │ Test case 11. FC. Time: 2817L │
00:00:43 verbose #1400 > > │ │
00:00:43 verbose #1401 > > │ Solution: z │
00:00:43 verbose #1402 > > │ Test case 1. A. Time: 816L │
00:00:43 verbose #1403 > > │ Test case 2. B. Time: 745L │
00:00:43 verbose #1404 > > │ Test case 3. C. Time: 928L │
00:00:43 verbose #1405 > > │ Test case 4. CA. Time: 1375L │
00:00:43 verbose #1406 > > │ Test case 5. CB. Time: 1029L │
00:00:43 verbose #1407 > > │ Test case 6. D. Time: 852L │
00:00:43 verbose #1408 > > │ Test case 7. E. Time: 712L │
00:00:43 verbose #1409 > > │ Test case 8. F. Time: 263L │
00:00:43 verbose #1410 > > │ Test case 9. FA. Time: 232L │
00:00:43 verbose #1411 > > │ Test case 10. FB. Time: 773L │
00:00:43 verbose #1412 > > │ Test case 11. FC. Time: 1789L │
00:00:43 verbose #1413 > > │ │
00:00:43 verbose #1414 > > │ Input | Expected │
00:00:43 verbose #1415 > > │ │
00:00:43 verbose #1416 > > │ | Result │
00:00:43 verbose #1417 > > │ │
00:00:43 verbose #1418 > > │ | Best │
00:00:43 verbose #1419 > > │ --- | --- │
00:00:43 verbose #1420 > > │ │
00:00:43 verbose #1421 > > │ | --- │
00:00:43 verbose #1422 > > │ │
00:00:43 verbose #1423 > > │ | --- │
00:00:43 verbose #1424 > > │ abc | bca cab abc │
00:00:43 verbose #1425 > > │ │
00:00:43 verbose #1426 > > │ | bca cab abc │
00:00:43 verbose #1427 > > │ │
00:00:43 verbose #1428 > > │ | (8, 1517) │
00:00:43 verbose #1429 > > │ abcde | bcdea cdeab deabc eabcd abcde │
00:00:43 verbose #1430 > > │ | bcdea cdeab deabc eabcd abcde │
00:00:43 verbose #1431 > > │ | (8, 1771) │
00:00:43 verbose #1432 > > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │
00:00:43 verbose #1433 > > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab │
00:00:43 verbose #1434 > > │ defghiabc efghiabcd fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi │
00:00:43 verbose #1435 > > │ | (8, 3050) │
00:00:43 verbose #1436 > > │ abab | baba abab baba abab │
00:00:43 verbose #1437 > > │ │
00:00:43 verbose #1438 > > │ | baba abab baba abab │
00:00:43 verbose #1439 > > │ │
00:00:43 verbose #1440 > > │ | (8, 1558) │
00:00:43 verbose #1441 > > │ aa | aa aa │
00:00:43 verbose #1442 > > │ │
00:00:43 verbose #1443 > > │ | aa aa │
00:00:43 verbose #1444 > > │ │
00:00:43 verbose #1445 > > │ | (1, 1107) │
00:00:43 verbose #1446 > > │ z | z │
00:00:43 verbose #1447 > > │ │
00:00:43 verbose #1448 > > │ | z │
00:00:43 verbose #1449 > > │ │
00:00:43 verbose #1450 > > │ | (9, 232) │
00:00:43 verbose #1451 > > │ │
00:00:43 verbose #1452 > > │ Averages │
00:00:43 verbose #1453 > > │ Test case 1. Average Time: 2284L │
00:00:43 verbose #1454 > > │ Test case 2. Average Time: 1965L │
00:00:43 verbose #1455 > > │ Test case 3. Average Time: 1953L │
00:00:43 verbose #1456 > > │ Test case 4. Average Time: 2325L │
00:00:43 verbose #1457 > > │ Test case 5. Average Time: 2477L │
00:00:43 verbose #1458 > > │ Test case 6. Average Time: 3103L │
00:00:43 verbose #1459 > > │ Test case 7. Average Time: 1797L │
00:00:43 verbose #1460 > > │ Test case 8. Average Time: 1551L │
00:00:43 verbose #1461 > > │ Test case 9. Average Time: 1688L │
00:00:43 verbose #1462 > > │ Test case 10. Average Time: 2749L │
00:00:43 verbose #1463 > > │ Test case 11. Average Time: 4136L │
00:00:43 verbose #1464 > > │ │
00:00:43 verbose #1465 > > │ Ranking │
00:00:43 verbose #1466 > > │ Test case 11. Average Time: 4136L │
00:00:43 verbose #1467 > > │ Test case 6. Average Time: 3103L │
00:00:43 verbose #1468 > > │ Test case 10. Average Time: 2749L │
00:00:43 verbose #1469 > > │ Test case 5. Average Time: 2477L │
00:00:43 verbose #1470 > > │ Test case 4. Average Time: 2325L │
00:00:43 verbose #1471 > > │ Test case 1. Average Time: 2284L │
00:00:43 verbose #1472 > > │ Test case 2. Average Time: 1965L │
00:00:43 verbose #1473 > > │ Test case 3. Average Time: 1953L │
00:00:43 verbose #1474 > > │ Test case 7. Average Time: 1797L │
00:00:43 verbose #1475 > > │ Test case 9. Average Time: 1688L │
00:00:43 verbose #1476 > > │ Test case 8. Average Time: 1551L │
00:00:43 verbose #1477 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:43 verbose #1478 > >
00:00:43 verbose #1479 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:43 verbose #1480 > > //// test
00:00:43 verbose #1481 > >
00:00:43 verbose #1482 > > let solutions = [[
00:00:43 verbose #1483 > > "A",
00:00:43 verbose #1484 > > fun (input: string) ->
00:00:43 verbose #1485 > > let resultList =
00:00:43 verbose #1486 > > List.fold (fun acc x ->
00:00:43 verbose #1487 > > let rotate (text: string) (letter: string) = (text |>
00:00:43 verbose #1488 > > SpiralSm.slice 1 (input.Length - 1)) + letter
00:00:43 verbose #1489 > > [[ rotate (if acc.IsEmpty then input else acc.Head) (string x)
00:00:43 verbose #1490 > > ]] @ acc
00:00:43 verbose #1491 > > ) [[]] (Seq.toList input)
00:00:43 verbose #1492 > >
00:00:43 verbose #1493 > > (resultList, "")
00:00:43 verbose #1494 > > ||> List.foldBack (fun acc x -> x + acc + " ")
00:00:43 verbose #1495 > > |> _.TrimEnd()
00:00:43 verbose #1496 > >
00:00:43 verbose #1497 > > "B",
00:00:43 verbose #1498 > > fun input ->
00:00:43 verbose #1499 > > input
00:00:43 verbose #1500 > > |> Seq.toList
00:00:43 verbose #1501 > > |> List.fold (fun (acc: string list) letter ->
00:00:43 verbose #1502 > > let last =
00:00:43 verbose #1503 > > if acc.IsEmpty
00:00:43 verbose #1504 > > then input
00:00:43 verbose #1505 > > else acc.Head
00:00:43 verbose #1506 > >
00:00:43 verbose #1507 > > let item = last.[[1 .. input.Length - 1]] + string letter
00:00:43 verbose #1508 > >
00:00:43 verbose #1509 > > item :: acc
00:00:43 verbose #1510 > > ) [[]]
00:00:43 verbose #1511 > > |> List.rev
00:00:43 verbose #1512 > > |> SpiralSm.concat " "
00:00:43 verbose #1513 > >
00:00:43 verbose #1514 > > "C",
00:00:43 verbose #1515 > > fun input ->
00:00:43 verbose #1516 > > input
00:00:43 verbose #1517 > > |> Seq.toList
00:00:43 verbose #1518 > > |> List.fold (fun (acc: string list) letter -> acc.Head.[[ 1 ..
00:00:43 verbose #1519 > > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:00:43 verbose #1520 > > |> List.rev
00:00:43 verbose #1521 > > |> List.skip 1
00:00:43 verbose #1522 > > |> SpiralSm.concat " "
00:00:43 verbose #1523 > >
00:00:43 verbose #1524 > > "CA",
00:00:43 verbose #1525 > > fun input ->
00:00:43 verbose #1526 > > input
00:00:43 verbose #1527 > > |> Seq.fold (fun (acc: string list) letter -> acc.Head.[[ 1 ..
00:00:43 verbose #1528 > > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:00:43 verbose #1529 > > |> Seq.rev
00:00:43 verbose #1530 > > |> Seq.skip 1
00:00:43 verbose #1531 > > |> SpiralSm.concat " "
00:00:43 verbose #1532 > >
00:00:43 verbose #1533 > > "CB",
00:00:43 verbose #1534 > > fun input ->
00:00:43 verbose #1535 > > input
00:00:43 verbose #1536 > > |> Seq.toArray
00:00:43 verbose #1537 > > |> Array.fold (fun (acc: string[[]]) letter -> acc |> Array.append [[|
00:00:43 verbose #1538 > > acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter |]]) [[| input |]]
00:00:43 verbose #1539 > > |> Array.rev
00:00:43 verbose #1540 > > |> Array.skip 1
00:00:43 verbose #1541 > > |> SpiralSm.concat " "
00:00:43 verbose #1542 > >
00:00:43 verbose #1543 > > "D",
00:00:43 verbose #1544 > > fun input ->
00:00:43 verbose #1545 > > input
00:00:43 verbose #1546 > > |> Seq.toList
00:00:43 verbose #1547 > > |> fun list ->
00:00:43 verbose #1548 > > let rec loop (acc: char list list) = function
00:00:43 verbose #1549 > > | _ when acc.Length = list.Length -> acc
00:00:43 verbose #1550 > > | head :: tail ->
00:00:43 verbose #1551 > > let item = tail @ [[ head ]]
00:00:43 verbose #1552 > > loop (item :: acc) item
00:00:43 verbose #1553 > > | [[]] -> [[]]
00:00:43 verbose #1554 > > loop [[]] list
00:00:43 verbose #1555 > > |> List.rev
00:00:43 verbose #1556 > > |> List.map (List.toArray >> String)
00:00:43 verbose #1557 > > |> SpiralSm.concat " "
00:00:43 verbose #1558 > >
00:00:43 verbose #1559 > > "E",
00:00:43 verbose #1560 > > fun input ->
00:00:43 verbose #1561 > > input
00:00:43 verbose #1562 > > |> Seq.toList
00:00:43 verbose #1563 > > |> fun list ->
00:00:43 verbose #1564 > > let rec loop (last: string) = function
00:00:43 verbose #1565 > > | head :: tail ->
00:00:43 verbose #1566 > > let item = last.[[1 .. input.Length - 1]] + string head
00:00:43 verbose #1567 > > item :: loop item tail
00:00:43 verbose #1568 > > | [[]] -> [[]]
00:00:43 verbose #1569 > > loop input list
00:00:43 verbose #1570 > > |> SpiralSm.concat " "
00:00:43 verbose #1571 > >
00:00:43 verbose #1572 > > "F",
00:00:43 verbose #1573 > > fun input ->
00:00:43 verbose #1574 > > Array.singleton 0
00:00:43 verbose #1575 > > |> Array.append [[| 1 .. input.Length - 1 |]]
00:00:43 verbose #1576 > > |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:43 verbose #1577 > > |> SpiralSm.concat " "
00:00:43 verbose #1578 > >
00:00:43 verbose #1579 > > "FA",
00:00:43 verbose #1580 > > fun input ->
00:00:43 verbose #1581 > > List.singleton 0
00:00:43 verbose #1582 > > |> List.append [[ 1 .. input.Length - 1 ]]
00:00:43 verbose #1583 > > |> List.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:43 verbose #1584 > > |> SpiralSm.concat " "
00:00:43 verbose #1585 > >
00:00:43 verbose #1586 > > "FB",
00:00:43 verbose #1587 > > fun input ->
00:00:43 verbose #1588 > > Seq.singleton 0
00:00:43 verbose #1589 > > |> Seq.append (seq { 1 .. input.Length - 1 })
00:00:43 verbose #1590 > > |> Seq.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:43 verbose #1591 > > |> SpiralSm.concat " "
00:00:43 verbose #1592 > >
00:00:43 verbose #1593 > > "FC",
00:00:43 verbose #1594 > > fun input ->
00:00:43 verbose #1595 > > Array.singleton 0
00:00:43 verbose #1596 > > |> Array.append [[| 1 .. input.Length - 1 |]]
00:00:43 verbose #1597 > > |> Array.Parallel.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:43 verbose #1598 > > |> SpiralSm.concat " "
00:00:43 verbose #1599 > > ]]
00:00:43 verbose #1600 > > let testCases = seq {
00:00:43 verbose #1601 > > "abc", "bca cab abc"
00:00:43 verbose #1602 > > "abcde", "bcdea cdeab deabc eabcd abcde"
00:00:43 verbose #1603 > > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef
00:00:43 verbose #1604 > > hiabcdefg iabcdefgh abcdefghi"
00:00:43 verbose #1605 > > "abab", "baba abab baba abab"
00:00:43 verbose #1606 > > "aa", "aa aa"
00:00:43 verbose #1607 > > "z", "z"
00:00:43 verbose #1608 > > }
00:00:43 verbose #1609 > > let rec rotateStringsTests = runAll (nameof rotateStringsTests) _count solutions
00:00:43 verbose #1610 > > testCases
00:00:43 verbose #1611 > > rotateStringsTests
00:00:43 verbose #1612 > > |> sortResultList
00:01:00 verbose #1613 > >
00:01:00 verbose #1614 > > ╭─[ 16.51s - stdout ]──────────────────────────────────────────────────────────╮
00:01:00 verbose #1615 > > │ │
00:01:00 verbose #1616 > > │ │
00:01:00 verbose #1617 > > │ Test: rotateStringsTests │
00:01:00 verbose #1618 > > │ │
00:01:00 verbose #1619 > > │ Solution: abc │
00:01:00 verbose #1620 > > │ Test case 1. A. Time: 3L │
00:01:00 verbose #1621 > > │ Test case 2. B. Time: 3L │
00:01:00 verbose #1622 > > │ Test case 3. C. Time: 2L │
00:01:00 verbose #1623 > > │ Test case 4. CA. Time: 5L │
00:01:00 verbose #1624 > > │ Test case 5. CB. Time: 4L │
00:01:00 verbose #1625 > > │ Test case 6. D. Time: 3L │
00:01:00 verbose #1626 > > │ Test case 7. E. Time: 2L │
00:01:00 verbose #1627 > > │ Test case 8. F. Time: 2L │
00:01:00 verbose #1628 > > │ Test case 9. FA. Time: 5L │
00:01:00 verbose #1629 > > │ Test case 10. FB. Time: 10L │
00:01:00 verbose #1630 > > │ Test case 11. FC. Time: 12L │
00:01:00 verbose #1631 > > │ │
00:01:00 verbose #1632 > > │ Solution: abcde │
00:01:00 verbose #1633 > > │ Test case 1. A. Time: 4L │
00:01:00 verbose #1634 > > │ Test case 2. B. Time: 1L │
00:01:00 verbose #1635 > > │ Test case 3. C. Time: 1L │
00:01:00 verbose #1636 > > │ Test case 4. CA. Time: 1L │
00:01:00 verbose #1637 > > │ Test case 5. CB. Time: 1L │
00:01:00 verbose #1638 > > │ Test case 6. D. Time: 4L │
00:01:00 verbose #1639 > > │ Test case 7. E. Time: 1L │
00:01:00 verbose #1640 > > │ Test case 8. F. Time: 1L │
00:01:00 verbose #1641 > > │ Test case 9. FA. Time: 2L │
00:01:00 verbose #1642 > > │ Test case 10. FB. Time: 6L │
00:01:00 verbose #1643 > > │ Test case 11. FC. Time: 7L │
00:01:00 verbose #1644 > > │ │
00:01:00 verbose #1645 > > │ Solution: abcdefghi │
00:01:00 verbose #1646 > > │ Test case 1. A. Time: 8L │
00:01:00 verbose #1647 > > │ Test case 2. B. Time: 3L │
00:01:00 verbose #1648 > > │ Test case 3. C. Time: 5L │
00:01:00 verbose #1649 > > │ Test case 4. CA. Time: 2L │
00:01:00 verbose #1650 > > │ Test case 5. CB. Time: 4L │
00:01:00 verbose #1651 > > │ Test case 6. D. Time: 7L │
00:01:00 verbose #1652 > > │ Test case 7. E. Time: 3L │
00:01:00 verbose #1653 > > │ Test case 8. F. Time: 0L │
00:01:00 verbose #1654 > > │ Test case 9. FA. Time: 4L │
00:01:00 verbose #1655 > > │ Test case 10. FB. Time: 6L │
00:01:00 verbose #1656 > > │ Test case 11. FC. Time: 5L │
00:01:00 verbose #1657 > > │ │
00:01:00 verbose #1658 > > │ Solution: abab │
00:01:00 verbose #1659 > > │ Test case 1. A. Time: 1L │
00:01:00 verbose #1660 > > │ Test case 2. B. Time: 1L │
00:01:00 verbose #1661 > > │ Test case 3. C. Time: 1L │
00:01:00 verbose #1662 > > │ Test case 4. CA. Time: 1L │
00:01:00 verbose #1663 > > │ Test case 5. CB. Time: 1L │
00:01:00 verbose #1664 > > │ Test case 6. D. Time: 3L │
00:01:00 verbose #1665 > > │ Test case 7. E. Time: 1L │
00:01:00 verbose #1666 > > │ Test case 8. F. Time: 1L │
00:01:00 verbose #1667 > > │ Test case 9. FA. Time: 1L │
00:01:00 verbose #1668 > > │ Test case 10. FB. Time: 2L │
00:01:00 verbose #1669 > > │ Test case 11. FC. Time: 5L │
00:01:00 verbose #1670 > > │ │
00:01:00 verbose #1671 > > │ Solution: aa │
00:01:00 verbose #1672 > > │ Test case 1. A. Time: 1L │
00:01:00 verbose #1673 > > │ Test case 2. B. Time: 0L │
00:01:00 verbose #1674 > > │ Test case 3. C. Time: 0L │
00:01:00 verbose #1675 > > │ Test case 4. CA. Time: 0L │
00:01:00 verbose #1676 > > │ Test case 5. CB. Time: 0L │
00:01:00 verbose #1677 > > │ Test case 6. D. Time: 0L │
00:01:00 verbose #1678 > > │ Test case 7. E. Time: 0L │
00:01:00 verbose #1679 > > │ Test case 8. F. Time: 0L │
00:01:00 verbose #1680 > > │ Test case 9. FA. Time: 0L │
00:01:00 verbose #1681 > > │ Test case 10. FB. Time: 1L │
00:01:00 verbose #1682 > > │ Test case 11. FC. Time: 5L │
00:01:00 verbose #1683 > > │ │
00:01:00 verbose #1684 > > │ Solution: z │
00:01:00 verbose #1685 > > │ Test case 1. A. Time: 0L │
00:01:00 verbose #1686 > > │ Test case 2. B. Time: 0L │
00:01:00 verbose #1687 > > │ Test case 3. C. Time: 0L │
00:01:00 verbose #1688 > > │ Test case 4. CA. Time: 0L │
00:01:00 verbose #1689 > > │ Test case 5. CB. Time: 0L │
00:01:00 verbose #1690 > > │ Test case 6. D. Time: 0L │
00:01:00 verbose #1691 > > │ Test case 7. E. Time: 0L │
00:01:00 verbose #1692 > > │ Test case 8. F. Time: 0L │
00:01:00 verbose #1693 > > │ Test case 9. FA. Time: 0L │
00:01:00 verbose #1694 > > │ Test case 10. FB. Time: 1L │
00:01:00 verbose #1695 > > │ Test case 11. FC. Time: 5L │
00:01:00 verbose #1696 > > │ │
00:01:00 verbose #1697 > > │ Input | Expected │
00:01:00 verbose #1698 > > │ │
00:01:00 verbose #1699 > > │ | Result │
00:01:00 verbose #1700 > > │ │
00:01:00 verbose #1701 > > │ | Best │
00:01:00 verbose #1702 > > │ --- | --- │
00:01:00 verbose #1703 > > │ │
00:01:00 verbose #1704 > > │ | --- │
00:01:00 verbose #1705 > > │ │
00:01:00 verbose #1706 > > │ | --- │
00:01:00 verbose #1707 > > │ abc | bca cab abc │
00:01:00 verbose #1708 > > │ │
00:01:00 verbose #1709 > > │ | bca cab abc │
00:01:00 verbose #1710 > > │ │
00:01:00 verbose #1711 > > │ | (3, 2) │
00:01:00 verbose #1712 > > │ abcde | bcdea cdeab deabc eabcd abcde │
00:01:00 verbose #1713 > > │ | bcdea cdeab deabc eabcd abcde │
00:01:00 verbose #1714 > > │ | (2, 1) │
00:01:00 verbose #1715 > > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │
00:01:00 verbose #1716 > > │ hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd │
00:01:00 verbose #1717 > > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi | (8, 0) │
00:01:00 verbose #1718 > > │ abab | baba abab baba abab │
00:01:00 verbose #1719 > > │ | baba abab baba abab │
00:01:00 verbose #1720 > > │ | (1, 1) │
00:01:00 verbose #1721 > > │ aa | aa aa │
00:01:00 verbose #1722 > > │ │
00:01:00 verbose #1723 > > │ | aa aa │
00:01:00 verbose #1724 > > │ │
00:01:00 verbose #1725 > > │ | (2, 0) │
00:01:00 verbose #1726 > > │ z | z │
00:01:00 verbose #1727 > > │ │
00:01:00 verbose #1728 > > │ | z │
00:01:00 verbose #1729 > > │ │
00:01:00 verbose #1730 > > │ | (1, 0) │
00:01:00 verbose #1731 > > │ │
00:01:00 verbose #1732 > > │ Average Ranking │
00:01:00 verbose #1733 > > │ Test case 8. Average Time: 0L │
00:01:00 verbose #1734 > > │ Test case 2. Average Time: 1L │
00:01:00 verbose #1735 > > │ Test case 3. Average Time: 1L │
00:01:00 verbose #1736 > > │ Test case 4. Average Time: 1L │
00:01:00 verbose #1737 > > │ Test case 5. Average Time: 1L │
00:01:00 verbose #1738 > > │ Test case 7. Average Time: 1L │
00:01:00 verbose #1739 > > │ Test case 1. Average Time: 2L │
00:01:00 verbose #1740 > > │ Test case 6. Average Time: 2L │
00:01:00 verbose #1741 > > │ Test case 9. Average Time: 2L │
00:01:00 verbose #1742 > > │ Test case 10. Average Time: 4L │
00:01:00 verbose #1743 > > │ Test case 11. Average Time: 6L │
00:01:00 verbose #1744 > > │ │
00:01:00 verbose #1745 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:00 verbose #1746 > >
00:01:00 verbose #1747 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:00 verbose #1748 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:00 verbose #1749 > > │ ## rotate_strings_tests │
00:01:00 verbose #1750 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:00 verbose #1751 > >
00:01:00 verbose #1752 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:00 verbose #1753 > > //// test
00:01:00 verbose #1754 > > //// timeout=60000
00:01:00 verbose #1755 > >
00:01:00 verbose #1756 > > inl get_solutions () =
00:01:00 verbose #1757 > > [[
00:01:00 verbose #1758 > > // "A",
00:01:00 verbose #1759 > > // fun (input : string) =>
00:01:00 verbose #1760 > > // let resultList =
00:01:00 verbose #1761 > > // List.fold (fun acc x =>
00:01:00 verbose #1762 > > // let rotate (text : string) (letter : string) =
00:01:00 verbose #1763 > > text.Substring (1, input.Length - 1) + letter
00:01:00 verbose #1764 > > // [[ rotate (if acc.IsEmpty then input else acc.Head)
00:01:00 verbose #1765 > > (string x) ]] ++ acc
00:01:00 verbose #1766 > > // ) [[]] (Seq.toList input)
00:01:00 verbose #1767 > >
00:01:00 verbose #1768 > > // List.foldBack (fun acc x => x + acc + " ") resultList ""
00:01:00 verbose #1769 > > // |> fun x => x.TrimEnd ()
00:01:00 verbose #1770 > >
00:01:00 verbose #1771 > > // "B",
00:01:00 verbose #1772 > > // fun input =>
00:01:00 verbose #1773 > > // input
00:01:00 verbose #1774 > > // |> Seq.toList
00:01:00 verbose #1775 > > // |> List.fold (fun (acc : string list) letter =>
00:01:00 verbose #1776 > > // let last =
00:01:00 verbose #1777 > > // if acc.IsEmpty
00:01:00 verbose #1778 > > // then input
00:01:00 verbose #1779 > > // else acc.Head
00:01:00 verbose #1780 > >
00:01:00 verbose #1781 > > // let item = last.[[1 .. input.Length - 1]] + string letter
00:01:00 verbose #1782 > >
00:01:00 verbose #1783 > > // item :: acc
00:01:00 verbose #1784 > > // ) [[]]
00:01:00 verbose #1785 > > // |> List.rev
00:01:00 verbose #1786 > > // |> SpiralSm.concat " "
00:01:00 verbose #1787 > >
00:01:00 verbose #1788 > > // "C",
00:01:00 verbose #1789 > > // fun input =>
00:01:00 verbose #1790 > > // input
00:01:00 verbose #1791 > > // |> Seq.toList
00:01:00 verbose #1792 > > // |> List.fold (fun (acc : list string) letter => acc.Head.[[ 1 ..
00:01:00 verbose #1793 > > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:01:00 verbose #1794 > > // |> List.rev
00:01:00 verbose #1795 > > // |> List.skip 1
00:01:00 verbose #1796 > > // |> SpiralSm.concat " "
00:01:00 verbose #1797 > >
00:01:00 verbose #1798 > > // "CA",
00:01:00 verbose #1799 > > // fun input =>
00:01:00 verbose #1800 > > // input
00:01:00 verbose #1801 > > // |> Seq.fold (fun (acc : list string) letter => acc.Head.[[ 1 ..
00:01:00 verbose #1802 > > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:01:00 verbose #1803 > > // |> Seq.rev
00:01:00 verbose #1804 > > // |> Seq.skip 1
00:01:00 verbose #1805 > > // |> SpiralSm.concat " "
00:01:00 verbose #1806 > >
00:01:00 verbose #1807 > > // "CB",
00:01:00 verbose #1808 > > // fun input =>
00:01:00 verbose #1809 > > // input
00:01:00 verbose #1810 > > // |> Seq.toArray
00:01:00 verbose #1811 > > // |> Array.fold (fun (acc : a _ string) letter => acc |>
00:01:00 verbose #1812 > > Array.append (a ;[[ acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter ]]))
00:01:00 verbose #1813 > > (a ;[[ input ]])
00:01:00 verbose #1814 > > // |> Array.rev
00:01:00 verbose #1815 > > // |> Array.skip 1
00:01:00 verbose #1816 > > // |> SpiralSm.concat " "
00:01:00 verbose #1817 > >
00:01:00 verbose #1818 > > // "D",
00:01:00 verbose #1819 > > // fun input =>
00:01:00 verbose #1820 > > // input
00:01:00 verbose #1821 > > // |> Seq.toList
00:01:00 verbose #1822 > > // |> fun list =>
00:01:00 verbose #1823 > > // let rec loop (acc : list (list char)) = function
00:01:00 verbose #1824 > > // | _ when acc.Length = list.Length => acc
00:01:00 verbose #1825 > > // | head :: tail =>
00:01:00 verbose #1826 > > // let item = tail ++ [[ head ]]
00:01:00 verbose #1827 > > // loop (item :: acc) item
00:01:00 verbose #1828 > > // | [[]] => [[]]
00:01:00 verbose #1829 > > // loop [[]] list
00:01:00 verbose #1830 > > // |> List.rev
00:01:00 verbose #1831 > > // |> List.map (List.toArray >> String)
00:01:00 verbose #1832 > > // |> SpiralSm.concat " "
00:01:00 verbose #1833 > >
00:01:00 verbose #1834 > > // "E",
00:01:00 verbose #1835 > > // fun input =>
00:01:00 verbose #1836 > > // input
00:01:00 verbose #1837 > > // |> Seq.toList
00:01:00 verbose #1838 > > // |> fun list =>
00:01:00 verbose #1839 > > // let rec loop (last : string) = function
00:01:00 verbose #1840 > > // | head :: tail =>
00:01:00 verbose #1841 > > // let item = last.[[1 .. input.Length - 1]] + string
00:01:00 verbose #1842 > > head
00:01:00 verbose #1843 > > // item :: loop item tail
00:01:00 verbose #1844 > > // | [[]] => [[]]
00:01:00 verbose #1845 > > // loop input list
00:01:00 verbose #1846 > > // |> SpiralSm.concat " "
00:01:00 verbose #1847 > >
00:01:00 verbose #1848 > > "F",
00:01:00 verbose #1849 > > fun input =>
00:01:00 verbose #1850 > > // Array.singleton 0
00:01:00 verbose #1851 > > // |> Array.append [[| 1 .. input.Length - 1 |]]
00:01:00 verbose #1852 > > // |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:00 verbose #1853 > > // |> SpiralSm.concat " "
00:01:00 verbose #1854 > > inl input_length = input |> sm.length
00:01:00 verbose #1855 > > am.singleton 0i32
00:01:00 verbose #1856 > > |> am.append (am'.init_series 1 (input_length - 1) 1)
00:01:00 verbose #1857 > > |> am.map (fun i =>
00:01:00 verbose #1858 > > inl a = input |> sm'.slice i (input_length - 1)
00:01:00 verbose #1859 > > inl b = input |> sm'.slice 0 (i - 1)
00:01:00 verbose #1860 > > a +. b
00:01:00 verbose #1861 > > )
00:01:00 verbose #1862 > > |> seq.of_array
00:01:00 verbose #1863 > > |> sm'.concat " "
00:01:00 verbose #1864 > >
00:01:00 verbose #1865 > > "FA",
00:01:00 verbose #1866 > > fun input =>
00:01:00 verbose #1867 > > // List.singleton 0
00:01:00 verbose #1868 > > // |> List.append [[ 1 .. input.Length - 1 ]]
00:01:00 verbose #1869 > > // // |> List.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:00 verbose #1870 > > // |> SpiralSm.concat " "
00:01:00 verbose #1871 > > inl input_length = input |> sm.length
00:01:00 verbose #1872 > > listm.singleton 0i32
00:01:00 verbose #1873 > > |> listm.append (listm'.init_series 1 (input_length - 1) 1)
00:01:00 verbose #1874 > > |> listm.map (fun i =>
00:01:00 verbose #1875 > > inl a = input |> sm'.slice i (input_length - 1)
00:01:00 verbose #1876 > > inl b = if i = 0 then "" else input |> sm'.slice 0 (i - 1)
00:01:00 verbose #1877 > > a +. b
00:01:00 verbose #1878 > > )
00:01:00 verbose #1879 > > |> listm.toArray
00:01:00 verbose #1880 > > |> fun x => x : a i32 _
00:01:00 verbose #1881 > > |> seq.of_array
00:01:00 verbose #1882 > > |> sm'.concat " "
00:01:00 verbose #1883 > >
00:01:00 verbose #1884 > > // "FB",
00:01:00 verbose #1885 > > // fun input =>
00:01:00 verbose #1886 > > // Seq.singleton 0
00:01:00 verbose #1887 > > // // |> Seq.append (seq { 1 .. input.Length - 1 })
00:01:00 verbose #1888 > > // // |> Seq.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:00 verbose #1889 > > // |> SpiralSm.concat " "
00:01:00 verbose #1890 > >
00:01:00 verbose #1891 > > // "FC",
00:01:00 verbose #1892 > > // fun input =>
00:01:00 verbose #1893 > > // Array.singleton 0
00:01:00 verbose #1894 > > // |> Array.append (a ;[[ 1 .. input.Length - 1 ]])
00:01:00 verbose #1895 > > //// |> Array.Parallel.map (fun i => input.[[ i .. ]] + input.[[ .. i
00:01:00 verbose #1896 > > - 1 ]])
00:01:00 verbose #1897 > > // |> SpiralSm.concat " "
00:01:00 verbose #1898 > > ]]
00:01:00 verbose #1899 > >
00:01:00 verbose #1900 > > inl rec rotate_strings_tests () =
00:01:00 verbose #1901 > > inl test_cases = [[
00:01:00 verbose #1902 > > "abc", "bca cab abc"
00:01:00 verbose #1903 > > "abcde", "bcdea cdeab deabc eabcd abcde"
00:01:00 verbose #1904 > > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde
00:01:00 verbose #1905 > > ghiabcdef hiabcdefg iabcdefgh abcdefghi"
00:01:00 verbose #1906 > > "abab", "baba abab baba abab"
00:01:00 verbose #1907 > > "aa", "aa aa"
00:01:00 verbose #1908 > > "z", "z"
00:01:00 verbose #1909 > > ]]
00:01:00 verbose #1910 > >
00:01:00 verbose #1911 > > inl solutions = get_solutions ()
00:01:00 verbose #1912 > >
00:01:00 verbose #1913 > > // inl is_fast () = true
00:01:00 verbose #1914 > >
00:01:00 verbose #1915 > > inl count =
00:01:00 verbose #1916 > > if is_fast ()
00:01:00 verbose #1917 > > then 1000i32
00:01:00 verbose #1918 > > else 2000000i32
00:01:00 verbose #1919 > >
00:01:00 verbose #1920 > > run_all (nameof rotate_strings_tests) count solutions test_cases
00:01:00 verbose #1921 > > |> sort_result_list
00:01:00 verbose #1922 > >
00:01:00 verbose #1923 > > rotate_strings_tests ()
00:01:30 verbose #1924 > >
00:01:30 verbose #1925 > > ╭─[ 30.28s - stdout ]──────────────────────────────────────────────────────────╮
00:01:30 verbose #1926 > > │ │
00:01:30 verbose #1927 > > │ │
00:01:30 verbose #1928 > > │ Test: v0 │
00:01:30 verbose #1929 > > │ │
00:01:30 verbose #1930 > > │ Solution: "abc" │
00:01:30 verbose #1931 > > │ Test case 1. F. Time: 1441 │
00:01:30 verbose #1932 > > │ Test case 2. FA. Time: 1760 │
00:01:30 verbose #1933 > > │ │
00:01:30 verbose #1934 > > │ Solution: "abcde" │
00:01:30 verbose #1935 > > │ Test case 1. F. Time: 1814 │
00:01:30 verbose #1936 > > │ Test case 2. FA. Time: 2483 │
00:01:30 verbose #1937 > > │ │
00:01:30 verbose #1938 > > │ Solution: "abcdefghi" │
00:01:30 verbose #1939 > > │ Test case 1. F. Time: 2402 │
00:01:30 verbose #1940 > > │ Test case 2. FA. Time: 2468 │
00:01:30 verbose #1941 > > │ │
00:01:30 verbose #1942 > > │ Solution: "abab" │
00:01:30 verbose #1943 > > │ Test case 1. F. Time: 1448 │
00:01:30 verbose #1944 > > │ Test case 2. FA. Time: 1448 │
00:01:30 verbose #1945 > > │ │
00:01:30 verbose #1946 > > │ Solution: "aa" │
00:01:30 verbose #1947 > > │ Test case 1. F. Time: 1151 │
00:01:30 verbose #1948 > > │ Test case 2. FA. Time: 1254 │
00:01:30 verbose #1949 > > │ │
00:01:30 verbose #1950 > > │ Solution: "z" │
00:01:30 verbose #1951 > > │ Test case 1. F. Time: 277 │
00:01:30 verbose #1952 > > │ Test case 2. FA. Time: 251 │
00:01:30 verbose #1953 > > │ │
00:01:30 verbose #1954 > > │ Input | Expected │
00:01:30 verbose #1955 > > │ │
00:01:30 verbose #1956 > > │ | Result │
00:01:30 verbose #1957 > > │ │
00:01:30 verbose #1958 > > │ | Best │
00:01:30 verbose #1959 > > │ --- | --- │
00:01:30 verbose #1960 > > │ │
00:01:30 verbose #1961 > > │ | --- │
00:01:30 verbose #1962 > > │ │
00:01:30 verbose #1963 > > │ | --- │
00:01:30 verbose #1964 > > │ "abc" | "bca cab abc" │
00:01:30 verbose #1965 > > │ │
00:01:30 verbose #1966 > > │ | "bca cab abc" │
00:01:30 verbose #1967 > > │ │
00:01:30 verbose #1968 > > │ | struct (1L, 1441L) │
00:01:30 verbose #1969 > > │ "abcde" | "bcdea cdeab deabc eabcd abcde" │
00:01:30 verbose #1970 > > │ | "bcdea cdeab deabc eabcd abcde" │
00:01:30 verbose #1971 > > │ | struct (1L, 1814L) │
00:01:30 verbose #1972 > > │ "abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │
00:01:30 verbose #1973 > > │ hiabcdefg iabcdefgh abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd │
00:01:30 verbose #1974 > > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi" | struct (1L, 2402L) │
00:01:30 verbose #1975 > > │ "abab" | "baba abab baba abab" │
00:01:30 verbose #1976 > > │ | "baba abab baba abab" │
00:01:30 verbose #1977 > > │ | struct (1L, 1448L) │
00:01:30 verbose #1978 > > │ "aa" | "aa aa" │
00:01:30 verbose #1979 > > │ │
00:01:30 verbose #1980 > > │ | "aa aa" │
00:01:30 verbose #1981 > > │ │
00:01:30 verbose #1982 > > │ | struct (1L, 1151L) │
00:01:30 verbose #1983 > > │ "z" | "z" │
00:01:30 verbose #1984 > > │ │
00:01:30 verbose #1985 > > │ | "z" │
00:01:30 verbose #1986 > > │ │
00:01:30 verbose #1987 > > │ | struct (2L, 251L) │
00:01:30 verbose #1988 > > │ │
00:01:30 verbose #1989 > > │ Average Ranking │
00:01:30 verbose #1990 > > │ Test case 1. Average Time: 1422L │
00:01:30 verbose #1991 > > │ Test case 2. Average Time: 1610L │
00:01:30 verbose #1992 > > │ │
00:01:30 verbose #1993 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:30 verbose #1994 > >
00:01:30 verbose #1995 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:30 verbose #1996 > > //// test
00:01:30 verbose #1997 > >
00:01:30 verbose #1998 > > // rotate_strings_tests ()
00:01:30 verbose #1999 > > ()
00:01:30 verbose #2000 > >
00:01:30 verbose #2001 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:30 verbose #2002 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:30 verbose #2003 > > │ ## binary_search_tests │
00:01:30 verbose #2004 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:30 verbose #2005 > >
00:01:30 verbose #2006 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:30 verbose #2007 > > //// test
00:01:30 verbose #2008 > > //// timeout=90000
00:01:30 verbose #2009 > >
00:01:30 verbose #2010 > > inl binary_search_semi_open_1 arr target left right =
00:01:30 verbose #2011 > > inl rec body left right =
00:01:30 verbose #2012 > > if left >= right
00:01:30 verbose #2013 > > then None
00:01:30 verbose #2014 > > else
00:01:30 verbose #2015 > > inl mid = (left + right) / 2
00:01:30 verbose #2016 > > inl item = index arr mid
00:01:30 verbose #2017 > > if item = target
00:01:30 verbose #2018 > > then Some mid
00:01:30 verbose #2019 > > elif item < target
00:01:30 verbose #2020 > > then loop (mid + 1) right
00:01:30 verbose #2021 > > else loop left mid
00:01:30 verbose #2022 > > and inl loop left right =
00:01:30 verbose #2023 > > if var_is right |> not
00:01:30 verbose #2024 > > then body left right
00:01:30 verbose #2025 > > else
00:01:30 verbose #2026 > > inl left = dyn left
00:01:30 verbose #2027 > > join body left right
00:01:30 verbose #2028 > > loop left right
00:01:30 verbose #2029 > >
00:01:30 verbose #2030 > > inl binary_search_closed_1 arr target left right =
00:01:30 verbose #2031 > > inl rec body left right =
00:01:30 verbose #2032 > > if left > right
00:01:30 verbose #2033 > > then None
00:01:30 verbose #2034 > > else
00:01:30 verbose #2035 > > inl mid = (left + right) / 2
00:01:30 verbose #2036 > > inl item = index arr mid
00:01:30 verbose #2037 > > if item = target
00:01:30 verbose #2038 > > then Some mid
00:01:30 verbose #2039 > > elif item < target
00:01:30 verbose #2040 > > then loop (mid + 1) right
00:01:30 verbose #2041 > > else loop left (mid - 1)
00:01:30 verbose #2042 > > and inl loop left right =
00:01:30 verbose #2043 > > if var_is right |> not
00:01:30 verbose #2044 > > then body left right
00:01:30 verbose #2045 > > else
00:01:30 verbose #2046 > > inl left = dyn left
00:01:30 verbose #2047 > > join body left right
00:01:30 verbose #2048 > > loop left right
00:01:30 verbose #2049 > >
00:01:30 verbose #2050 > > inl binary_search_semi_open_2 arr target left right =
00:01:30 verbose #2051 > > let rec body left right =
00:01:30 verbose #2052 > > if left >= right
00:01:30 verbose #2053 > > then None
00:01:30 verbose #2054 > > else
00:01:30 verbose #2055 > > inl mid = (left + right) / 2
00:01:30 verbose #2056 > > inl item = index arr mid
00:01:30 verbose #2057 > > if item = target
00:01:30 verbose #2058 > > then Some mid
00:01:30 verbose #2059 > > elif item < target
00:01:30 verbose #2060 > > then loop (mid + 1) right
00:01:30 verbose #2061 > > else loop left mid
00:01:30 verbose #2062 > > and inl loop left right = body left right
00:01:30 verbose #2063 > > loop left right
00:01:30 verbose #2064 > >
00:01:30 verbose #2065 > > inl binary_search_closed_2 arr target left right =
00:01:30 verbose #2066 > > let rec body left right =
00:01:30 verbose #2067 > > if left > right
00:01:30 verbose #2068 > > then None
00:01:30 verbose #2069 > > else
00:01:30 verbose #2070 > > inl mid = (left + right) / 2
00:01:30 verbose #2071 > > inl item = index arr mid
00:01:30 verbose #2072 > > if item = target
00:01:30 verbose #2073 > > then Some mid
00:01:30 verbose #2074 > > elif item < target
00:01:30 verbose #2075 > > then loop (mid + 1) right
00:01:30 verbose #2076 > > else loop left (mid - 1)
00:01:30 verbose #2077 > > and inl loop left right = body left right
00:01:30 verbose #2078 > > loop left right
00:01:30 verbose #2079 > >
00:01:30 verbose #2080 > > inl get_solutions () =
00:01:30 verbose #2081 > > [[
00:01:30 verbose #2082 > > "semi_open_1",
00:01:30 verbose #2083 > > fun (arr, (target, len)) =>
00:01:30 verbose #2084 > > binary_search_semi_open_1 arr target 0 len
00:01:30 verbose #2085 > >
00:01:30 verbose #2086 > > "closed_1",
00:01:30 verbose #2087 > > fun (arr, (target, len)) =>
00:01:30 verbose #2088 > > binary_search_closed_1 arr target 0 (len - 1)
00:01:30 verbose #2089 > >
00:01:30 verbose #2090 > > "semi_open_2",
00:01:30 verbose #2091 > > fun (arr, (target, len)) =>
00:01:30 verbose #2092 > > binary_search_semi_open_2 arr target 0 len
00:01:30 verbose #2093 > >
00:01:30 verbose #2094 > > "closed_2",
00:01:30 verbose #2095 > > fun (arr, (target, len)) =>
00:01:30 verbose #2096 > > binary_search_closed_2 arr target 0 (len - 1)
00:01:30 verbose #2097 > > ]]
00:01:30 verbose #2098 > >
00:01:30 verbose #2099 > > inl rec binary_search_tests () =
00:01:30 verbose #2100 > > inl arr_with_len target len arr =
00:01:30 verbose #2101 > > arr, (target, (len |> optionm'.default_with fun () => length arr))
00:01:30 verbose #2102 > >
00:01:30 verbose #2103 > > inl test_cases = [[
00:01:30 verbose #2104 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 None), (Some 3i32)
00:01:30 verbose #2105 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 None), (Some 0i32)
00:01:30 verbose #2106 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 None), (Some 6i32)
00:01:30 verbose #2107 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 None), None
00:01:30 verbose #2108 > > ((am'.init_series 1i32 100 1) |> arr_with_len 60 None), (Some 59)
00:01:30 verbose #2109 > >
00:01:30 verbose #2110 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 (Some 7)), (Some
00:01:30 verbose #2111 > > 3i32)
00:01:30 verbose #2112 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 (Some 7)), (Some
00:01:30 verbose #2113 > > 0i32)
00:01:30 verbose #2114 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 (Some 7)), (Some
00:01:30 verbose #2115 > > 6i32)
00:01:30 verbose #2116 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 (Some 7)), None
00:01:30 verbose #2117 > > ((am'.init_series 1i32 100 1) |> arr_with_len 60 (Some 100)), (Some 59)
00:01:30 verbose #2118 > > ]]
00:01:30 verbose #2119 > >
00:01:30 verbose #2120 > > inl solutions = get_solutions ()
00:01:30 verbose #2121 > >
00:01:30 verbose #2122 > > // inl is_fast () = true
00:01:30 verbose #2123 > >
00:01:30 verbose #2124 > > inl count =
00:01:30 verbose #2125 > > if is_fast ()
00:01:30 verbose #2126 > > then 1000i32
00:01:30 verbose #2127 > > else 8000000i32
00:01:30 verbose #2128 > >
00:01:30 verbose #2129 > > run_all (nameof binary_search_tests) count solutions test_cases
00:01:30 verbose #2130 > > |> sort_result_list
00:01:30 verbose #2131 > >
00:01:30 verbose #2132 > >
00:01:30 verbose #2133 > > let main () =
00:01:30 verbose #2134 > > binary_search_tests ()
00:02:07 verbose #2135 > >
00:02:07 verbose #2136 > > ╭─[ 37.34s - stdout ]──────────────────────────────────────────────────────────╮
00:02:07 verbose #2137 > > │ │
00:02:07 verbose #2138 > > │ │
00:02:07 verbose #2139 > > │ Test: v25 │
00:02:07 verbose #2140 > > │ │
00:02:07 verbose #2141 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:02:07 verbose #2142 > > │ Test case 1. semi_open_1. Time: 655 │
00:02:07 verbose #2143 > > │ Test case 2. closed_1. Time: 570 │
00:02:07 verbose #2144 > > │ Test case 3. semi_open_2. Time: 542 │
00:02:07 verbose #2145 > > │ Test case 4. closed_2. Time: 545 │
00:02:07 verbose #2146 > > │ │
00:02:07 verbose #2147 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:02:07 verbose #2148 > > │ Test case 1. semi_open_1. Time: 501 │
00:02:07 verbose #2149 > > │ Test case 2. closed_1. Time: 501 │
00:02:07 verbose #2150 > > │ Test case 3. semi_open_2. Time: 478 │
00:02:07 verbose #2151 > > │ Test case 4. closed_2. Time: 469 │
00:02:07 verbose #2152 > > │ │
00:02:07 verbose #2153 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:02:07 verbose #2154 > > │ Test case 1. semi_open_1. Time: 501 │
00:02:07 verbose #2155 > > │ Test case 2. closed_1. Time: 470 │
00:02:07 verbose #2156 > > │ Test case 3. semi_open_2. Time: 479 │
00:02:07 verbose #2157 > > │ Test case 4. closed_2. Time: 537 │
00:02:07 verbose #2158 > > │ │
00:02:07 verbose #2159 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:02:07 verbose #2160 > > │ Test case 1. semi_open_1. Time: 549 │
00:02:07 verbose #2161 > > │ Test case 2. closed_1. Time: 543 │
00:02:07 verbose #2162 > > │ Test case 3. semi_open_2. Time: 556 │
00:02:07 verbose #2163 > > │ Test case 4. closed_2. Time: 524 │
00:02:07 verbose #2164 > > │ │
00:02:07 verbose #2165 > > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │
00:02:07 verbose #2166 > > │ 17; 18; 19; 20; │
00:02:07 verbose #2167 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:02:07 verbose #2168 > > │ 37; 38; │
00:02:07 verbose #2169 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:02:07 verbose #2170 > > │ 55; 56; │
00:02:07 verbose #2171 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:02:07 verbose #2172 > > │ 73; 74; │
00:02:07 verbose #2173 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:02:07 verbose #2174 > > │ 91; 92; │
00:02:07 verbose #2175 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │
00:02:07 verbose #2176 > > │ Test case 1. semi_open_1. Time: 525 │
00:02:07 verbose #2177 > > │ Test case 2. closed_1. Time: 516 │
00:02:07 verbose #2178 > > │ Test case 3. semi_open_2. Time: 499 │
00:02:07 verbose #2179 > > │ Test case 4. closed_2. Time: 504 │
00:02:07 verbose #2180 > > │ │
00:02:07 verbose #2181 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:02:07 verbose #2182 > > │ Test case 1. semi_open_1. Time: 486 │
00:02:07 verbose #2183 > > │ Test case 2. closed_1. Time: 460 │
00:02:07 verbose #2184 > > │ Test case 3. semi_open_2. Time: 461 │
00:02:07 verbose #2185 > > │ Test case 4. closed_2. Time: 455 │
00:02:07 verbose #2186 > > │ │
00:02:07 verbose #2187 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:02:07 verbose #2188 > > │ Test case 1. semi_open_1. Time: 538 │
00:02:07 verbose #2189 > > │ Test case 2. closed_1. Time: 526 │
00:02:07 verbose #2190 > > │ Test case 3. semi_open_2. Time: 531 │
00:02:07 verbose #2191 > > │ Test case 4. closed_2. Time: 525 │
00:02:07 verbose #2192 > > │ │
00:02:07 verbose #2193 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:02:07 verbose #2194 > > │ Test case 1. semi_open_1. Time: 469 │
00:02:07 verbose #2195 > > │ Test case 2. closed_1. Time: 488 │
00:02:07 verbose #2196 > > │ Test case 3. semi_open_2. Time: 493 │
00:02:07 verbose #2197 > > │ Test case 4. closed_2. Time: 536 │
00:02:07 verbose #2198 > > │ │
00:02:07 verbose #2199 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:02:07 verbose #2200 > > │ Test case 1. semi_open_1. Time: 506 │
00:02:07 verbose #2201 > > │ Test case 2. closed_1. Time: 504 │
00:02:07 verbose #2202 > > │ Test case 3. semi_open_2. Time: 536 │
00:02:07 verbose #2203 > > │ Test case 4. closed_2. Time: 520 │
00:02:07 verbose #2204 > > │ │
00:02:07 verbose #2205 > > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │
00:02:07 verbose #2206 > > │ 17; 18; 19; 20; │
00:02:07 verbose #2207 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:02:07 verbose #2208 > > │ 37; 38; │
00:02:07 verbose #2209 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:02:07 verbose #2210 > > │ 55; 56; │
00:02:07 verbose #2211 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:02:07 verbose #2212 > > │ 73; 74; │
00:02:07 verbose #2213 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:02:07 verbose #2214 > > │ 91; 92; │
00:02:07 verbose #2215 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │
00:02:07 verbose #2216 > > │ Test case 1. semi_open_1. Time: 510 │
00:02:07 verbose #2217 > > │ Test case 2. closed_1. Time: 546 │
00:02:07 verbose #2218 > > │ Test case 3. semi_open_2. Time: 552 │
00:02:07 verbose #2219 > > │ Test case 4. closed_2. Time: 550 │
00:02:07 verbose #2220 > > │ │
00:02:07 verbose #2221 > > │ Input │
00:02:07 verbose #2222 > > │ │
00:02:07 verbose #2223 > > │ │
00:02:07 verbose #2224 > > │ │
00:02:07 verbose #2225 > > │ | Expected | Result | Best │
00:02:07 verbose #2226 > > │ --- │
00:02:07 verbose #2227 > > │ │
00:02:07 verbose #2228 > > │ │
00:02:07 verbose #2229 > > │ │
00:02:07 verbose #2230 > > │ | --- | --- | --- │
00:02:07 verbose #2231 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:02:07 verbose #2232 > > │ │
00:02:07 verbose #2233 > > │ │
00:02:07 verbose #2234 > > │ │
00:02:07 verbose #2235 > > │ | US0_0 3 | US0_0 3 | struct (3L, 542L) │
00:02:07 verbose #2236 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:02:07 verbose #2237 > > │ │
00:02:07 verbose #2238 > > │ │
00:02:07 verbose #2239 > > │ │
00:02:07 verbose #2240 > > │ | US0_0 0 | US0_0 0 | struct (4L, 469L) │
00:02:07 verbose #2241 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:02:07 verbose #2242 > > │ │
00:02:07 verbose #2243 > > │ │
00:02:07 verbose #2244 > > │ │
00:02:07 verbose #2245 > > │ | US0_0 6 | US0_0 6 | struct (2L, 470L) │
00:02:07 verbose #2246 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:02:07 verbose #2247 > > │ │
00:02:07 verbose #2248 > > │ │
00:02:07 verbose #2249 > > │ │
00:02:07 verbose #2250 > > │ | US0_1 | US0_1 | struct (4L, 524L) │
00:02:07 verbose #2251 > > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │
00:02:07 verbose #2252 > > │ 20; │
00:02:07 verbose #2253 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:02:07 verbose #2254 > > │ 37; 38; │
00:02:07 verbose #2255 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:02:07 verbose #2256 > > │ 55; 56; │
00:02:07 verbose #2257 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:02:07 verbose #2258 > > │ 73; 74; │
00:02:07 verbose #2259 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:02:07 verbose #2260 > > │ 91; 92; │
00:02:07 verbose #2261 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │
00:02:07 verbose #2262 > > │ struct (3L, 499L) │
00:02:07 verbose #2263 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:02:07 verbose #2264 > > │ │
00:02:07 verbose #2265 > > │ │
00:02:07 verbose #2266 > > │ │
00:02:07 verbose #2267 > > │ | US0_0 3 | US0_0 3 | struct (4L, 455L) │
00:02:07 verbose #2268 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:02:07 verbose #2269 > > │ │
00:02:07 verbose #2270 > > │ │
00:02:07 verbose #2271 > > │ │
00:02:07 verbose #2272 > > │ | US0_0 0 | US0_0 0 | struct (4L, 525L) │
00:02:07 verbose #2273 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:02:07 verbose #2274 > > │ │
00:02:07 verbose #2275 > > │ │
00:02:07 verbose #2276 > > │ │
00:02:07 verbose #2277 > > │ | US0_0 6 | US0_0 6 | struct (1L, 469L) │
00:02:07 verbose #2278 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:02:07 verbose #2279 > > │ │
00:02:07 verbose #2280 > > │ │
00:02:07 verbose #2281 > > │ │
00:02:07 verbose #2282 > > │ | US0_1 | US0_1 | struct (2L, 504L) │
00:02:07 verbose #2283 > > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │
00:02:07 verbose #2284 > > │ 20; │
00:02:07 verbose #2285 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:02:07 verbose #2286 > > │ 37; 38; │
00:02:07 verbose #2287 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:02:07 verbose #2288 > > │ 55; 56; │
00:02:07 verbose #2289 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:02:07 verbose #2290 > > │ 73; 74; │
00:02:07 verbose #2291 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:02:07 verbose #2292 > > │ 91; 92; │
00:02:07 verbose #2293 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │
00:02:07 verbose #2294 > > │ struct (1L, 510L) │
00:02:07 verbose #2295 > > │ │
00:02:07 verbose #2296 > > │ Average Ranking │
00:02:07 verbose #2297 > > │ Test case 2. Average Time: 512L │
00:02:07 verbose #2298 > > │ Test case 3. Average Time: 512L │
00:02:07 verbose #2299 > > │ Test case 4. Average Time: 516L │
00:02:07 verbose #2300 > > │ Test case 1. Average Time: 524L │
00:02:07 verbose #2301 > > │ │
00:02:07 verbose #2302 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #2303 > >
00:02:07 verbose #2304 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #2305 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #2306 > > │ ## returnLettersWithOddCountTests │
00:02:07 verbose #2307 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #2308 > >
00:02:07 verbose #2309 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #2310 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #2311 > > │ Test: ReturnLettersWithOddCount │
00:02:07 verbose #2312 > > │ │
00:02:07 verbose #2313 > > │ Solution: 1 │
00:02:07 verbose #2314 > > │ Test case 1. A. Time: 645L │
00:02:07 verbose #2315 > > │ │
00:02:07 verbose #2316 > > │ Solution: 2 │
00:02:07 verbose #2317 > > │ Test case 1. A. Time: 663L │
00:02:07 verbose #2318 > > │ │
00:02:07 verbose #2319 > > │ Solution: 3 │
00:02:07 verbose #2320 > > │ Test case 1. A. Time: 680L │
00:02:07 verbose #2321 > > │ │
00:02:07 verbose #2322 > > │ Solution: 9 │
00:02:07 verbose #2323 > > │ Test case 1. A. Time: 730L │
00:02:07 verbose #2324 > > │ │
00:02:07 verbose #2325 > > │ Solution: 10 │
00:02:07 verbose #2326 > > │ Test case 1. A. Time: 815L │
00:02:07 verbose #2327 > > │ │
00:02:07 verbose #2328 > > │ Input | Expected | Result | Best │
00:02:07 verbose #2329 > > │ --- | --- | --- | --- │
00:02:07 verbose #2330 > > │ 1 | a | a | (1, 645) │
00:02:07 verbose #2331 > > │ 2 | ba | ba | (1, 663) │
00:02:07 verbose #2332 > > │ 3 | aaa | aaa | (1, 680) │
00:02:07 verbose #2333 > > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 730) │
00:02:07 verbose #2334 > > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 815) │
00:02:07 verbose #2335 > > │ │
00:02:07 verbose #2336 > > │ Averages │
00:02:07 verbose #2337 > > │ Test case 1. Average Time: 706L │
00:02:07 verbose #2338 > > │ │
00:02:07 verbose #2339 > > │ Ranking │
00:02:07 verbose #2340 > > │ Test case 1. Average Time: 706L │
00:02:07 verbose #2341 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #2342 > >
00:02:07 verbose #2343 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:07 verbose #2344 > > //// test
00:02:07 verbose #2345 > >
00:02:07 verbose #2346 > > let solutions = [[
00:02:07 verbose #2347 > > "A",
00:02:07 verbose #2348 > > fun n ->
00:02:07 verbose #2349 > > let mutable _builder = StringBuilder (new string('a', n))
00:02:07 verbose #2350 > > if n % 2 = 0 then
00:02:07 verbose #2351 > > _builder.[[0]] <- 'b'
00:02:07 verbose #2352 > >
00:02:07 verbose #2353 > > _builder.ToString ()
00:02:07 verbose #2354 > > ]]
00:02:07 verbose #2355 > > let testCases = seq {
00:02:07 verbose #2356 > > 1, "a"
00:02:07 verbose #2357 > > 2, "ba"
00:02:07 verbose #2358 > > 3, "aaa"
00:02:07 verbose #2359 > > 9, "aaaaaaaaa"
00:02:07 verbose #2360 > > 10, "baaaaaaaaa"
00:02:07 verbose #2361 > > }
00:02:07 verbose #2362 > > let rec returnLettersWithOddCountTests =
00:02:07 verbose #2363 > > runAll (nameof returnLettersWithOddCountTests) _count solutions testCases
00:02:07 verbose #2364 > > returnLettersWithOddCountTests
00:02:07 verbose #2365 > > |> sortResultList
00:02:09 verbose #2366 > >
00:02:09 verbose #2367 > > ╭─[ 1.43s - stdout ]───────────────────────────────────────────────────────────╮
00:02:09 verbose #2368 > > │ │
00:02:09 verbose #2369 > > │ │
00:02:09 verbose #2370 > > │ Test: returnLettersWithOddCountTests │
00:02:09 verbose #2371 > > │ │
00:02:09 verbose #2372 > > │ Solution: 1 │
00:02:09 verbose #2373 > > │ Test case 1. A. Time: 1L │
00:02:09 verbose #2374 > > │ │
00:02:09 verbose #2375 > > │ Solution: 2 │
00:02:09 verbose #2376 > > │ Test case 1. A. Time: 0L │
00:02:09 verbose #2377 > > │ │
00:02:09 verbose #2378 > > │ Solution: 3 │
00:02:09 verbose #2379 > > │ Test case 1. A. Time: 0L │
00:02:09 verbose #2380 > > │ │
00:02:09 verbose #2381 > > │ Solution: 9 │
00:02:09 verbose #2382 > > │ Test case 1. A. Time: 0L │
00:02:09 verbose #2383 > > │ │
00:02:09 verbose #2384 > > │ Solution: 10 │
00:02:09 verbose #2385 > > │ Test case 1. A. Time: 2L │
00:02:09 verbose #2386 > > │ │
00:02:09 verbose #2387 > > │ Input | Expected | Result | Best │
00:02:09 verbose #2388 > > │ --- | --- | --- | --- │
00:02:09 verbose #2389 > > │ 1 | a | a | (1, 1) │
00:02:09 verbose #2390 > > │ 2 | ba | ba | (1, 0) │
00:02:09 verbose #2391 > > │ 3 | aaa | aaa | (1, 0) │
00:02:09 verbose #2392 > > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 0) │
00:02:09 verbose #2393 > > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 2) │
00:02:09 verbose #2394 > > │ │
00:02:09 verbose #2395 > > │ Average Ranking │
00:02:09 verbose #2396 > > │ Test case 1. Average Time: 0L │
00:02:09 verbose #2397 > > │ │
00:02:09 verbose #2398 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:09 verbose #2399 > >
00:02:09 verbose #2400 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:09 verbose #2401 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:09 verbose #2402 > > │ ## hasAnyPairCloseToEachotherTests │
00:02:09 verbose #2403 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:09 verbose #2404 > >
00:02:09 verbose #2405 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:09 verbose #2406 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:09 verbose #2407 > > │ Test: HasAnyPairCloseToEachother │
00:02:09 verbose #2408 > > │ │
00:02:09 verbose #2409 > > │ Solution: 0 │
00:02:09 verbose #2410 > > │ Test case 1. A. Time: 137L │
00:02:09 verbose #2411 > > │ │
00:02:09 verbose #2412 > > │ Solution: 1,2 │
00:02:09 verbose #2413 > > │ Test case 1. A. Time: 186L │
00:02:09 verbose #2414 > > │ │
00:02:09 verbose #2415 > > │ Solution: 3,5 │
00:02:09 verbose #2416 > > │ Test case 1. A. Time: 206L │
00:02:09 verbose #2417 > > │ │
00:02:09 verbose #2418 > > │ Solution: 3,4,6 │
00:02:09 verbose #2419 > > │ Test case 1. A. Time: 149L │
00:02:09 verbose #2420 > > │ │
00:02:09 verbose #2421 > > │ Solution: 2,4,6 │
00:02:09 verbose #2422 > > │ Test case 1. A. Time: 150L │
00:02:09 verbose #2423 > > │ │
00:02:09 verbose #2424 > > │ Input | Expected | Result | Best │
00:02:09 verbose #2425 > > │ --- | --- | --- | --- │
00:02:09 verbose #2426 > > │ 0 | False | False | (1, 137) │
00:02:09 verbose #2427 > > │ 1,2 | True | True | (1, 186) │
00:02:09 verbose #2428 > > │ 3,5 | False | False | (1, 206) │
00:02:09 verbose #2429 > > │ 3,4,6 | True | True | (1, 149) │
00:02:09 verbose #2430 > > │ 2,4,6 | False | False | (1, 150) │
00:02:09 verbose #2431 > > │ │
00:02:09 verbose #2432 > > │ Averages │
00:02:09 verbose #2433 > > │ Test case 1. Average Time: 165L │
00:02:09 verbose #2434 > > │ │
00:02:09 verbose #2435 > > │ Ranking │
00:02:09 verbose #2436 > > │ Test case 1. Average Time: 165L │
00:02:09 verbose #2437 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:09 verbose #2438 > >
00:02:09 verbose #2439 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:09 verbose #2440 > > //// test
00:02:09 verbose #2441 > >
00:02:09 verbose #2442 > > let solutions = [[
00:02:09 verbose #2443 > > "A",
00:02:09 verbose #2444 > > fun (a: int[[]]) ->
00:02:09 verbose #2445 > > let indices = System.Linq.Enumerable.Range(0, a.Length) |>
00:02:09 verbose #2446 > > System.Linq.Enumerable.ToArray
00:02:09 verbose #2447 > > System.Array.Sort (a, indices)
00:02:09 verbose #2448 > >
00:02:09 verbose #2449 > > indices
00:02:09 verbose #2450 > > |> Array.take (a.Length - 1)
00:02:09 verbose #2451 > > |> Array.exists (fun i -> a.[[i + 1]] - a.[[i]] = 1)
00:02:09 verbose #2452 > > ]]
00:02:09 verbose #2453 > > let testCases = seq {
00:02:09 verbose #2454 > > [[| 0 |]], false
00:02:09 verbose #2455 > > [[| 1; 2 |]], true
00:02:09 verbose #2456 > > [[| 3; 5 |]], false
00:02:09 verbose #2457 > > [[| 3; 4; 6 |]], true
00:02:09 verbose #2458 > > [[| 2; 4; 6 |]], false
00:02:09 verbose #2459 > > }
00:02:09 verbose #2460 > > let rec hasAnyPairCloseToEachotherTests =
00:02:09 verbose #2461 > > runAll (nameof hasAnyPairCloseToEachotherTests) _count solutions testCases
00:02:09 verbose #2462 > > hasAnyPairCloseToEachotherTests
00:02:09 verbose #2463 > > |> sortResultList
00:02:10 verbose #2464 > >
00:02:10 verbose #2465 > > ╭─[ 1.42s - stdout ]───────────────────────────────────────────────────────────╮
00:02:10 verbose #2466 > > │ │
00:02:10 verbose #2467 > > │ │
00:02:10 verbose #2468 > > │ Test: hasAnyPairCloseToEachotherTests │
00:02:10 verbose #2469 > > │ │
00:02:10 verbose #2470 > > │ Solution: 0 │
00:02:10 verbose #2471 > > │ Test case 1. A. Time: 5L │
00:02:10 verbose #2472 > > │ │
00:02:10 verbose #2473 > > │ Solution: 1,2 │
00:02:10 verbose #2474 > > │ Test case 1. A. Time: 0L │
00:02:10 verbose #2475 > > │ │
00:02:10 verbose #2476 > > │ Solution: 3,5 │
00:02:10 verbose #2477 > > │ Test case 1. A. Time: 0L │
00:02:10 verbose #2478 > > │ │
00:02:10 verbose #2479 > > │ Solution: 3,4,6 │
00:02:10 verbose #2480 > > │ Test case 1. A. Time: 0L │
00:02:10 verbose #2481 > > │ │
00:02:10 verbose #2482 > > │ Solution: 2,4,6 │
00:02:10 verbose #2483 > > │ Test case 1. A. Time: 0L │
00:02:10 verbose #2484 > > │ │
00:02:10 verbose #2485 > > │ Input | Expected | Result | Best │
00:02:10 verbose #2486 > > │ --- | --- | --- | --- │
00:02:10 verbose #2487 > > │ 0 | False | False | (1, 5) │
00:02:10 verbose #2488 > > │ 1,2 | True | True | (1, 0) │
00:02:10 verbose #2489 > > │ 3,5 | False | False | (1, 0) │
00:02:10 verbose #2490 > > │ 3,4,6 | True | True | (1, 0) │
00:02:10 verbose #2491 > > │ 2,4,6 | False | False | (1, 0) │
00:02:10 verbose #2492 > > │ │
00:02:10 verbose #2493 > > │ Average Ranking │
00:02:10 verbose #2494 > > │ Test case 1. Average Time: 1L │
00:02:10 verbose #2495 > > │ │
00:02:10 verbose #2496 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #2497 > 00:02:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 124780
00:02:10 verbose #2498 > 00:02:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:13 verbose #2499 > 00:02:09 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/perf/Perf.dib.ipynb to html
00:02:13 verbose #2500 > 00:02:09 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:02:13 verbose #2501 > 00:02:09 verbose #7 ! validate(nb)
00:02:16 verbose #2502 > 00:02:12 verbose #8 ! [NbConvertApp] Writing 445216 bytes to c:\home\git\polyglot\apps\perf\Perf.dib.html
00:02:16 verbose #2503 > 00:02:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637
00:02:16 verbose #2504 > 00:02:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637
00:02:16 verbose #2505 > 00:02:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:17 verbose #2506 > 00:02:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:17 verbose #2507 > 00:02:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:18 verbose #2508 > 00:02:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 125476
00:02:18 debug #2509 execute_with_options_async / exit_code: 0 / output.Length: 132655
00:02:18 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Perf.dib --retries 3
00:02:18 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:02:18 debug #8 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Fs / path: Perf.dib
00:00:00 debug #2 parseDibCode / output: Fs / file: Perf.dib
In [ ]:
{ pwsh ../apps/dir-tree-html/build.ps1 } | Invoke-Block
00:00:01 debug #1 run_with_timeout_async / timeout: 500
00:00:01 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:02 debug #4 run_with_timeout_async / timeout: 100
00:00:02 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path DirTreeHtml.dib",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "DirTreeHtml.dib"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib", "--output-path", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib" --output-path "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:06 verbose #10 > >
00:00:06 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #13 > > │ # DirTreeHtml (Polyglot) │
00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #15 > >
00:00:06 verbose #16 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:06 verbose #17 > > #r
00:00:06 verbose #18 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:00:06 verbose #19 > > dard2.1/FSharp.Control.AsyncSeq.dll"
00:00:06 verbose #20 > > #r
00:00:06 verbose #21 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:00:06 verbose #22 > > 0/System.Reactive.dll"
00:00:06 verbose #23 > > #r
00:00:06 verbose #24 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:00:06 verbose #25 > > netstandard2.0/System.Reactive.Linq.dll"
00:00:06 verbose #26 > > #r
00:00:06 verbose #27 > > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:00:06 verbose #28 > > #r
00:00:06 verbose #29 > > @"../../../../../../../.nuget/packages/falco.markup/1.1.1/lib/netstandard2.0/Fal
00:00:06 verbose #30 > > co.Markup.dll"
00:00:06 verbose #31 > >
00:00:06 verbose #32 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:06 verbose #33 > > #r
00:00:06 verbose #34 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:06 verbose #35 > > spNetCore.Html.Abstractions.dll"
00:00:06 verbose #36 > > #r
00:00:06 verbose #37 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #38 > > otNet.Interactive.dll"
00:00:06 verbose #39 > > #r
00:00:06 verbose #40 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #41 > > otNet.Interactive.FSharp.dll"
00:00:06 verbose #42 > > #r
00:00:06 verbose #43 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #44 > > otNet.Interactive.Formatting.dll"
00:00:06 verbose #45 > > open System
00:00:06 verbose #46 > > open System.IO
00:00:06 verbose #47 > > open System.Text
00:00:06 verbose #48 > > open Microsoft.DotNet.Interactive.Formatting
00:00:10 verbose #49 > >
00:00:10 verbose #50 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:10 verbose #51 > > #r
00:00:10 verbose #52 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:10 verbose #53 > > otNet.Interactive.FSharp.dll"
00:00:10 verbose #54 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:10 verbose #55 > > #r
00:00:10 verbose #56 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:10 verbose #57 > > otNet.Interactive.dll"
00:00:10 verbose #58 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:11 verbose #59 > >
00:00:11 verbose #60 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:11 verbose #61 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:00:12 verbose #62 > >
00:00:12 verbose #63 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #64 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:00:12 verbose #65 > > TextWriter)->fprintfn writer "%120A" x)
00:00:12 verbose #66 > >
00:00:12 verbose #67 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #68 > > #!import ../../lib/fsharp/Notebooks.dib
00:00:12 verbose #69 > > #!import ../../lib/fsharp/Testing.dib
00:00:12 verbose #70 > >
00:00:12 verbose #71 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #72 > > //// test
00:00:12 verbose #73 > >
00:00:12 verbose #74 > > Formatter.ListExpansionLimit <- 100
00:00:12 verbose #75 > >
00:00:12 verbose #76 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 verbose #77 > > #if FABLE_COMPILER
00:00:12 verbose #78 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:12 verbose #79 > > #endif
00:00:12 verbose #80 > > type std_env_VarError = class end
00:00:12 verbose #81 > > #if FABLE_COMPILER
00:00:12 verbose #82 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:12 verbose #83 > > #endif
00:00:12 verbose #84 > > type core_any_Any = class end
00:00:12 verbose #85 > > #if FABLE_COMPILER
00:00:12 verbose #86 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:12 verbose #87 > > #endif
00:00:12 verbose #88 > > type core_ops_Try<'T> = class end
00:00:12 verbose #89 > > #if FABLE_COMPILER
00:00:12 verbose #90 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:12 verbose #91 > > #endif
00:00:12 verbose #92 > > type Func0<'T> = class end
00:00:12 verbose #93 > > #if FABLE_COMPILER
00:00:12 verbose #94 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:12 verbose #95 > > #endif
00:00:12 verbose #96 > > type Func0<'T, 'U> = class end
00:00:12 verbose #97 > > #if FABLE_COMPILER
00:00:12 verbose #98 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:12 verbose #99 > > #endif
00:00:12 verbose #100 > > type Box<'T> = class end
00:00:12 verbose #101 > > #if FABLE_COMPILER
00:00:12 verbose #102 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:12 verbose #103 > > #endif
00:00:12 verbose #104 > > type Dyn<'T> = class end
00:00:12 verbose #105 > > #if FABLE_COMPILER
00:00:12 verbose #106 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:12 verbose #107 > > #endif
00:00:12 verbose #108 > > type Send<'T> = class end
00:00:12 verbose #109 > > #if FABLE_COMPILER
00:00:12 verbose #110 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:12 verbose #111 > > #endif
00:00:12 verbose #112 > > type Fn<'T> = class end
00:00:12 verbose #113 > > #if FABLE_COMPILER
00:00:12 verbose #114 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:12 verbose #115 > > #endif
00:00:12 verbose #116 > > type FnUnit = class end
00:00:12 verbose #117 > > #if FABLE_COMPILER
00:00:12 verbose #118 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:12 verbose #119 > > #endif
00:00:12 verbose #120 > > type FnOnce<'T> = class end
00:00:12 verbose #121 > > #if FABLE_COMPILER
00:00:12 verbose #122 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:12 verbose #123 > > #endif
00:00:12 verbose #124 > > type ActionFn<'T> = class end
00:00:12 verbose #125 > > #if FABLE_COMPILER
00:00:12 verbose #126 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:12 verbose #127 > > #endif
00:00:12 verbose #128 > > type ActionFn2<'T, 'U> = class end
00:00:12 verbose #129 > > #if FABLE_COMPILER
00:00:12 verbose #130 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:12 verbose #131 > > #endif
00:00:12 verbose #132 > > type Impl<'T> = class end
00:00:12 verbose #133 > > #if FABLE_COMPILER
00:00:12 verbose #134 > > [[<Fable...
00:00:14 verbose #135 > >
00:00:14 verbose #136 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:14 verbose #137 > > #if FABLE_COMPILER
00:00:14 verbose #138 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:14 verbose #139 > > #endif
00:00:14 verbose #140 > > type core_any_Any = class end
00:00:14 verbose #141 > > #if FABLE_COMPILER
00:00:14 verbose #142 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:14 verbose #143 > > #endif
00:00:14 verbose #144 > > type core_ops_Try<'T> = class end
00:00:14 verbose #145 > > #if FABLE_COMPILER
00:00:14 verbose #146 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:14 verbose #147 > > #endif
00:00:14 verbose #148 > > type Func0<'T> = class end
00:00:14 verbose #149 > > #if FABLE_COMPILER
00:00:14 verbose #150 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:14 verbose #151 > > #endif
00:00:14 verbose #152 > > type Func0<'T, 'U> = class end
00:00:14 verbose #153 > > #if FABLE_COMPILER
00:00:14 verbose #154 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:14 verbose #155 > > #endif
00:00:14 verbose #156 > > type Box<'T> = class end
00:00:14 verbose #157 > > #if FABLE_COMPILER
00:00:14 verbose #158 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:14 verbose #159 > > #endif
00:00:14 verbose #160 > > type Dyn<'T> = class end
00:00:14 verbose #161 > > #if FABLE_COMPILER
00:00:14 verbose #162 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:14 verbose #163 > > #endif
00:00:14 verbose #164 > > type Send<'T> = class end
00:00:14 verbose #165 > > #if FABLE_COMPILER
00:00:14 verbose #166 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:14 verbose #167 > > #endif
00:00:14 verbose #168 > > type Fn<'T> = class end
00:00:14 verbose #169 > > #if FABLE_COMPILER
00:00:14 verbose #170 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:14 verbose #171 > > #endif
00:00:14 verbose #172 > > type FnUnit = class end
00:00:14 verbose #173 > > #if FABLE_COMPILER
00:00:14 verbose #174 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:14 verbose #175 > > #endif
00:00:14 verbose #176 > > type FnOnce<'T> = class end
00:00:14 verbose #177 > > #if FABLE_COMPILER
00:00:14 verbose #178 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:14 verbose #179 > > #endif
00:00:14 verbose #180 > > type ActionFn<'T> = class end
00:00:14 verbose #181 > > #if FABLE_COMPILER
00:00:14 verbose #182 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:14 verbose #183 > > #endif
00:00:14 verbose #184 > > type ActionFn2<'T, 'U> = class end
00:00:14 verbose #185 > > #if FABLE_COMPILER
00:00:14 verbose #186 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:14 verbose #187 > > #endif
00:00:14 verbose #188 > > type Impl<'T> = class end
00:00:14 verbose #189 > > #if FABLE_COMPILER
00:00:14 verbose #190 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:14 verbose #191 > > #endif
00:00:14 verbose #192 > > type Mut<'T> = class end
00:00:14 verbose #193 > > #if FABLE_COMPILER
00:00:14 verbose #194 > > [[<Fable.Core.Erase; Fable.Co...
00:00:16 verbose #195 > >
00:00:16 verbose #196 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:16 verbose #197 > > #if FABLE_COMPILER
00:00:16 verbose #198 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:00:16 verbose #199 > > #endif
00:00:16 verbose #200 > > type async_std_task_JoinHandle<'T> = class end
00:00:16 verbose #201 > > #if FABLE_COMPILER
00:00:16 verbose #202 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:00:16 verbose #203 > > #endif
00:00:16 verbose #204 > > type std_future_Future<'T> = class end
00:00:16 verbose #205 > > #if FABLE_COMPILER
00:00:16 verbose #206 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:00:16 verbose #207 > > #endif
00:00:16 verbose #208 > > type rayon_vec_IntoIter<'T> = class end
00:00:16 verbose #209 > > #if FABLE_COMPILER
00:00:16 verbose #210 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:00:16 verbose #211 > > #endif
00:00:16 verbose #212 > > type rayon_iter_Map<'T> = class end
00:00:16 verbose #213 > > #if FABLE_COMPILER
00:00:16 verbose #214 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:00:16 verbose #215 > > #endif
00:00:16 verbose #216 > > type futures_lite_stream_StreamExt = class end
00:00:16 verbose #217 > > #if FABLE_COMPILER
00:00:16 verbose #218 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:00:16 verbose #219 > > #endif
00:00:16 verbose #220 > > type futures_future_TryJoinAll<'T> = class end
00:00:16 verbose #221 > > #if FABLE_COMPILER
00:00:16 verbose #222 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:00:16 verbose #223 > > #endif
00:00:16 verbose #224 > > type futures_future_Fuse<'T> = class end
00:00:16 verbose #225 > > #if FABLE_COMPILER
00:00:16 verbose #226 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:00:16 verbose #227 > > #endif
00:00:16 verbose #228 > > type futures_future_JoinAll<'T> = class end
00:00:16 verbose #229 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:00:16 verbose #230 > > Async<System.Threading.CancellationToken> =
00:00:16 verbose #231 > > let v1 : bool = true
00:00:16 verbose #232 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:00:16 verbose #233 > >
00:00:16 verbose #234 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:16 verbose #235 > >
00:00:16 verbose #236 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:16 verbose #237 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:00:16 verbose #238 > > unbox<Async<System...
00:00:16 verbose #239 > >
00:00:16 verbose #240 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:16 verbose #241 > > #if FABLE_COMPILER
00:00:16 verbose #242 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:00:16 verbose #243 > > #endif
00:00:16 verbose #244 > > type std_thread_JoinHandle<'T> = class end
00:00:16 verbose #245 > > #if FABLE_COMPILER
00:00:16 verbose #246 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:00:16 verbose #247 > > #endif
00:00:16 verbose #248 > > type std_sync_Arc<'T> = class end
00:00:16 verbose #249 > > #if FABLE_COMPILER
00:00:16 verbose #250 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:00:16 verbose #251 > > #endif
00:00:16 verbose #252 > > type std_sync_Mutex<'T> = class end
00:00:16 verbose #253 > > #if FABLE_COMPILER
00:00:16 verbose #254 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:00:16 verbose #255 > > #endif
00:00:16 verbose #256 > > type std_sync_MutexGuard<'T> = class end
00:00:16 verbose #257 > > #if FABLE_COMPILER
00:00:16 verbose #258 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:00:16 verbose #259 > > #endif
00:00:16 verbose #260 > > type std_sync_PoisonError<'T> = class end
00:00:16 verbose #261 > > #if FABLE_COMPILER
00:00:16 verbose #262 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:00:16 verbose #263 > > #endif
00:00:16 verbose #264 > > type std_sync_mpsc_Receiver<'T> = class end
00:00:16 verbose #265 > > #if FABLE_COMPILER
00:00:16 verbose #266 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:00:16 verbose #267 > > #endif
00:00:16 verbose #268 > > type std_sync_mpsc_SendError<'T> = class end
00:00:16 verbose #269 > > #if FABLE_COMPILER
00:00:16 verbose #270 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:00:16 verbose #271 > > #endif
00:00:16 verbose #272 > > type std_sync_mpsc_Sender<'T> = class end
00:00:16 verbose #273 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:00:16 verbose #274 > > _.Dispose () = f ()
00:00:16 verbose #275 > > type [[<Struct>]] US0 =
00:00:16 verbose #276 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:00:16 verbose #277 > > | US0_1
00:00:16 verbose #278 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:00:16 verbose #279 > > let v1 : bool = true
00:00:16 verbose #280 > > let mutable _v1 : unit option = None
00:00:16 verbose #281 > >
00:00:16 verbose #282 > > #if FABLE_COMPILER || WASM || CONTRACT
00:00:16 verbose #283 > >
00:00:16 verbose #284 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:00:16 verbose #285 > >
00:00:16 verbose #286 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:16 verbose #287 > > #if FABLE_COMPILER
00:00:16 verbose #288 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:00:16 verbose #289 > > #endif
00:00:16 verbose #290 > > type reqwest_Error = class end
00:00:16 verbose #291 > > #if FABLE_COMPILER
00:00:16 verbose #292 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:00:16 verbose #293 > > #endif
00:00:16 verbose #294 > > type reqwest_RequestBuilder = class end
00:00:16 verbose #295 > > #if FABLE_COMPILER
00:00:16 verbose #296 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:00:16 verbose #297 > > #endif
00:00:16 verbose #298 > > type reqwest_Response = class end
00:00:16 verbose #299 > > #if FABLE_COMPILER
00:00:16 verbose #300 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:16 verbose #301 > > #endif
00:00:16 verbose #302 > > type std_env_VarError = class end
00:00:16 verbose #303 > > #if FABLE_COMPILER
00:00:16 verbose #304 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:16 verbose #305 > > #endif
00:00:16 verbose #306 > > type core_any_Any = class end
00:00:16 verbose #307 > > #if FABLE_COMPILER
00:00:16 verbose #308 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:16 verbose #309 > > #endif
00:00:16 verbose #310 > > type core_ops_Try<'T> = class end
00:00:16 verbose #311 > > #if FABLE_COMPILER
00:00:16 verbose #312 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:16 verbose #313 > > #endif
00:00:16 verbose #314 > > type Func0<'T> = class end
00:00:16 verbose #315 > > #if FABLE_COMPILER
00:00:16 verbose #316 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:16 verbose #317 > > #endif
00:00:16 verbose #318 > > type Func0<'T, 'U> = class end
00:00:16 verbose #319 > > #if FABLE_COMPILER
00:00:16 verbose #320 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:16 verbose #321 > > #endif
00:00:16 verbose #322 > > type Box<'T> = class end
00:00:16 verbose #323 > > #if FABLE_COMPILER
00:00:16 verbose #324 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:16 verbose #325 > > #endif
00:00:16 verbose #326 > > type Dyn<'T> = class end
00:00:16 verbose #327 > > #if FABLE_COMPILER
00:00:16 verbose #328 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:00:16 verbose #329 > > #endif
00:00:16 verbose #330 > > type Send<'T> = class end
00:00:16 verbose #331 > > #if FABLE_COMPILER
00:00:16 verbose #332 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:16 verbose #333 > > #endif
00:00:16 verbose #334 > > type Fn<'T> = class end
00:00:16 verbose #335 > > #if FABLE_COMPILER
00:00:16 verbose #336 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:16 verbose #337 > > #endif
00:00:16 verbose #338 > > type FnUnit = class end
00:00:16 verbose #339 > > #if FABLE_COMPILER
00:00:16 verbose #340 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:16 verbose #341 > > #...
00:00:18 verbose #342 > >
00:00:18 verbose #343 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:18 verbose #344 > > #if FABLE_COMPILER
00:00:18 verbose #345 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:00:18 verbose #346 > > #endif
00:00:18 verbose #347 > > type clap_Arg = class end
00:00:18 verbose #348 > > #if FABLE_COMPILER
00:00:18 verbose #349 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:00:18 verbose #350 > > #endif
00:00:18 verbose #351 > > type clap_ArgAction = class end
00:00:18 verbose #352 > > #if FABLE_COMPILER
00:00:18 verbose #353 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:00:18 verbose #354 > > #endif
00:00:18 verbose #355 > > type clap_Command = class end
00:00:18 verbose #356 > > #if FABLE_COMPILER
00:00:18 verbose #357 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:00:18 verbose #358 > > #endif
00:00:18 verbose #359 > > type clap_ArgMatches = class end
00:00:18 verbose #360 > > #if FABLE_COMPILER
00:00:18 verbose #361 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:00:18 verbose #362 > > #endif
00:00:18 verbose #363 > > type clap_builder_ValueRange = class end
00:00:18 verbose #364 > > #if FABLE_COMPILER
00:00:18 verbose #365 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:00:18 verbose #366 > > #endif
00:00:18 verbose #367 > > type clap_builder_ValueParser = class end
00:00:18 verbose #368 > > #if FABLE_COMPILER
00:00:18 verbose #369 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:00:18 verbose #370 > > #endif
00:00:18 verbose #371 > > type clap_builder_PossibleValue = class end
00:00:18 verbose #372 > > #if FABLE_COMPILER
00:00:18 verbose #373 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:00:18 verbose #374 > > #endif
00:00:18 verbose #375 > > type std_process_Child = class end
00:00:18 verbose #376 > > #if FABLE_COMPILER
00:00:18 verbose #377 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:00:18 verbose #378 > > #endif
00:00:18 verbose #379 > > type std_process_ChildStderr = class end
00:00:18 verbose #380 > > #if FABLE_COMPILER
00:00:18 verbose #381 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:00:18 verbose #382 > > #endif
00:00:18 verbose #383 > > type std_process_ChildStdout = class end
00:00:18 verbose #384 > > #if FABLE_COMPILER
00:00:18 verbose #385 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:00:18 verbose #386 > > #endif
00:00:18 verbose #387 > > type std_process_ChildStdin = class end
00:00:18 verbose #388 > > #if FABLE_COMPILER
00:00:18 verbose #389 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:00:18 verbose #390 > > #endif
00:00:18 verbose #391 > > type std_process_Command = class ...
00:00:21 verbose #392 > >
00:00:21 verbose #393 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #394 > > #if FABLE_COMPILER
00:00:21 verbose #395 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:00:21 verbose #396 > > #endif
00:00:21 verbose #397 > > type std_fs_File = class end
00:00:21 verbose #398 > > #if FABLE_COMPILER
00:00:21 verbose #399 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:00:21 verbose #400 > > #endif
00:00:21 verbose #401 > > type std_fs_FileType = class end
00:00:21 verbose #402 > > #if FABLE_COMPILER
00:00:21 verbose #403 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:00:21 verbose #404 > > #endif
00:00:21 verbose #405 > > type std_path_Display = class end
00:00:21 verbose #406 > > #if FABLE_COMPILER
00:00:21 verbose #407 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:00:21 verbose #408 > > #endif
00:00:21 verbose #409 > > type std_path_Path = class end
00:00:21 verbose #410 > > #if FABLE_COMPILER
00:00:21 verbose #411 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:00:21 verbose #412 > > #endif
00:00:21 verbose #413 > > type std_path_PathBuf = class end
00:00:21 verbose #414 > > #if FABLE_COMPILER
00:00:21 verbose #415 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:00:21 verbose #416 > > #endif
00:00:21 verbose #417 > > type async_walkdir_DirEntry = class end
00:00:21 verbose #418 > > #if FABLE_COMPILER
00:00:21 verbose #419 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:00:21 verbose #420 > > #endif
00:00:21 verbose #421 > > type async_walkdir_Filtering = class end
00:00:21 verbose #422 > > #if FABLE_COMPILER
00:00:21 verbose #423 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:00:21 verbose #424 > > #endif
00:00:21 verbose #425 > > type async_walkdir_WalkDir = class end
00:00:21 verbose #426 > > #if FABLE_COMPILER
00:00:21 verbose #427 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:00:21 verbose #428 > > #endif
00:00:21 verbose #429 > > type core_any_Any = class end
00:00:21 verbose #430 > > #if FABLE_COMPILER
00:00:21 verbose #431 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:21 verbose #432 > > #endif
00:00:21 verbose #433 > > type core_ops_Try<'T> = class end
00:00:21 verbose #434 > > #if FABLE_COMPILER
00:00:21 verbose #435 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:21 verbose #436 > > #endif
00:00:21 verbose #437 > > type Func0<'T> = class end
00:00:21 verbose #438 > > #if FABLE_COMPILER
00:00:21 verbose #439 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:21 verbose #440 > > #endif
00:00:21 verbose #441 > > type Func0<'T, 'U> = class end
00:00:21 verbose #442 > > #if FABLE_COMPILER
00:00:21 verbose #443 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:21 verbose #444 > > #endif
00:00:21 verbose #445 > > type Box<'T> = clas...
00:00:25 verbose #446 > >
00:00:25 verbose #447 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #448 > > module SpiralTrace =
00:00:25 verbose #449 > > let trace x =
00:00:25 verbose #450 > > #if !INTERACTIVE
00:00:25 verbose #451 > > Trace.trace x
00:00:25 verbose #452 > > #else
00:00:25 verbose #453 > > trace x
00:00:25 verbose #454 > > #endif
00:00:25 verbose #455 > >
00:00:25 verbose #456 > > type TraceLevel =
00:00:25 verbose #457 > > #if !INTERACTIVE
00:00:25 verbose #458 > > Trace.US0
00:00:25 verbose #459 > > #else
00:00:25 verbose #460 > > US0
00:00:25 verbose #461 > > #endif
00:00:25 verbose #462 > >
00:00:25 verbose #463 > > module SpiralCrypto =
00:00:25 verbose #464 > > let hash_text x =
00:00:25 verbose #465 > > #if !INTERACTIVE
00:00:25 verbose #466 > > Crypto.hash_text x
00:00:25 verbose #467 > > #else
00:00:25 verbose #468 > > hash_text x
00:00:25 verbose #469 > > #endif
00:00:25 verbose #470 > >
00:00:25 verbose #471 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:00:25 verbose #472 > >
00:00:25 verbose #473 > > module SpiralAsync =
00:00:25 verbose #474 > > let merge_cancellation_token_with_default_async x =
00:00:25 verbose #475 > > #if !INTERACTIVE
00:00:25 verbose #476 > > Async_.merge_cancellation_token_with_default_async x
00:00:25 verbose #477 > > #else
00:00:25 verbose #478 > > merge_cancellation_token_with_default_async x
00:00:25 verbose #479 > > #endif
00:00:25 verbose #480 > >
00:00:25 verbose #481 > > module SpiralThreading =
00:00:25 verbose #482 > > let new_disposable_token x =
00:00:25 verbose #483 > > #if !INTERACTIVE
00:00:25 verbose #484 > > Threading.new_disposable_token x
00:00:25 verbose #485 > > #else
00:00:25 verbose #486 > > new_disposable_token x
00:00:25 verbose #487 > > #endif
00:00:25 verbose #488 > >
00:00:25 verbose #489 > > module SpiralNetworking =
00:00:25 verbose #490 > > let test_port_open x =
00:00:25 verbose #491 > > #if !INTERACTIVE
00:00:25 verbose #492 > > Networking.test_port_open x
00:00:25 verbose #493 > > #else
00:00:25 verbose #494 > > test_port_open x
00:00:25 verbose #495 > > #endif
00:00:25 verbose #496 > >
00:00:25 verbose #497 > > let test_port_open_timeout x =
00:00:25 verbose #498 > > #if !INTERACTIVE
00:00:25 verbose #499 > > Networking.test_port_open_timeout x
00:00:25 verbose #500 > > #else
00:00:25 verbose #501 > > test_port_open_timeout x
00:00:25 verbose #502 > > #endif
00:00:25 verbose #503 > >
00:00:25 verbose #504 > > let wait_for_port_access x =
00:00:25 verbose #505 > > #if !INTERACTIVE
00:00:25 verbose #506 > > Networking.wait_for_port_access x
00:00:25 verbose #507 > > #else
00:00:25 verbose #508 > > wait_for_port_access x
00:00:25 verbose #509 > > #endif
00:00:25 verbose #510 > >
00:00:25 verbose #511 > > let get_available_port x =
00:00:25 verbose #512 > > #if !INTERACTIVE
00:00:25 verbose #513 > > Networking.get_available_port x
00:00:25 verbose #514 > > #else
00:00:25 verbose #515 > > get_available_port x
00:00:25 verbose #516 > > #endif
00:00:25 verbose #517 > >
00:00:25 verbose #518 > > module SpiralRuntime =
00:00:25 verbose #519 > > let get_executable_suffix () =
00:00:25 verbose #520 > > #if !INTERACTIVE
00:00:25 verbose #521 > > Runtime.get_executable_suffix ()
00:00:25 verbose #522 > > #else
00:00:25 verbose #523 > > get_executable_suffix ()
00:00:25 verbose #524 > > #endif
00:00:25 verbose #525 > >
00:00:25 verbose #526 > > let is_windows () =
00:00:25 verbose #527 > > #if !INTERACTIVE
00:00:25 verbose #528 > > ...
00:00:25 verbose #529 > >
00:00:25 verbose #530 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #531 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:00:25 verbose #532 > >
00:00:25 verbose #533 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #534 > > //// test
00:00:25 verbose #535 > >
00:00:25 verbose #536 > > type AssertExceptionFormatter (ex) =
00:00:25 verbose #537 > > member _.Text =
00:00:25 verbose #538 > > ex.ToString()
00:00:25 verbose #539 > > .Replace("32m", "<span style=\"color: green;\">")
00:00:25 verbose #540 > > .Replace("36m", "</span>")
00:00:25 verbose #541 > > .Replace("31m", "<span style=\"color: red;\">")
00:00:25 verbose #542 > > .Replace("\n", "<br/>\n")
00:00:25 verbose #543 > >
00:00:25 verbose #544 > >
00:00:25 verbose #545 > > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:00:25 verbose #546 > > AssertExceptionFormatter) -> x.Text), "text/html")
00:00:25 verbose #547 > >
00:00:25 verbose #548 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #549 > > //// test
00:00:25 verbose #550 > >
00:00:25 verbose #551 > > let inline __expect fn log expected actual =
00:00:25 verbose #552 > > if log then printfn $"{actual.ToDisplayString ()}"
00:00:25 verbose #553 > > try
00:00:25 verbose #554 > > "Testing.__expect" |> fn actual expected
00:00:25 verbose #555 > > with :? Expecto.AssertException as ex ->
00:00:25 verbose #556 > > AssertExceptionFormatter(ex).Display () |> ignore
00:00:25 verbose #557 > > failwith (ex.GetType().FullName)
00:00:25 verbose #558 > >
00:00:25 verbose #559 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:00:25 verbose #560 > > expected actual
00:00:25 verbose #561 > > let inline _contains expected actual = __contains true expected actual
00:00:25 verbose #562 > >
00:00:25 verbose #563 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:00:25 verbose #564 > > expected actual
00:00:25 verbose #565 > > let inline _assertEqual expected actual = __assertEqual true expected actual
00:00:25 verbose #566 > >
00:00:25 verbose #567 > > let inline __isGreaterThan log expected actual = __expect
00:00:25 verbose #568 > > Expecto.Expect.isGreaterThan log expected actual
00:00:25 verbose #569 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:00:25 verbose #570 > >
00:00:25 verbose #571 > > let inline __isGreaterThanOrEqual log expected actual = __expect
00:00:25 verbose #572 > > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:00:25 verbose #573 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:00:25 verbose #574 > > expected actual
00:00:25 verbose #575 > >
00:00:25 verbose #576 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:00:25 verbose #577 > > log expected actual
00:00:25 verbose #578 > > let inline _isLessThan expected actual = __isLessThan true expected actual
00:00:25 verbose #579 > >
00:00:25 verbose #580 > > let inline __isLessThanOrEqual log expected actual = __expect
00:00:25 verbose #581 > > Expecto.Expect.isLessThanOrEqual log expected actual
00:00:25 verbose #582 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:00:25 verbose #583 > > expected actual
00:00:25 verbose #584 > >
00:00:25 verbose #585 > > let inline __sequenceEqual log expected actual = __expe...
00:00:25 verbose #586 > >
00:00:25 verbose #587 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #588 > > //// test
00:00:25 verbose #589 > >
00:00:25 verbose #590 > > let inline __isBetween log a b actual =
00:00:25 verbose #591 > > let inline isBetween actual (a, b) _ =
00:00:25 verbose #592 > > __isGreaterThanOrEqual log a actual
00:00:25 verbose #593 > > __isLessThanOrEqual log b actual
00:00:25 verbose #594 > > __expect isBetween log (a, b) actual
00:00:25 verbose #595 > > let inline _isBetween a b actual = __isBetween true a b actual
00:00:25 verbose #596 > >
00:00:25 verbose #597 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:25 verbose #598 > > #!import ../../lib/fsharp/Common.fs
00:00:25 verbose #599 > > #!import ../../lib/fsharp/CommonFSharp.fs
00:00:25 verbose #600 > > #!import ../../lib/fsharp/Async.fs
00:00:25 verbose #601 > > #!import ../../lib/fsharp/AsyncSeq.fs
00:00:25 verbose #602 > > #!import ../../lib/fsharp/Runtime.fs
00:00:25 verbose #603 > > #!import ../../lib/fsharp/FileSystem.fs
00:00:25 verbose #604 > >
00:00:25 verbose #605 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #606 > > #if !INTERACTIVE
00:00:25 verbose #607 > > namespace Polyglot
00:00:25 verbose #608 > > #endif
00:00:25 verbose #609 > >
00:00:25 verbose #610 > > module Common =
00:00:25 verbose #611 > >
00:00:25 verbose #612 > > #if !INTERACTIVE
00:00:25 verbose #613 > > open Lib
00:00:25 verbose #614 > > #endif
00:00:25 verbose #615 > >
00:00:25 verbose #616 > > let nl = System.Environment.NewLine
00:00:25 verbose #617 > > let q = @""""
00:00:25 verbose #618 > >
00:00:25 verbose #619 > > let inline cons head tail = head :: tail
00:00:25 verbose #620 > >
00:00:25 verbose #621 > > /// ## memoize
00:00:25 verbose #622 > > let inline memoize fn =
00:00:25 verbose #623 > > let result = lazy fn ()
00:00:25 verbose #624 > > fun () -> result.Value
00:00:25 verbose #625 > >
00:00:25 verbose #626 > > /// ## TraceLevel
00:00:25 verbose #627 > > type TraceLevel =
00:00:25 verbose #628 > > | Verbose
00:00:25 verbose #629 > > | Debug
00:00:25 verbose #630 > > | Info
00:00:25 verbose #631 > > | Warning
00:00:25 verbose #632 > > | Critical
00:00:25 verbose #633 > >
00:00:25 verbose #634 > > let inline _locals () = ""
00:00:25 verbose #635 > >
00:00:25 verbose #636 > > /// ## trace
00:00:25 verbose #637 > > let to_trace_level = function
00:00:25 verbose #638 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:00:25 verbose #639 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:00:25 verbose #640 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:00:25 verbose #641 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:00:25 verbose #642 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:00:25 verbose #643 > >
00:00:25 verbose #644 > > let trace level fn locals =
00:00:25 verbose #645 > > let level = level |> to_trace_level
00:00:25 verbose #646 > > SpiralTrace.trace level fn locals
00:00:25 verbose #647 > >
00:00:25 verbose #648 > >
00:00:25 verbose #649 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #650 > > #if !INTERACTIVE
00:00:25 verbose #651 > > namespace Polyglot
00:00:25 verbose #652 > > #endif
00:00:25 verbose #653 > >
00:00:25 verbose #654 > > module CommonFSharp =
00:00:25 verbose #655 > >
00:00:25 verbose #656 > > open Common
00:00:25 verbose #657 > >
00:00:25 verbose #658 > > /// ## getUnionCaseName
00:00:25 verbose #659 > > let inline getUnionCaseName<'T> (x: 'T) =
00:00:25 verbose #660 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:00:25 verbose #661 > > | case, _ -> case.Name
00:00:25 verbose #662 > >
00:00:25 verbose #663 > >
00:00:25 verbose #664 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:25 verbose #665 > > #if !INTERACTIVE
00:00:25 verbose #666 > > namespace Polyglot
00:00:25 verbose #667 > > #endif
00:00:25 verbose #668 > >
00:00:25 verbose #669 > > module Async =
00:00:25 verbose #670 > >
00:00:25 verbose #671 > > #if !INTERACTIVE
00:00:25 verbose #672 > > open Lib
00:00:25 verbose #673 > > #endif
00:00:25 verbose #674 > >
00:00:25 verbose #675 > > open Common
00:00:25 verbose #676 > >
00:00:25 verbose #677 > > /// ## choice
00:00:25 verbose #678 > > let inline choice asyncs = async {
00:00:25 verbose #679 > > let e = Event<_> ()
00:00:25 verbose #680 > > use cts = new System.Threading.CancellationTokenSource ()
00:00:25 verbose #681 > > let fn =
00:00:25 verbose #682 > > asyncs
00:00:25 verbose #683 > > |> Seq.map (fun a -> async {
00:00:25 verbose #684 > > let! x = a
00:00:25 verbose #685 > > e.Trigger x
00:00:25 verbose #686 > > })
00:00:25 verbose #687 > > |> Async.Parallel
00:00:25 verbose #688 > > |> Async.Ignore
00:00:25 verbose #689 > > Async.Start (fn, cts.Token)
00:00:25 verbose #690 > > let! result = Async.AwaitEvent e.Publish
00:00:25 verbose #691 > > cts.Cancel ()
00:00:25 verbose #692 > > return result
00:00:25 verbose #693 > > }
00:00:25 verbose #694 > >
00:00:25 verbose #695 > > /// ## map
00:00:25 verbose #696 > > let inline map fn a = async {
00:00:25 verbose #697 > > let! x = a
00:00:25 verbose #698 > > return fn x
00:00:25 verbose #699 > > }
00:00:25 verbose #700 > >
00:00:25 verbose #701 > > /// ## catch
00:00:25 verbose #702 > > let inline catch a =
00:00:25 verbose #703 > > a
00:00:25 verbose #704 > > |> Async.Catch
00:00:25 verbose #705 > > |> map (function
00:00:25 verbose #706 > > | Choice1Of2 result -> Ok result
00:00:25 verbose #707 > > | Choice2Of2 ex -> Error ex
00:00:25 verbose #708 > > )
00:00:25 verbose #709 > >
00:00:25 verbose #710 > > /// ## runWithTimeoutChoiceAsync
00:00:25 verbose #711 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:00:25 verbose #712 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:25 verbose #713 > >
00:00:25 verbose #714 > > let timeoutTask = async {
00:00:25 verbose #715 > > do! Async.Sleep timeout
00:00:25 verbose #716 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:00:25 verbose #717 > > return None
00:00:25 verbose #718 > > }
00:00:25 verbose #719 > >
00:00:25 verbose #720 > > let task = async {
00:00:25 verbose #721 > > try
00:00:25 verbose #722 > > let! result = fn
00:00:25 verbose #723 > > return Some result
00:00:25 verbose #724 > > with
00:00:25 verbose #725 > > | :? System.AggregateException as ex when
00:00:25 verbose #726 > > ex.InnerExceptions
00:00:25 verbose #727 > > |> Seq.exists (function :? Sys...
00:00:26 verbose #728 > >
00:00:26 verbose #729 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #730 > > #if !INTERACTIVE
00:00:26 verbose #731 > > namespace Polyglot
00:00:26 verbose #732 > > #endif
00:00:26 verbose #733 > >
00:00:26 verbose #734 > > module AsyncSeq =
00:00:26 verbose #735 > >
00:00:26 verbose #736 > > #if !INTERACTIVE
00:00:26 verbose #737 > > open Lib
00:00:26 verbose #738 > > #endif
00:00:26 verbose #739 > >
00:00:26 verbose #740 > > open Common
00:00:26 verbose #741 > >
00:00:26 verbose #742 > > /// ## subscribeEvent
00:00:26 verbose #743 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:00:26 verbose #744 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:00:26 verbose #745 > > 'A>(event.AddHandler, event.RemoveHandler)
00:00:26 verbose #746 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:00:26 verbose #747 > > event.EventArgs)
00:00:26 verbose #748 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:00:26 verbose #749 > >
00:00:26 verbose #750 > > /// ## subscribeToken
00:00:26 verbose #751 > > let subscribeToken (token : System.Threading.CancellationToken) =
00:00:26 verbose #752 > > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:00:26 verbose #753 > > System.Action tcs.SetResult |> token.Register |> ignore
00:00:26 verbose #754 > > let start = System.DateTime.Now.Ticks
00:00:26 verbose #755 > > FSharp.Control.AsyncSeq.unfoldAsync
00:00:26 verbose #756 > > (fun () -> async {
00:00:26 verbose #757 > > do! tcs.Task |> Async.AwaitTask
00:00:26 verbose #758 > > return Some (System.DateTime.Now.Ticks - start, ())
00:00:26 verbose #759 > > })
00:00:26 verbose #760 > > ()
00:00:26 verbose #761 > >
00:00:26 verbose #762 > >
00:00:26 verbose #763 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #764 > > #if !INTERACTIVE
00:00:26 verbose #765 > > namespace Polyglot
00:00:26 verbose #766 > > #endif
00:00:26 verbose #767 > >
00:00:26 verbose #768 > > module Runtime =
00:00:26 verbose #769 > >
00:00:26 verbose #770 > > #if !INTERACTIVE
00:00:26 verbose #771 > > open Lib
00:00:26 verbose #772 > > #endif
00:00:26 verbose #773 > >
00:00:26 verbose #774 > > open Common
00:00:26 verbose #775 > >
00:00:26 verbose #776 > > /// ## parseArgs
00:00:26 verbose #777 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:00:26 verbose #778 > > let assemblyName =
00:00:26 verbose #779 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:00:26 verbose #780 > > let errorHandler : Argu.IExiter =
00:00:26 verbose #781 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:00:26 verbose #782 > > List.contains assemblyName
00:00:26 verbose #783 > > then Argu.ExceptionExiter ()
00:00:26 verbose #784 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:00:26 verbose #785 > > _ -> Some System.ConsoleColor.Red)
00:00:26 verbose #786 > >
00:00:26 verbose #787 > > let parser =
00:00:26 verbose #788 > > Argu.ArgumentParser.Create<'T> (
00:00:26 verbose #789 > > programName =
00:00:26 verbose #790 > > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:00:26 verbose #791 > > errorHandler = errorHandler
00:00:26 verbose #792 > > )
00:00:26 verbose #793 > >
00:00:26 verbose #794 > > parser.ParseCommandLine args
00:00:26 verbose #795 > >
00:00:26 verbose #796 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:00:26 verbose #797 > > args
00:00:26 verbose #798 > > |> parseArgs<'T>
00:00:26 verbose #799 > > |> fun results -> results.GetAllResults ()
00:00:26 verbose #800 > >
00:00:26 verbose #801 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:00:26 verbose #802 > > args
00:00:26 verbose #803 > > |> parseAllArgs<'T>
00:00:26 verbose #804 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:00:26 verbose #805 > > |> Map.ofList
00:00:26 verbose #806 > >
00:00:26 verbose #807 > >
00:00:26 verbose #808 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:26 verbose #809 > > #if !INTERACTIVE
00:00:26 verbose #810 > > namespace Polyglot
00:00:26 verbose #811 > > #endif
00:00:26 verbose #812 > >
00:00:26 verbose #813 > > module FileSystem =
00:00:26 verbose #814 > >
00:00:26 verbose #815 > > #if !INTERACTIVE
00:00:26 verbose #816 > > open Lib
00:00:26 verbose #817 > > #endif
00:00:26 verbose #818 > >
00:00:26 verbose #819 > > open Common
00:00:26 verbose #820 > > open SpiralFileSystem.Operators
00:00:26 verbose #821 > >
00:00:26 verbose #822 > > /// ## watchDirectory
00:00:26 verbose #823 > > [[<RequireQualifiedAccess>]]
00:00:26 verbose #824 > > type FileSystemChangeType =
00:00:26 verbose #825 > > | Failure
00:00:26 verbose #826 > > | Changed
00:00:26 verbose #827 > > | Created
00:00:26 verbose #828 > > | Deleted
00:00:26 verbose #829 > > | Renamed
00:00:26 verbose #830 > >
00:00:26 verbose #831 > > [[<RequireQualifiedAccess>]]
00:00:26 verbose #832 > > type FileSystemChange =
00:00:26 verbose #833 > > | Failure of exn: exn
00:00:26 verbose #834 > > | Changed of path: string * content: string option
00:00:26 verbose #835 > > | Created of path: string * content: string option
00:00:26 verbose #836 > > | Deleted of path: string
00:00:26 verbose #837 > > | Renamed of oldPath: string * (string * string option)
00:00:26 verbose #838 > >
00:00:26 verbose #839 > >
00:00:26 verbose #840 > > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:00:26 verbose #841 > > let fullPath = path |> System.IO.Path.GetFullPath
00:00:26 verbose #842 > > let _locals () = $"filter: {filter} / {_locals ()}"
00:00:26 verbose #843 > >
00:00:26 verbose #844 > > let watcher =
00:00:26 verbose #845 > > new System.IO.FileSystemWatcher (
00:00:26 verbose #846 > > Path = fullPath,
00:00:26 verbose #847 > > NotifyFilter = filter,
00:00:26 verbose #848 > > EnableRaisingEvents = true,
00:00:26 verbose #849 > > IncludeSubdirectories = true
00:00:26 verbose #850 > > )
00:00:26 verbose #851 > >
00:00:26 verbose #852 > > let inline getEventPath (path : string) =
00:00:26 verbose #853 > > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:00:26 verbose #854 > > SpiralSm.trim_start [[| '/'; '\\' |]]
00:00:26 verbose #855 > >
00:00:26 verbose #856 > > let inline ticks () =
00:00:26 verbose #857 > > System.DateTime.UtcNow.Ticks
00:00:26 verbose #858 > >
00:00:26 verbose #859 > > let changedStream =
00:00:26 verbose #860 > > AsyncSeq.subscribeEvent
00:00:26 verbose #861 > > watcher.Changed
00:00:26 verbose #862 > > (fun event ->
00:00:26 verbose #863 > > ticks (),
00:00:26 verbose #864 > > [[ FileSystemChange...
00:00:28 verbose #865 > >
00:00:28 verbose #866 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #867 > > #if !INTERACTIVE
00:00:28 verbose #868 > > open Lib
00:00:28 verbose #869 > > #endif
00:00:28 verbose #870 > >
00:00:28 verbose #871 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #872 > > open SpiralFileSystem.Operators
00:00:28 verbose #873 > > open Falco.Markup
00:00:28 verbose #874 > >
00:00:28 verbose #875 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #876 > > type FileSystemNode =
00:00:28 verbose #877 > > | File of string * string * int64
00:00:28 verbose #878 > > | Folder of string * string * FileSystemNode list
00:00:28 verbose #879 > > | Root of FileSystemNode list
00:00:28 verbose #880 > >
00:00:28 verbose #881 > > let rec scanDirectory isRoot (basePath : string) (path : string) =
00:00:28 verbose #882 > > let relativePath =
00:00:28 verbose #883 > > path
00:00:28 verbose #884 > > |> SpiralSm.replace basePath ""
00:00:28 verbose #885 > > |> SpiralSm.replace "\\" "/"
00:00:28 verbose #886 > > |> SpiralSm.replace "//" "/"
00:00:28 verbose #887 > > |> SpiralSm.trim_start [[| '/' |]]
00:00:28 verbose #888 > >
00:00:28 verbose #889 > > let directories =
00:00:28 verbose #890 > > path
00:00:28 verbose #891 > > |> System.IO.Directory.GetDirectories
00:00:28 verbose #892 > > |> Array.toList
00:00:28 verbose #893 > > |> List.sort
00:00:28 verbose #894 > > |> List.map (scanDirectory false basePath)
00:00:28 verbose #895 > > let files =
00:00:28 verbose #896 > > path
00:00:28 verbose #897 > > |> System.IO.Directory.GetFiles
00:00:28 verbose #898 > > |> Array.toList
00:00:28 verbose #899 > > |> List.sort
00:00:28 verbose #900 > > |> List.map (fun f -> File (System.IO.Path.GetFileName f, relativePath,
00:00:28 verbose #901 > > System.IO.FileInfo(f).Length))
00:00:28 verbose #902 > >
00:00:28 verbose #903 > > let children = directories @ files
00:00:28 verbose #904 > > if isRoot
00:00:28 verbose #905 > > then Root children
00:00:28 verbose #906 > > else Folder (path |> System.IO.Path.GetFileName, relativePath, children)
00:00:28 verbose #907 > >
00:00:28 verbose #908 > > let rec generateHtml fsNode =
00:00:28 verbose #909 > > let sizeLabel size =
00:00:28 verbose #910 > > match float size with
00:00:28 verbose #911 > > | size when size > 1024.0 * 1024.0 -> $"%.2f{size / 1024.0 / 1024.0} MB"
00:00:28 verbose #912 > > | size when size > 1024.0 -> $"%.2f{size / 1024.0} KB"
00:00:28 verbose #913 > > | size -> $"%.2f{size} B"
00:00:28 verbose #914 > > match fsNode with
00:00:28 verbose #915 > > | File (fileName, relativePath, size) ->
00:00:28 verbose #916 > > Elem.div [[]] [[
00:00:28 verbose #917 > > Text.raw "📄 "
00:00:28 verbose #918 > > Elem.a [[
00:00:28 verbose #919 > > Attr.href $"""{relativePath}{if relativePath = "" then "" else
00:00:28 verbose #920 > > "/"}{fileName}"""
00:00:28 verbose #921 > > ]] [[
00:00:28 verbose #922 > > Text.raw fileName
00:00:28 verbose #923 > > ]]
00:00:28 verbose #924 > > Elem.span [[]] [[
00:00:28 verbose #925 > > Text.raw $" ({size |> sizeLabel})"
00:00:28 verbose #926 > > ]]
00:00:28 verbose #927 > > ]]
00:00:28 verbose #928 > > | Folder (folderName, relativePath, children) ->
00:00:28 verbose #929 > > let size =
00:00:28 verbose #930 > > let rec loop children =
00:00:28 verbose #931 > > children
00:00:28 verbose #932 > > |> List.sumBy (function
00:00:28 verbose #933 > > | File (_, _, size) -> size
00:00:28 verbose #934 > > | Folder (_, _, children)
00:00:28 verbose #935 > > | Root children -> loop children
00:00:28 verbose #936 > > )
00:00:28 verbose #937 > > loop children
00:00:28 verbose #938 > > Elem.details [[
00:00:28 verbose #939 > > Attr.open' "true"
00:00:28 verbose #940 > > ]] [[
00:00:28 verbose #941 > > Elem.summary [[]] [[
00:00:28 verbose #942 > > Text.raw "📂 "
00:00:28 verbose #943 > > Elem.a [[
00:00:28 verbose #944 > > Attr.href relativePath
00:00:28 verbose #945 > > ]] [[
00:00:28 verbose #946 > > Text.raw folderName
00:00:28 verbose #947 > > ]]
00:00:28 verbose #948 > > Elem.span [[]] [[
00:00:28 verbose #949 > > Text.raw $" ({size |> sizeLabel})"
00:00:28 verbose #950 > > ]]
00:00:28 verbose #951 > > ]]
00:00:28 verbose #952 > > Elem.div [[]] [[
00:00:28 verbose #953 > > yield! children |> List.map generateHtml
00:00:28 verbose #954 > > ]]
00:00:28 verbose #955 > > ]]
00:00:28 verbose #956 > > | Root children ->
00:00:28 verbose #957 > > Elem.div [[]] [[
00:00:28 verbose #958 > > yield! children |> List.map generateHtml
00:00:28 verbose #959 > > ]]
00:00:28 verbose #960 > >
00:00:28 verbose #961 > > let generateHtmlForFileSystem root =
00:00:28 verbose #962 > > $"""<!DOCTYPE html>
00:00:28 verbose #963 > > <html lang="en">
00:00:28 verbose #964 > > <head>
00:00:28 verbose #965 > > <meta charset="UTF-8">
00:00:28 verbose #966 > > <style>
00:00:28 verbose #967 > > body {{
00:00:28 verbose #968 > > background-color: #222;
00:00:28 verbose #969 > > color: #ccc;
00:00:28 verbose #970 > > }}
00:00:28 verbose #971 > > a {{
00:00:28 verbose #972 > > color: #777;
00:00:28 verbose #973 > > font-size: 15px;
00:00:28 verbose #974 > > }}
00:00:28 verbose #975 > > span {{
00:00:28 verbose #976 > > font-size: 11px;
00:00:28 verbose #977 > > }}
00:00:28 verbose #978 > > div > div {{
00:00:28 verbose #979 > > padding-left: 10px;
00:00:28 verbose #980 > > }}
00:00:28 verbose #981 > > details > div {{
00:00:28 verbose #982 > > padding-left: 19px;
00:00:28 verbose #983 > > }}
00:00:28 verbose #984 > > </style>
00:00:28 verbose #985 > > </head>
00:00:28 verbose #986 > > <body>
00:00:28 verbose #987 > > {root |> generateHtml |> renderNode}
00:00:28 verbose #988 > > </body>
00:00:28 verbose #989 > > </html>
00:00:28 verbose #990 > > """
00:00:28 verbose #991 > >
00:00:28 verbose #992 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #993 > > //// test
00:00:28 verbose #994 > >
00:00:28 verbose #995 > > let struct (tempFolder, disposable) = SpiralFileSystem.create_temp_directory ()
00:00:28 verbose #996 > > let rec loop d n = async {
00:00:28 verbose #997 > > if n >= 0 then
00:00:28 verbose #998 > > tempFolder </> d |> System.IO.Directory.CreateDirectory |> ignore
00:00:28 verbose #999 > > do!
00:00:28 verbose #1000 > > n
00:00:28 verbose #1001 > > |> string
00:00:28 verbose #1002 > > |> String.replicate (n + 1)
00:00:28 verbose #1003 > > |> SpiralFileSystem.write_all_text_async (tempFolder </> d </>
00:00:28 verbose #1004 > > $"file.txt")
00:00:28 verbose #1005 > > do! loop $"{d}/{n}" (n - 1)
00:00:28 verbose #1006 > > }
00:00:28 verbose #1007 > > loop "_.root" 3
00:00:28 verbose #1008 > > |> Async.RunSynchronously
00:00:28 verbose #1009 > >
00:00:28 verbose #1010 > > let html =
00:00:28 verbose #1011 > > scanDirectory true tempFolder tempFolder
00:00:28 verbose #1012 > > |> generateHtmlForFileSystem
00:00:28 verbose #1013 > >
00:00:28 verbose #1014 > > html
00:00:28 verbose #1015 > > |> _assertEqual """<!DOCTYPE html>
00:00:28 verbose #1016 > > <html lang="en">
00:00:28 verbose #1017 > > <head>
00:00:28 verbose #1018 > > <meta charset="UTF-8">
00:00:28 verbose #1019 > > <style>
00:00:28 verbose #1020 > > body {
00:00:28 verbose #1021 > > background-color: #222;
00:00:28 verbose #1022 > > color: #ccc;
00:00:28 verbose #1023 > > }
00:00:28 verbose #1024 > > a {
00:00:28 verbose #1025 > > color: #777;
00:00:28 verbose #1026 > > font-size: 15px;
00:00:28 verbose #1027 > > }
00:00:28 verbose #1028 > > span {
00:00:28 verbose #1029 > > font-size: 11px;
00:00:28 verbose #1030 > > }
00:00:28 verbose #1031 > > div > div {
00:00:28 verbose #1032 > > padding-left: 10px;
00:00:28 verbose #1033 > > }
00:00:28 verbose #1034 > > details > div {
00:00:28 verbose #1035 > > padding-left: 19px;
00:00:28 verbose #1036 > > }
00:00:28 verbose #1037 > > </style>
00:00:28 verbose #1038 > > </head>
00:00:28 verbose #1039 > > <body>
00:00:28 verbose #1040 > > <div><details open="true"><summary>📂 <a href="_.root">_.root</a><span>
00:00:28 verbose #1041 > > (10.00 B)</span></summary><div><details open="true"><summary>📂 <a
00:00:28 verbose #1042 > > href="_.root/3">3</a><span> (6.00 B)</span></summary><div><details
00:00:28 verbose #1043 > > open="true"><summary>📂 <a href="_.root/3/2">2</a><span> (3.00
00:00:28 verbose #1044 > > B)</span></summary><div><details open="true"><summary>📂 <a
00:00:28 verbose #1045 > > href="_.root/3/2/1">1</a><span> (1.00 B)</span></summary><div><div>📄 <a
00:00:28 verbose #1046 > > href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00
00:00:28 verbose #1047 > > B)</span></div></div></details><div>📄 <a
00:00:28 verbose #1048 > > href="_.root/3/2/file.txt">file.txt</a><span> (2.00
00:00:28 verbose #1049 > > B)</span></div></div></details><div>📄 <a
00:00:28 verbose #1050 > > href="_.root/3/file.txt">file.txt</a><span> (3.00
00:00:28 verbose #1051 > > B)</span></div></div></details><div>📄 <a
00:00:28 verbose #1052 > > href="_.root/file.txt">file.txt</a><span> (4.00
00:00:28 verbose #1053 > > B)</span></div></div></details></div>
00:00:28 verbose #1054 > > </body>
00:00:28 verbose #1055 > > </html>
00:00:28 verbose #1056 > > """
00:00:28 verbose #1057 > >
00:00:28 verbose #1058 > > disposable.Dispose ()
00:00:28 verbose #1059 > >
00:00:28 verbose #1060 > > html |> Microsoft.DotNet.Interactive.Formatting.Html.ToHtmlContent
00:00:28 verbose #1061 > >
00:00:28 verbose #1062 > > ╭─[ 206.81ms - return value ]──────────────────────────────────────────────────╮
00:00:28 verbose #1063 > > │ <!DOCTYPE html> │
00:00:28 verbose #1064 > > │ <html lang="en"> │
00:00:28 verbose #1065 > > │ <head> │
00:00:28 verbose #1066 > > │ <meta charset="UTF-8"> │
00:00:28 verbose #1067 > > │ <style> │
00:00:28 verbose #1068 > > │ body { │
00:00:28 verbose #1069 > > │ background-color: #222; │
00:00:28 verbose #1070 > > │ color: #ccc; │
00:00:28 verbose #1071 > > │ } │
00:00:28 verbose #1072 > > │ a { │
00:00:28 verbose #1073 > > │ color: #777; │
00:00:28 verbose #1074 > > │ font-size: 15px; │
00:00:28 verbose #1075 > > │ } │
00:00:28 verbose #1076 > > │ span { │
00:00:28 verbose #1077 > > │ font-size: 11px; │
00:00:28 verbose #1078 > > │ } │
00:00:28 verbose #1079 > > │ div > div { │
00:00:28 verbose #1080 > > │ padding-left: 10px; │
00:00:28 verbose #1081 > > │ } │
00:00:28 verbose #1082 > > │ details > div { │
00:00:28 verbose #1083 > > │ padding-left: 19px; │
00:00:28 verbose #1084 > > │ } │
00:00:28 verbose #1085 > > │ </style> │
00:00:28 verbose #1086 > > │ </head> │
00:00:28 verbose #1087 > > │ <body> │
00:00:28 verbose #1088 > > │ <div><details open="true"><summary>📂 <a │
00:00:28 verbose #1089 > > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │
00:00:28 verbose #1090 > > │ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │
00:00:28 verbose #1091 > > │ B)</span></summary><div><details open="true"><summary>📂 <a │
00:00:28 verbose #1092 > > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │
00:00:28 verbose #1093 > > │ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │
00:00:28 verbose #1094 > > │ B)</span></summary><div><div>📄 <a │
00:00:28 verbose #1095 > > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │
00:00:28 verbose #1096 > > │ B)</span></div></div></details><div>📄 <a │
00:00:28 verbose #1097 > > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │
00:00:28 verbose #1098 > > │ B)</span></div></div></details><div>📄 <a │
00:00:28 verbose #1099 > > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │
00:00:28 verbose #1100 > > │ B)</span></div></div></details><div>📄 <a │
00:00:28 verbose #1101 > > │ href="_.root/file.txt">file.txt</a><span> (4.00 │
00:00:28 verbose #1102 > > │ B)</span></div></div></details></div> │
00:00:28 verbose #1103 > > │ </body> │
00:00:28 verbose #1104 > > │ </html> │
00:00:28 verbose #1105 > > │ │
00:00:28 verbose #1106 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 verbose #1107 > >
00:00:28 verbose #1108 > > ╭─[ 213.62ms - stdout ]────────────────────────────────────────────────────────╮
00:00:28 verbose #1109 > > │ "<!DOCTYPE html> │
00:00:28 verbose #1110 > > │ <html lang="en"> │
00:00:28 verbose #1111 > > │ <head> │
00:00:28 verbose #1112 > > │ <meta charset="UTF-8"> │
00:00:28 verbose #1113 > > │ <style> │
00:00:28 verbose #1114 > > │ body { │
00:00:28 verbose #1115 > > │ background-color: #222; │
00:00:28 verbose #1116 > > │ color: #ccc; │
00:00:28 verbose #1117 > > │ } │
00:00:28 verbose #1118 > > │ a { │
00:00:28 verbose #1119 > > │ color: #777; │
00:00:28 verbose #1120 > > │ font-size: 15px; │
00:00:28 verbose #1121 > > │ } │
00:00:28 verbose #1122 > > │ span { │
00:00:28 verbose #1123 > > │ font-size: 11px; │
00:00:28 verbose #1124 > > │ } │
00:00:28 verbose #1125 > > │ div > div { │
00:00:28 verbose #1126 > > │ padding-left: 10px; │
00:00:28 verbose #1127 > > │ } │
00:00:28 verbose #1128 > > │ details > div { │
00:00:28 verbose #1129 > > │ padding-left: 19px; │
00:00:28 verbose #1130 > > │ } │
00:00:28 verbose #1131 > > │ </style> │
00:00:28 verbose #1132 > > │ </head> │
00:00:28 verbose #1133 > > │ <body> │
00:00:28 verbose #1134 > > │ <div><details open="true"><summary>📂 <a │
00:00:28 verbose #1135 > > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │
00:00:28 verbose #1136 > > │ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │
00:00:28 verbose #1137 > > │ B)</span></summary><div><details open="true"><summary>📂 <a │
00:00:28 verbose #1138 > > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │
00:00:28 verbose #1139 > > │ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │
00:00:28 verbose #1140 > > │ B)</span></summary><div><div>📄 <a │
00:00:28 verbose #1141 > > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │
00:00:28 verbose #1142 > > │ B)</span></div></div></details><div>📄 <a │
00:00:28 verbose #1143 > > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │
00:00:28 verbose #1144 > > │ B)</span></div></div></details><div>📄 <a │
00:00:28 verbose #1145 > > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │
00:00:28 verbose #1146 > > │ B)</span></div></div></details><div>📄 <a │
00:00:28 verbose #1147 > > │ href="_.root/file.txt">file.txt</a><span> (4.00 │
00:00:28 verbose #1148 > > │ B)</span></div></div></details></div> │
00:00:28 verbose #1149 > > │ </body> │
00:00:28 verbose #1150 > > │ </html> │
00:00:28 verbose #1151 > > │ " │
00:00:28 verbose #1152 > > │ │
00:00:28 verbose #1153 > > │ │
00:00:28 verbose #1154 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 verbose #1155 > >
00:00:28 verbose #1156 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:28 verbose #1157 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:28 verbose #1158 > > │ ## Arguments │
00:00:28 verbose #1159 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 verbose #1160 > >
00:00:28 verbose #1161 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #1162 > > [[<RequireQualifiedAccess>]]
00:00:28 verbose #1163 > > type Arguments =
00:00:28 verbose #1164 > > | [[<Argu.ArguAttributes.ExactlyOnce>]] Dir of string
00:00:28 verbose #1165 > > | [[<Argu.ArguAttributes.ExactlyOnce>]] Html of string
00:00:28 verbose #1166 > >
00:00:28 verbose #1167 > > interface Argu.IArgParserTemplate with
00:00:28 verbose #1168 > > member s.Usage =
00:00:28 verbose #1169 > > match s with
00:00:28 verbose #1170 > > | Dir _ -> nameof Dir
00:00:28 verbose #1171 > > | Html _ -> nameof Html
00:00:28 verbose #1172 > >
00:00:28 verbose #1173 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #1174 > > //// test
00:00:28 verbose #1175 > >
00:00:28 verbose #1176 > > Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
00:00:28 verbose #1177 > >
00:00:28 verbose #1178 > > ╭─[ 122.17ms - return value ]──────────────────────────────────────────────────╮
00:00:28 verbose #1179 > > │ "USAGE: dotnet-repl [--help] --dir <string> --html <string> │
00:00:28 verbose #1180 > > │ │
00:00:28 verbose #1181 > > │ OPTIONS: │
00:00:28 verbose #1182 > > │ │
00:00:28 verbose #1183 > > │ --dir <string> Dir │
00:00:28 verbose #1184 > > │ --html <string> Html │
00:00:28 verbose #1185 > > │ --help display this list of options. │
00:00:28 verbose #1186 > > │ " │
00:00:28 verbose #1187 > > │ │
00:00:28 verbose #1188 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 verbose #1189 > >
00:00:28 verbose #1190 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:28 verbose #1191 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:28 verbose #1192 > > │ ## main │
00:00:28 verbose #1193 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 verbose #1194 > >
00:00:28 verbose #1195 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #1196 > > let main args =
00:00:28 verbose #1197 > > let argsMap = args |> Runtime.parseArgsMap<Arguments>
00:00:28 verbose #1198 > >
00:00:28 verbose #1199 > > let dir =
00:00:28 verbose #1200 > > match argsMap.[[nameof Arguments.Dir]] with
00:00:28 verbose #1201 > > | [[ Arguments.Dir dir ]] -> Some dir
00:00:28 verbose #1202 > > | _ -> None
00:00:28 verbose #1203 > > |> Option.get
00:00:28 verbose #1204 > >
00:00:28 verbose #1205 > > let htmlPath =
00:00:28 verbose #1206 > > match argsMap.[[nameof Arguments.Html]] with
00:00:28 verbose #1207 > > | [[ Arguments.Html html ]] -> Some html
00:00:28 verbose #1208 > > | _ -> None
00:00:28 verbose #1209 > > |> Option.get
00:00:28 verbose #1210 > >
00:00:28 verbose #1211 > > let fileSystem = scanDirectory true dir dir
00:00:28 verbose #1212 > > let html = generateHtmlForFileSystem fileSystem
00:00:28 verbose #1213 > >
00:00:28 verbose #1214 > > html |> SpiralFileSystem.write_all_text_async htmlPath
00:00:28 verbose #1215 > > |> Async.runWithTimeout 30000
00:00:28 verbose #1216 > > |> function
00:00:28 verbose #1217 > > | Some () -> 0
00:00:28 verbose #1218 > > | None -> 1
00:00:28 verbose #1219 > >
00:00:28 verbose #1220 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:28 verbose #1221 > > //// test
00:00:28 verbose #1222 > >
00:00:28 verbose #1223 > > let args =
00:00:28 verbose #1224 > > System.Environment.GetEnvironmentVariable "ARGS"
00:00:28 verbose #1225 > > |> SpiralRuntime.split_args
00:00:28 verbose #1226 > > |> Seq.toArray
00:00:28 verbose #1227 > >
00:00:28 verbose #1228 > > match args with
00:00:28 verbose #1229 > > | [[||]] -> 0
00:00:28 verbose #1230 > > | args -> if main args = 0 then 0 else failwith "main failed"
00:00:28 verbose #1231 > >
00:00:28 verbose #1232 > > ╭─[ 106.11ms - return value ]──────────────────────────────────────────────────╮
00:00:28 verbose #1233 > > │ <div class="dni-plaintext"><pre>0 │
00:00:28 verbose #1234 > > │ </pre></div><style> │
00:00:28 verbose #1235 > > │ .dni-code-hint { │
00:00:28 verbose #1236 > > │ font-style: italic; │
00:00:28 verbose #1237 > > │ overflow: hidden; │
00:00:28 verbose #1238 > > │ white-space: nowrap; │
00:00:28 verbose #1239 > > │ } │
00:00:28 verbose #1240 > > │ .dni-treeview { │
00:00:28 verbose #1241 > > │ white-space: nowrap; │
00:00:28 verbose #1242 > > │ } │
00:00:28 verbose #1243 > > │ .dni-treeview td { │
00:00:28 verbose #1244 > > │ vertical-align: top; │
00:00:28 verbose #1245 > > │ text-align: start; │
00:00:28 verbose #1246 > > │ } │
00:00:28 verbose #1247 > > │ details.dni-treeview { │
00:00:28 verbose #1248 > > │ padding-left: 1em; │
00:00:28 verbose #1249 > > │ } │
00:00:28 verbose #1250 > > │ table td { │
00:00:28 verbose #1251 > > │ text-align: start; │
00:00:28 verbose #1252 > > │ } │
00:00:28 verbose #1253 > > │ table tr { │
00:00:28 verbose #1254 > > │ vertical-align: top; │
00:00:28 verbose #1255 > > │ margin: 0em 0px; │
00:00:28 verbose #1256 > > │ } │
00:00:28 verbose #1257 > > │ table tr td pre │
00:00:28 verbose #1258 > > │ { │
00:00:28 verbose #1259 > > │ vertical-align: top !important; │
00:00:28 verbose #1260 > > │ margin: 0em 0px !important; │
00:00:28 verbose #1261 > > │ } │
00:00:28 verbose #1262 > > │ table th { │
00:00:28 verbose #1263 > > │ text-align: start; │
00:00:28 verbose #1264 > > │ } │
00:00:28 verbose #1265 > > │ </style> │
00:00:28 verbose #1266 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 verbose #1267 > 00:00:26 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 43987
00:00:29 verbose #1268 > 00:00:26 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:31 verbose #1269 > 00:00:28 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb to html
00:00:31 verbose #1270 > 00:00:28 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:31 verbose #1271 > 00:00:28 verbose #7 ! validate(nb)
00:00:33 verbose #1272 > 00:00:30 verbose #8 ! [NbConvertApp] Writing 309493 bytes to c:\home\git\polyglot\apps\dir-tree-html\DirTreeHtml.dib.html
00:00:33 verbose #1273 > 00:00:30 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 669
00:00:33 verbose #1274 > 00:00:30 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 669
00:00:33 verbose #1275 > 00:00:30 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:34 verbose #1276 > 00:00:32 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:34 verbose #1277 > 00:00:32 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:35 verbose #1278 > 00:00:32 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 44715
00:00:35 debug #1279 execute_with_options_async / exit_code: 0 / output.Length: 49549
00:00:35 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path DirTreeHtml.dib
00:00:35 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:35 debug #8 run_with_timeout_async / timeout: 100
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]
#endif
type reqwest_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]
#endif
type reqwest_RequestBuilder = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]
#endif
type reqwest_Response = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type core_ops_Try<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Send")>]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]
#endif
type Mut<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]
#endif
type Ref<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("$0 + $1")>]
#endif
type LifetimeJoin<'T, 'U> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("'static")>]
#endif
type StaticLifetime = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("$0")>]
#endif
type LifetimeRef<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("$0 $1")>]
#endif
type Lifetime<'T, 'U> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("MutCell<$0>")>]
#endif
type MutCell<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::any::Any")>]
#endif
type std_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::borrow::Cow<$0>")>]
#endif
type std_borrow_Cow<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::cell::RefCell<$0>")>]
#endif
type std_cell_RefCell<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::pin::Pin<$0>")>]
#endif
type std_pin_Pin<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::rc::Rc<$0>")>]
#endif
type std_rc_Rc<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::rc::Weak<$0>")>]
#endif
type std_rc_Weak<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::collections::HashMap<$0, $1>")>]
#endif
type std_collections_HashMap<'K, 'V> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::collections::BTreeMap<$0, $1>")>]
#endif
type std_collections_BTreeMap<'K, 'V> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("str")>]
#endif
type Str = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("base64::DecodeError")>]
#endif
type base64_DecodeError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("borsh::io::Error")>]
#endif
type borsh_io_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("encoding_rs::Encoding")>]
#endif
type encoding_rs_Encoding = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("js_sys::JsString")>]
#endif
type js_sys_JsString = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("serde_json::Error")>]
#endif
type serde_json_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("serde_json::Value")>]
#endif
type serde_json_Value = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("serde_wasm_bindgen::Error")>]
#endif
type serde_wasm_bindgen_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::ffi::OsStr")>]
#endif
type std_ffi_OsStr = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::ffi::OsString")>]
#endif
type std_ffi_OsString = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fmt::Display<$0>")>]
#endif
type std_fmt_Display<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::str::Utf8Error")>]
#endif
type std_str_Utf8Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::string::FromUtf8Error")>]
#endif
type std_string_FromUtf8Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>]
#endif
type std_string_String = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::slice::Windows<$0>")>]
#endif
type std_slice_Windows<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::Regex")>]
#endif
type regex_Regex = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::Captures")>]
#endif
type regex_Captures = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::CaptureMatches")>]
#endif
type regex_CaptureMatches = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::Error")>]
#endif
type regex_Error = class end
module State = let mutable trace_state = None
type [<Struct>] US0 =
| US0_0
| US0_1
| US0_2
| US0_3
| US0_4
and Mut0 = {mutable l0 : int64}
and Mut1 = {mutable l0 : bool}
and Mut2 = {mutable l0 : US0}
and Mut3 = {mutable l0 : (string -> unit)}
and [<Struct>] US1 =
| US1_0 of f0_0 : int64
| US1_1
and [<Struct>] US2 =
| US2_0 of f0_0 : bool
| US2_1
and [<Struct>] US3 =
| US3_0 of f0_0 : bool
| US3_1 of f1_0 : exn
and [<Struct>] US4 =
| US4_0 of f0_0 : bool
| US4_1 of f1_0 : exn
and [<Struct>] US5 =
| US5_0 of f0_0 : int32
| US5_1
let rec closure1 () (v0 : string) : unit =
()
and method0 () : string =
let v0 : string = ""
v0
and method1 () : string =
let v0 : string = "AUTOMATION"
v0
and closure0 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) =
let v1 : Mut1 = {l0 = true} : Mut1
let v2 : Mut0 = {l0 = 0L} : Mut0
let v3 : Mut2 = {l0 = v0} : Mut2
let v4 : (string -> unit) = closure1()
let v5 : Mut3 = {l0 = v4} : Mut3
let v6 : bool = true
let mutable _v6 : int64 option option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v7 : bool = true
let mutable _v7 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v8 : string = "std::env::var(&*$0)"
let v9 : string = "AUTOMATION"
let v10 : Result<std_string_String, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr v9 v8
let v11 : string = "true; let _result = $0.map(|x| { //"
let v12 : bool = Fable.Core.RustInterop.emitRustExpr v10 v11
let v13 : string = "x"
let v14 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v13
let v15 : string = "fable_library_rust::String_::fromString($0)"
let v16 : string = Fable.Core.RustInterop.emitRustExpr v14 v15
let v17 : string = "true; $0 })"
let v18 : bool = Fable.Core.RustInterop.emitRustExpr v16 v17
let v19 : string = "_result"
let v20 : Result<string, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr () v19
let v21 : string = method0()
let v22 : string = "$0.unwrap_or($1)"
let v23 : string = Fable.Core.RustInterop.emitRustExpr struct (v20, v21) v22
v23
#endif
#if FABLE_COMPILER_RUST && WASM
let v24 : string = null |> unbox<string>
v24
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v25 : string = null |> unbox<string>
v25
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v26 : string = null |> unbox<string>
v26
#endif
#if FABLE_COMPILER_PYTHON
let v27 : string = null |> unbox<string>
v27
#endif
#else
let v28 : string = method1()
let v29 : (string -> string) = System.Environment.GetEnvironmentVariable
let v30 : string = v29 v28
v30
#endif
|> fun x -> _v7 <- Some x
let v31 : string = match _v7 with Some x -> x | None -> failwith "base.run_target / _v7=None"
let v33 : bool = v31 = "True"
let v39 : US1 =
if v33 then
let v34 : System.DateTime = System.DateTime.Now
let v35 : (System.DateTime -> int64) = _.Ticks
let v36 : int64 = v35 v34
US1_0(v36)
else
US1_1
let v44 : int64 option =
match v39 with
| US1_1 -> (* None *)
let v42 : int64 option = None
v42
| US1_0(v40) -> (* Some *)
let v41 : int64 option = Some v40
v41
v44
#endif
#if FABLE_COMPILER_RUST && WASM
let v45 : int64 option = None
v45
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v46 : int64 option = None
v46
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v47 : int64 option = None
v47
#endif
#if FABLE_COMPILER_PYTHON
let v48 : int64 option = None
v48
#endif
#else
let v49 : bool = true
let mutable _v49 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v50 : string = "std::env::var(&*$0)"
let v51 : Result<std_string_String, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr v9 v50
let v52 : string = "true; let _result = $0.map(|x| { //"
let v53 : bool = Fable.Core.RustInterop.emitRustExpr v51 v52
let v54 : string = "x"
let v55 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v54
let v56 : string = "fable_library_rust::String_::fromString($0)"
let v57 : string = Fable.Core.RustInterop.emitRustExpr v55 v56
let v58 : string = "true; $0 })"
let v59 : bool = Fable.Core.RustInterop.emitRustExpr v57 v58
let v60 : string = "_result"
let v61 : Result<string, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr () v60
let v62 : string = method0()
let v63 : string = "$0.unwrap_or($1)"
let v64 : string = Fable.Core.RustInterop.emitRustExpr struct (v61, v62) v63
v64
#endif
#if FABLE_COMPILER_RUST && WASM
let v65 : string = null |> unbox<string>
v65
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v66 : string = null |> unbox<string>
v66
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v67 : string = null |> unbox<string>
v67
#endif
#if FABLE_COMPILER_PYTHON
let v68 : string = null |> unbox<string>
v68
#endif
#else
let v69 : string = method1()
let v70 : (string -> string) = System.Environment.GetEnvironmentVariable
let v71 : string = v70 v69
v71
#endif
|> fun x -> _v49 <- Some x
let v72 : string = match _v49 with Some x -> x | None -> failwith "base.run_target / _v49=None"
let v74 : bool = v72 = "True"
let v80 : US1 =
if v74 then
let v75 : System.DateTime = System.DateTime.Now
let v76 : (System.DateTime -> int64) = _.Ticks
let v77 : int64 = v76 v75
US1_0(v77)
else
US1_1
let v85 : int64 option =
match v80 with
| US1_1 -> (* None *)
let v83 : int64 option = None
v83
| US1_0(v81) -> (* Some *)
let v82 : int64 option = Some v81
v82
v85
#endif
|> fun x -> _v6 <- Some x
let v86 : int64 option = match _v6 with Some x -> x | None -> failwith "base.run_target / _v6=None"
struct (v2, v1, v3, v86, v5)
and closure4 (v0 : int32, v1 : string) () : string =
let v2 : string = $"networking.test_port_open / port: {v0} / ex: {v1}"
v2
and closure5 () () : string =
let v0 : string = ""
v0
and method3 () : string =
let v0 : string = ""
v0
and closure6 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) () : string =
let v3 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure0()
let v4 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v3 v4 |> Some
let struct (v5 : Mut0, v6 : Mut1, v7 : Mut2, v8 : int64 option, v9 : Mut3) = State.trace_state.Value
let v10 : bool = true
let mutable _v10 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v11 : US1 option = None
let _v11 = ref v11
match v8 with
| Some x -> (
(fun () ->
(fun () ->
let v12 : int64 = x
let v13 : US1 = US1_0(v12)
v13
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v11.Value <- x
let v14 : US1 option = _v11.Value
let v15 : US1 = US1_1
let v16 : US1 = v14 |> Option.defaultValue v15
let v34 : System.DateTime =
match v16 with
| US1_1 -> (* None *)
let v32 : System.DateTime = System.DateTime.Now
v32
| US1_0(v17) -> (* Some *)
let v18 : System.DateTime = System.DateTime.Now
let v19 : (System.DateTime -> int64) = _.Ticks
let v20 : int64 = v19 v18
let v21 : int64 = v20 - v17
let v22 : System.TimeSpan = System.TimeSpan v21
let v23 : (System.TimeSpan -> int32) = _.Hours
let v24 : int32 = v23 v22
let v25 : (System.TimeSpan -> int32) = _.Minutes
let v26 : int32 = v25 v22
let v27 : (System.TimeSpan -> int32) = _.Seconds
let v28 : int32 = v27 v22
let v29 : (System.TimeSpan -> int32) = _.Milliseconds
let v30 : int32 = v29 v22
let v31 : System.DateTime = System.DateTime (1, 1, 1, v24, v26, v28, v30)
v31
let v35 : string = "hh:mm:ss"
let v36 : string = v34.ToString v35
v36
#endif
#if FABLE_COMPILER_RUST && WASM
let v37 : string = method3()
v37
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v38 : string = method3()
v38
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v39 : string = method3()
v39
#endif
#if FABLE_COMPILER_PYTHON
let v40 : string = method3()
v40
#endif
#else
let v41 : US1 option = None
let _v41 = ref v41
match v8 with
| Some x -> (
(fun () ->
(fun () ->
let v42 : int64 = x
let v43 : US1 = US1_0(v42)
v43
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v41.Value <- x
let v44 : US1 option = _v41.Value
let v45 : US1 = US1_1
let v46 : US1 = v44 |> Option.defaultValue v45
let v64 : System.DateTime =
match v46 with
| US1_1 -> (* None *)
let v62 : System.DateTime = System.DateTime.Now
v62
| US1_0(v47) -> (* Some *)
let v48 : System.DateTime = System.DateTime.Now
let v49 : (System.DateTime -> int64) = _.Ticks
let v50 : int64 = v49 v48
let v51 : int64 = v50 - v47
let v52 : System.TimeSpan = System.TimeSpan v51
let v53 : (System.TimeSpan -> int32) = _.Hours
let v54 : int32 = v53 v52
let v55 : (System.TimeSpan -> int32) = _.Minutes
let v56 : int32 = v55 v52
let v57 : (System.TimeSpan -> int32) = _.Seconds
let v58 : int32 = v57 v52
let v59 : (System.TimeSpan -> int32) = _.Milliseconds
let v60 : int32 = v59 v52
let v61 : System.DateTime = System.DateTime (1, 1, 1, v54, v56, v58, v60)
v61
let v65 : string = "HH:mm:ss"
let v66 : string = v64.ToString v65
v66
#endif
|> fun x -> _v10 <- Some x
let v67 : string = match _v10 with Some x -> x | None -> failwith "base.run_target / _v10=None"
let v68 : int64 = v5.l0
let v78 : string =
match v0 with
| US0_4 -> (* Critical *)
let v73 : string = "Critical"
v73
| US0_1 -> (* Debug *)
let v70 : string = "Debug"
v70
| US0_2 -> (* Info *)
let v71 : string = "Info"
v71
| US0_0 -> (* Verbose *)
let v69 : string = "Verbose"
v69
| US0_3 -> (* Warning *)
let v72 : string = "Warning"
v72
let v79 : (unit -> string) = v78.ToLower
let v80 : string = v79 ()
let v81 : string = v80.PadLeft (7, ' ')
let v82 : bool = true
let mutable _v82 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v97 : Ref<Str> =
match v0 with
| US0_4 -> (* Critical *)
let v91 : string = "inline_colorization::color_bright_red"
let v92 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v91
v92
| US0_1 -> (* Debug *)
let v85 : string = "inline_colorization::color_bright_blue"
let v86 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v85
v86
| US0_2 -> (* Info *)
let v87 : string = "inline_colorization::color_bright_green"
let v88 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v87
v88
| US0_0 -> (* Verbose *)
let v83 : string = "inline_colorization::color_bright_black"
let v84 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v83
v84
| US0_3 -> (* Warning *)
let v89 : string = "inline_colorization::color_yellow"
let v90 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v89
v90
let v98 : string = "&*$0"
let v99 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v81 v98
let v100 : string = "inline_colorization::color_reset"
let v101 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v100
let v102 : string = "\"{v97}{v99}{v101}\""
let v103 : string = @$"format!(" + v102 + ")"
let v104 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v103
let v105 : string = "fable_library_rust::String_::fromString($0)"
let v106 : string = Fable.Core.RustInterop.emitRustExpr v104 v105
v106
#endif
#if FABLE_COMPILER_RUST && WASM
let v121 : Ref<Str> =
match v0 with
| US0_4 -> (* Critical *)
let v115 : string = "inline_colorization::color_bright_red"
let v116 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v115
v116
| US0_1 -> (* Debug *)
let v109 : string = "inline_colorization::color_bright_blue"
let v110 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v109
v110
| US0_2 -> (* Info *)
let v111 : string = "inline_colorization::color_bright_green"
let v112 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v111
v112
| US0_0 -> (* Verbose *)
let v107 : string = "inline_colorization::color_bright_black"
let v108 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v107
v108
| US0_3 -> (* Warning *)
let v113 : string = "inline_colorization::color_yellow"
let v114 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v113
v114
let v122 : string = "&*$0"
let v123 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v81 v122
let v124 : string = "inline_colorization::color_reset"
let v125 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v124
let v126 : string = "\"{v121}{v123}{v125}\""
let v127 : string = @$"format!(" + v126 + ")"
let v128 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v127
let v129 : string = "fable_library_rust::String_::fromString($0)"
let v130 : string = Fable.Core.RustInterop.emitRustExpr v128 v129
v130
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v145 : Ref<Str> =
match v0 with
| US0_4 -> (* Critical *)
let v139 : string = "inline_colorization::color_bright_red"
let v140 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v139
v140
| US0_1 -> (* Debug *)
let v133 : string = "inline_colorization::color_bright_blue"
let v134 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v133
v134
| US0_2 -> (* Info *)
let v135 : string = "inline_colorization::color_bright_green"
let v136 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v135
v136
| US0_0 -> (* Verbose *)
let v131 : string = "inline_colorization::color_bright_black"
let v132 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v131
v132
| US0_3 -> (* Warning *)
let v137 : string = "inline_colorization::color_yellow"
let v138 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v137
v138
let v146 : string = "&*$0"
let v147 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v81 v146
let v148 : string = "inline_colorization::color_reset"
let v149 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v148
let v150 : string = "\"{v145}{v147}{v149}\""
let v151 : string = @$"format!(" + v150 + ")"
let v152 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v151
let v153 : string = "fable_library_rust::String_::fromString($0)"
let v154 : string = Fable.Core.RustInterop.emitRustExpr v152 v153
v154
#endif
#if FABLE_COMPILER_TYPESCRIPT
v81
#endif
#if FABLE_COMPILER_PYTHON
v81
#endif
#else
v81
#endif
|> fun x -> _v82 <- Some x
let v155 : string = match _v82 with Some x -> x | None -> failwith "base.run_target / _v82=None"
let v156 : string = $"{v67} {v155} #{v68} %s{v1 ()} / %s{v2 ()}"
let v157 : (char []) = [||]
let v158 : string = v156.TrimStart v157
let v159 : (char []) = [|' '; '/'|]
let v160 : string = v158.TrimEnd v159
v160
and method4 (v0 : US0, v1 : (unit -> string)) : unit =
let v2 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure0()
let v3 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v2 v3 |> Some
let struct (v4 : Mut0, v5 : Mut1, v6 : Mut2, v7 : int64 option, v8 : Mut3) = State.trace_state.Value
let v9 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v2 v9 |> Some
let struct (v10 : Mut0, v11 : Mut1, v12 : Mut2, v13 : int64 option, v14 : Mut3) = State.trace_state.Value
let v15 : US0 = v12.l0
let v16 : bool = v11.l0
let v17 : bool = v16 = false
let v21 : bool =
if v17 then
false
else
let v18 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v0
let v19 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v15
let v20 : bool = v18 >= v19
v20
if v21 then
let v22 : int64 = v4.l0
let v23 : int64 = v22 + 1L
v4.l0 <- v23
let v24 : string = $"%s{v1 ()}"
let v25 : bool = true
let mutable _v25 : unit option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v26 : string = @"println!(""{}"", $0)"
Fable.Core.RustInterop.emitRustExpr v24 v26
()
#endif
#if FABLE_COMPILER_RUST && WASM
let v27 : string = @"println!(""{}"", $0)"
Fable.Core.RustInterop.emitRustExpr v24 v27
()
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v28 : string = @"println!(""{}"", $0)"
Fable.Core.RustInterop.emitRustExpr v24 v28
()
#endif
#if FABLE_COMPILER_TYPESCRIPT
System.Console.WriteLine v24
()
#endif
#if FABLE_COMPILER_PYTHON
System.Console.WriteLine v24
()
#endif
#else
System.Console.WriteLine v24
()
#endif
|> fun x -> _v25 <- Some x
match _v25 with Some x -> x | None -> failwith "base.run_target / _v25=None"
let v29 : (string -> unit) = v8.l0
v29 v24
and method2 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) : unit =
let v3 : (unit -> string) = closure6(v0, v1, v2)
method4(v0, v3)
and closure3 (v0 : string) (v1 : int32) : Async<bool> =
let v2 : bool = true
let mutable _v2 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v3 : Async<bool> = null |> unbox<Async<bool>>
v3
#endif
#if FABLE_COMPILER_RUST && WASM
let v4 : Async<bool> = null |> unbox<Async<bool>>
v4
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v5 : Async<bool> = null |> unbox<Async<bool>>
v5
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v6 : Async<bool> = null |> unbox<Async<bool>>
v6
#endif
#if FABLE_COMPILER_PYTHON
let v7 : Async<bool> = null |> unbox<Async<bool>>
v7
#endif
#else
let v8 : Async<bool> option = None
let mutable _v8 = v8
async {
let v9 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v9 = v9
let v10 : System.Threading.CancellationToken = v9
let v11 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v11 = v11
let v12 : System.Net.Sockets.TcpClient = v11
try
let v13 : System.Threading.Tasks.ValueTask = v12.ConnectAsync (v0, v1, v10)
let v14 : (unit -> System.Threading.Tasks.Task) = v13.AsTask
let v15 : System.Threading.Tasks.Task = v14 ()
let v16 : bool = true
let mutable _v16 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v17 : Async<unit> = null |> unbox<Async<unit>>
v17
#endif
#if FABLE_COMPILER_RUST && WASM
let v18 : Async<unit> = null |> unbox<Async<unit>>
v18
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v19 : Async<unit> = null |> unbox<Async<unit>>
v19
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v20 : Async<unit> = null |> unbox<Async<unit>>
v20
#endif
#if FABLE_COMPILER_PYTHON
let v21 : Async<unit> = null |> unbox<Async<unit>>
v21
#endif
#else
let v22 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v23 : Async<unit> = v22 v15
v23
#endif
|> fun x -> _v16 <- Some x
let v24 : Async<unit> = match _v16 with Some x -> x | None -> failwith "base.run_target / _v16=None"
do! v24
return true
with ex ->
let v25 : exn = ex
let v26 : bool = true
let mutable _v26 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v27 : string = $"%A{v25}"
v27
#endif
#if FABLE_COMPILER_RUST && WASM
let v28 : string = $"%A{v25}"
v28
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v29 : string = $"%A{v25}"
v29
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v30 : string = $"%A{v25}"
v30
#endif
#if FABLE_COMPILER_PYTHON
let v31 : string = $"%A{v25}"
v31
#endif
#else
let v32 : string = $"{v25.GetType ()}: {v25.Message}"
v32
#endif
|> fun x -> _v26 <- Some x
let v33 : string = match _v26 with Some x -> x | None -> failwith "base.run_target / _v26=None"
let v34 : US0 = US0_0
let v35 : (unit -> string) = closure4(v1, v33)
let v36 : (unit -> string) = closure5()
method2(v34, v35, v36)
return false
(*
let v37 : bool = *)
}
|> fun x -> _v8 <- Some x
let v38 : Async<bool> = match _v8 with Some x -> x | None -> failwith "async.new_async_unit / _v8=None"
v38
#endif
|> fun x -> _v2 <- Some x
let v39 : Async<bool> = match _v2 with Some x -> x | None -> failwith "base.run_target / _v2=None"
v39
and closure2 () (v0 : string) : (int32 -> Async<bool>) =
closure3(v0)
and closure10 () (v0 : bool) : US3 =
US3_0(v0)
and closure11 () (v0 : exn) : US3 =
US3_1(v0)
and closure12 () () : string =
let v0 : string = "run_with_timeout_async"
v0
and closure13 (v0 : int32) () : string =
let v1 : (unit -> string) = closure5()
let v2 : string = $"timeout: {v0} / {v1 ()}"
v2
and closure14 (v0 : string) () : string =
let v1 : string = $"run_with_timeout_async** / ex: {v0}"
v1
and closure9 (v0 : int32, v1 : string) (v2 : int32) : Async<bool> =
let v3 : bool = true
let mutable _v3 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v4 : Async<bool> = null |> unbox<Async<bool>>
v4
#endif
#if FABLE_COMPILER_RUST && WASM
let v5 : Async<bool> = null |> unbox<Async<bool>>
v5
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v6 : Async<bool> = null |> unbox<Async<bool>>
v6
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v7 : Async<bool> = null |> unbox<Async<bool>>
v7
#endif
#if FABLE_COMPILER_PYTHON
let v8 : Async<bool> = null |> unbox<Async<bool>>
v8
#endif
#else
let v9 : Async<bool> option = None
let mutable _v9 = v9
async {
let v10 : bool = true
let mutable _v10 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v11 : Async<bool> = null |> unbox<Async<bool>>
v11
#endif
#if FABLE_COMPILER_RUST && WASM
let v12 : Async<bool> = null |> unbox<Async<bool>>
v12
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v13 : Async<bool> = null |> unbox<Async<bool>>
v13
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v14 : Async<bool> = null |> unbox<Async<bool>>
v14
#endif
#if FABLE_COMPILER_PYTHON
let v15 : Async<bool> = null |> unbox<Async<bool>>
v15
#endif
#else
let v16 : Async<bool> option = None
let mutable _v16 = v16
async {
let v17 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v17 = v17
let v18 : System.Threading.CancellationToken = v17
let v19 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v19 = v19
let v20 : System.Net.Sockets.TcpClient = v19
try
let v21 : System.Threading.Tasks.ValueTask = v20.ConnectAsync (v1, v2, v18)
let v22 : (unit -> System.Threading.Tasks.Task) = v21.AsTask
let v23 : System.Threading.Tasks.Task = v22 ()
let v24 : bool = true
let mutable _v24 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v25 : Async<unit> = null |> unbox<Async<unit>>
v25
#endif
#if FABLE_COMPILER_RUST && WASM
let v26 : Async<unit> = null |> unbox<Async<unit>>
v26
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v27 : Async<unit> = null |> unbox<Async<unit>>
v27
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v28 : Async<unit> = null |> unbox<Async<unit>>
v28
#endif
#if FABLE_COMPILER_PYTHON
let v29 : Async<unit> = null |> unbox<Async<unit>>
v29
#endif
#else
let v30 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v31 : Async<unit> = v30 v23
v31
#endif
|> fun x -> _v24 <- Some x
let v32 : Async<unit> = match _v24 with Some x -> x | None -> failwith "base.run_target / _v24=None"
do! v32
return true
with ex ->
let v33 : exn = ex
let v34 : bool = true
let mutable _v34 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v35 : string = $"%A{v33}"
v35
#endif
#if FABLE_COMPILER_RUST && WASM
let v36 : string = $"%A{v33}"
v36
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v37 : string = $"%A{v33}"
v37
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v38 : string = $"%A{v33}"
v38
#endif
#if FABLE_COMPILER_PYTHON
let v39 : string = $"%A{v33}"
v39
#endif
#else
let v40 : string = $"{v33.GetType ()}: {v33.Message}"
v40
#endif
|> fun x -> _v34 <- Some x
let v41 : string = match _v34 with Some x -> x | None -> failwith "base.run_target / _v34=None"
let v42 : US0 = US0_0
let v43 : (unit -> string) = closure4(v2, v41)
let v44 : (unit -> string) = closure5()
method2(v42, v43, v44)
return false
(*
let v45 : bool = *)
}
|> fun x -> _v16 <- Some x
let v46 : Async<bool> = match _v16 with Some x -> x | None -> failwith "async.new_async_unit / _v16=None"
v46
#endif
|> fun x -> _v10 <- Some x
let v47 : Async<bool> = match _v10 with Some x -> x | None -> failwith "base.run_target / _v10=None"
let v48 : bool = true
let mutable _v48 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v49 : Async<US2> = null |> unbox<Async<US2>>
v49
#endif
#if FABLE_COMPILER_RUST && WASM
let v50 : Async<US2> = null |> unbox<Async<US2>>
v50
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v51 : Async<US2> = null |> unbox<Async<US2>>
v51
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v52 : Async<US2> = null |> unbox<Async<US2>>
v52
#endif
#if FABLE_COMPILER_PYTHON
let v53 : Async<US2> = null |> unbox<Async<US2>>
v53
#endif
#else
let v54 : bool = true
let mutable _v54 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v55 : Async<US2> = null |> unbox<Async<US2>>
v55
#endif
#if FABLE_COMPILER_RUST && WASM
let v56 : Async<US2> = null |> unbox<Async<US2>>
v56
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v57 : Async<US2> = null |> unbox<Async<US2>>
v57
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v58 : Async<US2> = null |> unbox<Async<US2>>
v58
#endif
#if FABLE_COMPILER_PYTHON
let v59 : Async<US2> = null |> unbox<Async<US2>>
v59
#endif
#else
let v60 : Async<US2> option = None
let mutable _v60 = v60
async {
let v61 : bool = true
let mutable _v61 : Async<Async<bool>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v62 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v62
#endif
#if FABLE_COMPILER_RUST && WASM
let v63 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v63
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v64 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v64
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v65 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v65
#endif
#if FABLE_COMPILER_PYTHON
let v66 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v66
#endif
#else
let v67 : Async<Async<bool>> = Async.StartChild (v47, v0)
v67
#endif
|> fun x -> _v61 <- Some x
let v68 : Async<Async<bool>> = match _v61 with Some x -> x | None -> failwith "base.run_target / _v61=None"
let! v68 = v68
let v69 : Async<bool> = v68
let v70 : bool = true
let mutable _v70 : Async<Choice<bool, exn>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v71 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v71
#endif
#if FABLE_COMPILER_RUST && WASM
let v72 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v72
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v73 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v73
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v74 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v74
#endif
#if FABLE_COMPILER_PYTHON
let v75 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v75
#endif
#else
let v76 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch
let v77 : Async<Choice<bool, exn>> = v76 v69
v77
#endif
|> fun x -> _v70 <- Some x
let v78 : Async<Choice<bool, exn>> = match _v70 with Some x -> x | None -> failwith "base.run_target / _v70=None"
let v79 : bool = true
let mutable _v79 : Async<US3> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v80 : Async<US3> = null |> unbox<Async<US3>>
v80
#endif
#if FABLE_COMPILER_RUST && WASM
let v81 : Async<US3> = null |> unbox<Async<US3>>
v81
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v82 : Async<US3> = null |> unbox<Async<US3>>
v82
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v83 : Async<US3> = null |> unbox<Async<US3>>
v83
#endif
#if FABLE_COMPILER_PYTHON
let v84 : Async<US3> = null |> unbox<Async<US3>>
v84
#endif
#else
let v85 : Async<US3> option = None
let mutable _v85 = v85
async {
let! v78 = v78
let v86 : Choice<bool, exn> = v78
let v87 : bool = true
let mutable _v87 : US3 option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v88 : US3 = null |> unbox<US3>
v88
#endif
#if FABLE_COMPILER_RUST && WASM
let v89 : US3 = null |> unbox<US3>
v89
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v90 : US3 = null |> unbox<US3>
v90
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v91 : US3 = null |> unbox<US3>
v91
#endif
#if FABLE_COMPILER_PYTHON
let v92 : US3 = null |> unbox<US3>
v92
#endif
#else
let v93 : (bool -> US3) = closure10()
let v94 : (exn -> US3) = closure11()
let v95 : US3 = match v86 with Choice1Of2 x -> v93 x | Choice2Of2 x -> v94 x
v95
#endif
|> fun x -> _v87 <- Some x
let v96 : US3 = match _v87 with Some x -> x | None -> failwith "base.run_target / _v87=None"
return v96
}
|> fun x -> _v85 <- Some x
let v97 : Async<US3> = match _v85 with Some x -> x | None -> failwith "async.new_async_unit / _v85=None"
v97
#endif
|> fun x -> _v79 <- Some x
let v98 : Async<US3> = match _v79 with Some x -> x | None -> failwith "base.run_target / _v79=None"
let v99 : bool = true
let mutable _v99 : Async<US4> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v100 : Async<US4> = null |> unbox<Async<US4>>
v100
#endif
#if FABLE_COMPILER_RUST && WASM
let v101 : Async<US4> = null |> unbox<Async<US4>>
v101
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v102 : Async<US4> = null |> unbox<Async<US4>>
v102
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v103 : Async<US4> = null |> unbox<Async<US4>>
v103
#endif
#if FABLE_COMPILER_PYTHON
let v104 : Async<US4> = null |> unbox<Async<US4>>
v104
#endif
#else
let v105 : Async<US4> option = None
let mutable _v105 = v105
async {
let! v98 = v98
let v106 : US3 = v98
let v112 : US4 =
match v106 with
| US3_0(v107) -> (* Choice1Of2 *)
US4_0(v107)
| US3_1(v109) -> (* Choice2Of2 *)
US4_1(v109)
return v112
}
|> fun x -> _v105 <- Some x
let v113 : Async<US4> = match _v105 with Some x -> x | None -> failwith "async.new_async_unit / _v105=None"
v113
#endif
|> fun x -> _v99 <- Some x
let v114 : Async<US4> = match _v99 with Some x -> x | None -> failwith "base.run_target / _v99=None"
let v115 : bool = true
let mutable _v115 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v116 : Async<US2> = null |> unbox<Async<US2>>
v116
#endif
#if FABLE_COMPILER_RUST && WASM
let v117 : Async<US2> = null |> unbox<Async<US2>>
v117
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v118 : Async<US2> = null |> unbox<Async<US2>>
v118
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v119 : Async<US2> = null |> unbox<Async<US2>>
v119
#endif
#if FABLE_COMPILER_PYTHON
let v120 : Async<US2> = null |> unbox<Async<US2>>
v120
#endif
#else
let v121 : Async<US2> option = None
let mutable _v121 = v121
async {
let! v114 = v114
let v122 : US4 = v114
let v147 : US2 =
match v122 with
| US4_1(v125) -> (* Error *)
let v126 : string = $"%A{v125}"
let v127 : string = "System.TimeoutException"
let v128 : bool = v126.Contains v127
if v128 then
let v129 : US0 = US0_1
let v130 : (unit -> string) = closure12()
let v131 : (unit -> string) = closure13(v0)
method2(v129, v130, v131)
US2_1
else
let v133 : bool = true
let mutable _v133 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v134 : string = $"%A{v125}"
v134
#endif
#if FABLE_COMPILER_RUST && WASM
let v135 : string = $"%A{v125}"
v135
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v136 : string = $"%A{v125}"
v136
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v137 : string = $"%A{v125}"
v137
#endif
#if FABLE_COMPILER_PYTHON
let v138 : string = $"%A{v125}"
v138
#endif
#else
let v139 : string = $"{v125.GetType ()}: {v125.Message}"
v139
#endif
|> fun x -> _v133 <- Some x
let v140 : string = match _v133 with Some x -> x | None -> failwith "base.run_target / _v133=None"
let v141 : US0 = US0_4
let v142 : (unit -> string) = closure14(v140)
let v143 : (unit -> string) = closure13(v0)
method2(v141, v142, v143)
US2_1
| US4_0(v123) -> (* Ok *)
US2_0(v123)
return v147
}
|> fun x -> _v121 <- Some x
let v148 : Async<US2> = match _v121 with Some x -> x | None -> failwith "async.new_async_unit / _v121=None"
v148
#endif
|> fun x -> _v115 <- Some x
let v149 : Async<US2> = match _v115 with Some x -> x | None -> failwith "base.run_target / _v115=None"
return! v149
}
|> fun x -> _v60 <- Some x
let v150 : Async<US2> = match _v60 with Some x -> x | None -> failwith "async.new_async_unit / _v60=None"
v150
#endif
|> fun x -> _v54 <- Some x
let v151 : Async<US2> = match _v54 with Some x -> x | None -> failwith "base.run_target / _v54=None"
v151
#endif
|> fun x -> _v48 <- Some x
let v152 : Async<US2> = match _v48 with Some x -> x | None -> failwith "base.run_target / _v48=None"
let! v152 = v152
let v153 : US2 = v152
let v156 : bool =
match v153 with
| US2_1 -> (* None *)
false
| US2_0(v154) -> (* Some *)
v154
return v156
}
|> fun x -> _v9 <- Some x
let v157 : Async<bool> = match _v9 with Some x -> x | None -> failwith "async.new_async_unit / _v9=None"
v157
#endif
|> fun x -> _v3 <- Some x
let v158 : Async<bool> = match _v3 with Some x -> x | None -> failwith "base.run_target / _v3=None"
v158
and closure8 (v0 : int32) (v1 : string) : (int32 -> Async<bool>) =
closure9(v0, v1)
and closure7 () (v0 : int32) : (string -> (int32 -> Async<bool>)) =
closure8(v0)
and closure19 () () : string =
let v0 : string = "networking.wait_for_port_access"
v0
and closure20 (v0 : int32 option, v1 : bool, v2 : int32, v3 : int64) () : string =
let v4 : (unit -> string) = closure5()
let v5 : string = $"port: {v2} / retry: {v3} / timeout: %A{v0} / status: {v1} / {v4 ()}"
v5
and method5 (v0 : int32 option, v1 : bool, v2 : string, v3 : int32, v4 : int64) : Async<int64> =
let v5 : bool = true
let mutable _v5 : Async<int64> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v6 : Async<int64> = null |> unbox<Async<int64>>
v6
#endif
#if FABLE_COMPILER_RUST && WASM
let v7 : Async<int64> = null |> unbox<Async<int64>>
v7
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v8 : Async<int64> = null |> unbox<Async<int64>>
v8
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v9 : Async<int64> = null |> unbox<Async<int64>>
v9
#endif
#if FABLE_COMPILER_PYTHON
let v10 : Async<int64> = null |> unbox<Async<int64>>
v10
#endif
#else
let v11 : Async<int64> option = None
let mutable _v11 = v11
async {
let v12 : US5 option = None
let _v12 = ref v12
match v0 with
| Some x -> (
(fun () ->
(fun () ->
let v13 : int32 = x
let v14 : US5 = US5_0(v13)
v14
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v12.Value <- x
let v15 : US5 option = _v12.Value
let v16 : US5 = US5_1
let v17 : US5 = v15 |> Option.defaultValue v16
let v214 : Async<bool> =
match v17 with
| US5_1 -> (* None *)
let v18 : bool = true
let mutable _v18 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v19 : Async<bool> = null |> unbox<Async<bool>>
v19
#endif
#if FABLE_COMPILER_RUST && WASM
let v20 : Async<bool> = null |> unbox<Async<bool>>
v20
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v21 : Async<bool> = null |> unbox<Async<bool>>
v21
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v22 : Async<bool> = null |> unbox<Async<bool>>
v22
#endif
#if FABLE_COMPILER_PYTHON
let v23 : Async<bool> = null |> unbox<Async<bool>>
v23
#endif
#else
let v24 : Async<bool> option = None
let mutable _v24 = v24
async {
let v25 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v25 = v25
let v26 : System.Threading.CancellationToken = v25
let v27 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v27 = v27
let v28 : System.Net.Sockets.TcpClient = v27
try
let v29 : System.Threading.Tasks.ValueTask = v28.ConnectAsync (v2, v3, v26)
let v30 : (unit -> System.Threading.Tasks.Task) = v29.AsTask
let v31 : System.Threading.Tasks.Task = v30 ()
let v32 : bool = true
let mutable _v32 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v33 : Async<unit> = null |> unbox<Async<unit>>
v33
#endif
#if FABLE_COMPILER_RUST && WASM
let v34 : Async<unit> = null |> unbox<Async<unit>>
v34
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v35 : Async<unit> = null |> unbox<Async<unit>>
v35
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v36 : Async<unit> = null |> unbox<Async<unit>>
v36
#endif
#if FABLE_COMPILER_PYTHON
let v37 : Async<unit> = null |> unbox<Async<unit>>
v37
#endif
#else
let v38 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v39 : Async<unit> = v38 v31
v39
#endif
|> fun x -> _v32 <- Some x
let v40 : Async<unit> = match _v32 with Some x -> x | None -> failwith "base.run_target / _v32=None"
do! v40
return true
with ex ->
let v41 : exn = ex
let v42 : bool = true
let mutable _v42 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v43 : string = $"%A{v41}"
v43
#endif
#if FABLE_COMPILER_RUST && WASM
let v44 : string = $"%A{v41}"
v44
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v45 : string = $"%A{v41}"
v45
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v46 : string = $"%A{v41}"
v46
#endif
#if FABLE_COMPILER_PYTHON
let v47 : string = $"%A{v41}"
v47
#endif
#else
let v48 : string = $"{v41.GetType ()}: {v41.Message}"
v48
#endif
|> fun x -> _v42 <- Some x
let v49 : string = match _v42 with Some x -> x | None -> failwith "base.run_target / _v42=None"
let v50 : US0 = US0_0
let v51 : (unit -> string) = closure4(v3, v49)
let v52 : (unit -> string) = closure5()
method2(v50, v51, v52)
return false
(*
let v53 : bool = *)
}
|> fun x -> _v24 <- Some x
let v54 : Async<bool> = match _v24 with Some x -> x | None -> failwith "async.new_async_unit / _v24=None"
v54
#endif
|> fun x -> _v18 <- Some x
let v55 : Async<bool> = match _v18 with Some x -> x | None -> failwith "base.run_target / _v18=None"
v55
| US5_0(v56) -> (* Some *)
let v57 : bool = true
let mutable _v57 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v58 : Async<bool> = null |> unbox<Async<bool>>
v58
#endif
#if FABLE_COMPILER_RUST && WASM
let v59 : Async<bool> = null |> unbox<Async<bool>>
v59
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v60 : Async<bool> = null |> unbox<Async<bool>>
v60
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v61 : Async<bool> = null |> unbox<Async<bool>>
v61
#endif
#if FABLE_COMPILER_PYTHON
let v62 : Async<bool> = null |> unbox<Async<bool>>
v62
#endif
#else
let v63 : Async<bool> option = None
let mutable _v63 = v63
async {
let v64 : bool = true
let mutable _v64 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v65 : Async<bool> = null |> unbox<Async<bool>>
v65
#endif
#if FABLE_COMPILER_RUST && WASM
let v66 : Async<bool> = null |> unbox<Async<bool>>
v66
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v67 : Async<bool> = null |> unbox<Async<bool>>
v67
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v68 : Async<bool> = null |> unbox<Async<bool>>
v68
#endif
#if FABLE_COMPILER_PYTHON
let v69 : Async<bool> = null |> unbox<Async<bool>>
v69
#endif
#else
let v70 : Async<bool> option = None
let mutable _v70 = v70
async {
let v71 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v71 = v71
let v72 : System.Threading.CancellationToken = v71
let v73 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v73 = v73
let v74 : System.Net.Sockets.TcpClient = v73
try
let v75 : System.Threading.Tasks.ValueTask = v74.ConnectAsync (v2, v3, v72)
let v76 : (unit -> System.Threading.Tasks.Task) = v75.AsTask
let v77 : System.Threading.Tasks.Task = v76 ()
let v78 : bool = true
let mutable _v78 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v79 : Async<unit> = null |> unbox<Async<unit>>
v79
#endif
#if FABLE_COMPILER_RUST && WASM
let v80 : Async<unit> = null |> unbox<Async<unit>>
v80
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v81 : Async<unit> = null |> unbox<Async<unit>>
v81
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v82 : Async<unit> = null |> unbox<Async<unit>>
v82
#endif
#if FABLE_COMPILER_PYTHON
let v83 : Async<unit> = null |> unbox<Async<unit>>
v83
#endif
#else
let v84 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v85 : Async<unit> = v84 v77
v85
#endif
|> fun x -> _v78 <- Some x
let v86 : Async<unit> = match _v78 with Some x -> x | None -> failwith "base.run_target / _v78=None"
do! v86
return true
with ex ->
let v87 : exn = ex
let v88 : bool = true
let mutable _v88 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v89 : string = $"%A{v87}"
v89
#endif
#if FABLE_COMPILER_RUST && WASM
let v90 : string = $"%A{v87}"
v90
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v91 : string = $"%A{v87}"
v91
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v92 : string = $"%A{v87}"
v92
#endif
#if FABLE_COMPILER_PYTHON
let v93 : string = $"%A{v87}"
v93
#endif
#else
let v94 : string = $"{v87.GetType ()}: {v87.Message}"
v94
#endif
|> fun x -> _v88 <- Some x
let v95 : string = match _v88 with Some x -> x | None -> failwith "base.run_target / _v88=None"
let v96 : US0 = US0_0
let v97 : (unit -> string) = closure4(v3, v95)
let v98 : (unit -> string) = closure5()
method2(v96, v97, v98)
return false
(*
let v99 : bool = *)
}
|> fun x -> _v70 <- Some x
let v100 : Async<bool> = match _v70 with Some x -> x | None -> failwith "async.new_async_unit / _v70=None"
v100
#endif
|> fun x -> _v64 <- Some x
let v101 : Async<bool> = match _v64 with Some x -> x | None -> failwith "base.run_target / _v64=None"
let v102 : bool = true
let mutable _v102 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v103 : Async<US2> = null |> unbox<Async<US2>>
v103
#endif
#if FABLE_COMPILER_RUST && WASM
let v104 : Async<US2> = null |> unbox<Async<US2>>
v104
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v105 : Async<US2> = null |> unbox<Async<US2>>
v105
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v106 : Async<US2> = null |> unbox<Async<US2>>
v106
#endif
#if FABLE_COMPILER_PYTHON
let v107 : Async<US2> = null |> unbox<Async<US2>>
v107
#endif
#else
let v108 : bool = true
let mutable _v108 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v109 : Async<US2> = null |> unbox<Async<US2>>
v109
#endif
#if FABLE_COMPILER_RUST && WASM
let v110 : Async<US2> = null |> unbox<Async<US2>>
v110
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v111 : Async<US2> = null |> unbox<Async<US2>>
v111
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v112 : Async<US2> = null |> unbox<Async<US2>>
v112
#endif
#if FABLE_COMPILER_PYTHON
let v113 : Async<US2> = null |> unbox<Async<US2>>
v113
#endif
#else
let v114 : Async<US2> option = None
let mutable _v114 = v114
async {
let v115 : bool = true
let mutable _v115 : Async<Async<bool>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v116 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v116
#endif
#if FABLE_COMPILER_RUST && WASM
let v117 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v117
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v118 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v118
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v119 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v119
#endif
#if FABLE_COMPILER_PYTHON
let v120 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v120
#endif
#else
let v121 : Async<Async<bool>> = Async.StartChild (v101, v56)
v121
#endif
|> fun x -> _v115 <- Some x
let v122 : Async<Async<bool>> = match _v115 with Some x -> x | None -> failwith "base.run_target / _v115=None"
let! v122 = v122
let v123 : Async<bool> = v122
let v124 : bool = true
let mutable _v124 : Async<Choice<bool, exn>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v125 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v125
#endif
#if FABLE_COMPILER_RUST && WASM
let v126 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v126
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v127 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v127
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v128 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v128
#endif
#if FABLE_COMPILER_PYTHON
let v129 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v129
#endif
#else
let v130 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch
let v131 : Async<Choice<bool, exn>> = v130 v123
v131
#endif
|> fun x -> _v124 <- Some x
let v132 : Async<Choice<bool, exn>> = match _v124 with Some x -> x | None -> failwith "base.run_target / _v124=None"
let v133 : bool = true
let mutable _v133 : Async<US3> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v134 : Async<US3> = null |> unbox<Async<US3>>
v134
#endif
#if FABLE_COMPILER_RUST && WASM
let v135 : Async<US3> = null |> unbox<Async<US3>>
v135
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v136 : Async<US3> = null |> unbox<Async<US3>>
v136
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v137 : Async<US3> = null |> unbox<Async<US3>>
v137
#endif
#if FABLE_COMPILER_PYTHON
let v138 : Async<US3> = null |> unbox<Async<US3>>
v138
#endif
#else
let v139 : Async<US3> option = None
let mutable _v139 = v139
async {
let! v132 = v132
let v140 : Choice<bool, exn> = v132
let v141 : bool = true
let mutable _v141 : US3 option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v142 : US3 = null |> unbox<US3>
v142
#endif
#if FABLE_COMPILER_RUST && WASM
let v143 : US3 = null |> unbox<US3>
v143
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v144 : US3 = null |> unbox<US3>
v144
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v145 : US3 = null |> unbox<US3>
v145
#endif
#if FABLE_COMPILER_PYTHON
let v146 : US3 = null |> unbox<US3>
v146
#endif
#else
let v147 : (bool -> US3) = closure10()
let v148 : (exn -> US3) = closure11()
let v149 : US3 = match v140 with Choice1Of2 x -> v147 x | Choice2Of2 x -> v148 x
v149
#endif
|> fun x -> _v141 <- Some x
let v150 : US3 = match _v141 with Some x -> x | None -> failwith "base.run_target / _v141=None"
return v150
}
|> fun x -> _v139 <- Some x
let v151 : Async<US3> = match _v139 with Some x -> x | None -> failwith "async.new_async_unit / _v139=None"
v151
#endif
|> fun x -> _v133 <- Some x
let v152 : Async<US3> = match _v133 with Some x -> x | None -> failwith "base.run_target / _v133=None"
let v153 : bool = true
let mutable _v153 : Async<US4> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v154 : Async<US4> = null |> unbox<Async<US4>>
v154
#endif
#if FABLE_COMPILER_RUST && WASM
let v155 : Async<US4> = null |> unbox<Async<US4>>
v155
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v156 : Async<US4> = null |> unbox<Async<US4>>
v156
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v157 : Async<US4> = null |> unbox<Async<US4>>
v157
#endif
#if FABLE_COMPILER_PYTHON
let v158 : Async<US4> = null |> unbox<Async<US4>>
v158
#endif
#else
let v159 : Async<US4> option = None
let mutable _v159 = v159
async {
let! v152 = v152
let v160 : US3 = v152
let v166 : US4 =
match v160 with
| US3_0(v161) -> (* Choice1Of2 *)
US4_0(v161)
| US3_1(v163) -> (* Choice2Of2 *)
US4_1(v163)
return v166
}
|> fun x -> _v159 <- Some x
let v167 : Async<US4> = match _v159 with Some x -> x | None -> failwith "async.new_async_unit / _v159=None"
v167
#endif
|> fun x -> _v153 <- Some x
let v168 : Async<US4> = match _v153 with Some x -> x | None -> failwith "base.run_target / _v153=None"
let v169 : bool = true
let mutable _v169 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v170 : Async<US2> = null |> unbox<Async<US2>>
v170
#endif
#if FABLE_COMPILER_RUST && WASM
let v171 : Async<US2> = null |> unbox<Async<US2>>
v171
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v172 : Async<US2> = null |> unbox<Async<US2>>
v172
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v173 : Async<US2> = null |> unbox<Async<US2>>
v173
#endif
#if FABLE_COMPILER_PYTHON
let v174 : Async<US2> = null |> unbox<Async<US2>>
v174
#endif
#else
let v175 : Async<US2> option = None
let mutable _v175 = v175
async {
let! v168 = v168
let v176 : US4 = v168
let v201 : US2 =
match v176 with
| US4_1(v179) -> (* Error *)
let v180 : string = $"%A{v179}"
let v181 : string = "System.TimeoutException"
let v182 : bool = v180.Contains v181
if v182 then
let v183 : US0 = US0_1
let v184 : (unit -> string) = closure12()
let v185 : (unit -> string) = closure13(v56)
method2(v183, v184, v185)
US2_1
else
let v187 : bool = true
let mutable _v187 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v188 : string = $"%A{v179}"
v188
#endif
#if FABLE_COMPILER_RUST && WASM
let v189 : string = $"%A{v179}"
v189
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v190 : string = $"%A{v179}"
v190
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v191 : string = $"%A{v179}"
v191
#endif
#if FABLE_COMPILER_PYTHON
let v192 : string = $"%A{v179}"
v192
#endif
#else
let v193 : string = $"{v179.GetType ()}: {v179.Message}"
v193
#endif
|> fun x -> _v187 <- Some x
let v194 : string = match _v187 with Some x -> x | None -> failwith "base.run_target / _v187=None"
let v195 : US0 = US0_4
let v196 : (unit -> string) = closure14(v194)
let v197 : (unit -> string) = closure13(v56)
method2(v195, v196, v197)
US2_1
| US4_0(v177) -> (* Ok *)
US2_0(v177)
return v201
}
|> fun x -> _v175 <- Some x
let v202 : Async<US2> = match _v175 with Some x -> x | None -> failwith "async.new_async_unit / _v175=None"
v202
#endif
|> fun x -> _v169 <- Some x
let v203 : Async<US2> = match _v169 with Some x -> x | None -> failwith "base.run_target / _v169=None"
return! v203
}
|> fun x -> _v114 <- Some x
let v204 : Async<US2> = match _v114 with Some x -> x | None -> failwith "async.new_async_unit / _v114=None"
v204
#endif
|> fun x -> _v108 <- Some x
let v205 : Async<US2> = match _v108 with Some x -> x | None -> failwith "base.run_target / _v108=None"
v205
#endif
|> fun x -> _v102 <- Some x
let v206 : Async<US2> = match _v102 with Some x -> x | None -> failwith "base.run_target / _v102=None"
let! v206 = v206
let v207 : US2 = v206
let v210 : bool =
match v207 with
| US2_1 -> (* None *)
false
| US2_0(v208) -> (* Some *)
v208
return v210
}
|> fun x -> _v63 <- Some x
let v211 : Async<bool> = match _v63 with Some x -> x | None -> failwith "async.new_async_unit / _v63=None"
v211
#endif
|> fun x -> _v57 <- Some x
let v212 : Async<bool> = match _v57 with Some x -> x | None -> failwith "base.run_target / _v57=None"
v212
let! v214 = v214
let v215 : bool = v214
let v216 : bool = v215 = v1
if v216 then
return v4
(*
()
else
*) else
let v217 : int64 = v4 % 100L
let v218 : bool = v217 = 0L
if v218 then
let v219 : US0 = US0_0
let v220 : (unit -> string) = closure19()
let v221 : (unit -> string) = closure20(v0, v1, v3, v4)
method2(v219, v220, v221)
let v222 : bool = true
let mutable _v222 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v223 : Async<unit> = null |> unbox<Async<unit>>
v223
#endif
#if FABLE_COMPILER_RUST && WASM
let v224 : Async<unit> = null |> unbox<Async<unit>>
v224
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v225 : Async<unit> = null |> unbox<Async<unit>>
v225
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v226 : Async<unit> = null |> unbox<Async<unit>>
v226
#endif
#if FABLE_COMPILER_PYTHON
let v227 : Async<unit> = null |> unbox<Async<unit>>
v227
#endif
#else
let v228 : (int32 -> Async<unit>) = Async.Sleep
let v229 : Async<unit> = v228 10
v229
#endif
|> fun x -> _v222 <- Some x
let v230 : Async<unit> = match _v222 with Some x -> x | None -> failwith "base.run_target / _v222=None"
do! v230
let v231 : int64 = v4 + 1L
let v232 : Async<int64> = method5(v0, v1, v2, v3, v231)
return! v232
(*
()
*)
}
|> fun x -> _v11 <- Some x
let v233 : Async<int64> = match _v11 with Some x -> x | None -> failwith "async.new_async_unit / _v11=None"
v233
#endif
|> fun x -> _v5 <- Some x
let v234 : Async<int64> = match _v5 with Some x -> x | None -> failwith "base.run_target / _v5=None"
v234
and closure18 (v0 : int32 option, v1 : bool, v2 : string) (v3 : int32) : Async<int64> =
let v4 : int64 = 0L
method5(v0, v1, v2, v3, v4)
and closure17 (v0 : int32 option, v1 : bool) (v2 : string) : (int32 -> Async<int64>) =
closure18(v0, v1, v2)
and closure16 (v0 : int32 option) (v1 : bool) : (string -> (int32 -> Async<int64>)) =
closure17(v0, v1)
and closure15 () (v0 : int32 option) : (bool -> (string -> (int32 -> Async<int64>))) =
closure16(v0)
and method6 (v0 : int32 option, v1 : string, v2 : int32) : Async<int32> =
let v3 : bool = true
let mutable _v3 : Async<int32> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v4 : Async<int32> = null |> unbox<Async<int32>>
v4
#endif
#if FABLE_COMPILER_RUST && WASM
let v5 : Async<int32> = null |> unbox<Async<int32>>
v5
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v6 : Async<int32> = null |> unbox<Async<int32>>
v6
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v7 : Async<int32> = null |> unbox<Async<int32>>
v7
#endif
#if FABLE_COMPILER_PYTHON
let v8 : Async<int32> = null |> unbox<Async<int32>>
v8
#endif
#else
let v9 : Async<int32> option = None
let mutable _v9 = v9
async {
let v10 : US5 option = None
let _v10 = ref v10
match v0 with
| Some x -> (
(fun () ->
(fun () ->
let v11 : int32 = x
let v12 : US5 = US5_0(v11)
v12
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v10.Value <- x
let v13 : US5 option = _v10.Value
let v14 : US5 = US5_1
let v15 : US5 = v13 |> Option.defaultValue v14
let v212 : Async<bool> =
match v15 with
| US5_1 -> (* None *)
let v16 : bool = true
let mutable _v16 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v17 : Async<bool> = null |> unbox<Async<bool>>
v17
#endif
#if FABLE_COMPILER_RUST && WASM
let v18 : Async<bool> = null |> unbox<Async<bool>>
v18
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v19 : Async<bool> = null |> unbox<Async<bool>>
v19
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v20 : Async<bool> = null |> unbox<Async<bool>>
v20
#endif
#if FABLE_COMPILER_PYTHON
let v21 : Async<bool> = null |> unbox<Async<bool>>
v21
#endif
#else
let v22 : Async<bool> option = None
let mutable _v22 = v22
async {
let v23 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v23 = v23
let v24 : System.Threading.CancellationToken = v23
let v25 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v25 = v25
let v26 : System.Net.Sockets.TcpClient = v25
try
let v27 : System.Threading.Tasks.ValueTask = v26.ConnectAsync (v1, v2, v24)
let v28 : (unit -> System.Threading.Tasks.Task) = v27.AsTask
let v29 : System.Threading.Tasks.Task = v28 ()
let v30 : bool = true
let mutable _v30 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v31 : Async<unit> = null |> unbox<Async<unit>>
v31
#endif
#if FABLE_COMPILER_RUST && WASM
let v32 : Async<unit> = null |> unbox<Async<unit>>
v32
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v33 : Async<unit> = null |> unbox<Async<unit>>
v33
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v34 : Async<unit> = null |> unbox<Async<unit>>
v34
#endif
#if FABLE_COMPILER_PYTHON
let v35 : Async<unit> = null |> unbox<Async<unit>>
v35
#endif
#else
let v36 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v37 : Async<unit> = v36 v29
v37
#endif
|> fun x -> _v30 <- Some x
let v38 : Async<unit> = match _v30 with Some x -> x | None -> failwith "base.run_target / _v30=None"
do! v38
return true
with ex ->
let v39 : exn = ex
let v40 : bool = true
let mutable _v40 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v41 : string = $"%A{v39}"
v41
#endif
#if FABLE_COMPILER_RUST && WASM
let v42 : string = $"%A{v39}"
v42
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v43 : string = $"%A{v39}"
v43
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v44 : string = $"%A{v39}"
v44
#endif
#if FABLE_COMPILER_PYTHON
let v45 : string = $"%A{v39}"
v45
#endif
#else
let v46 : string = $"{v39.GetType ()}: {v39.Message}"
v46
#endif
|> fun x -> _v40 <- Some x
let v47 : string = match _v40 with Some x -> x | None -> failwith "base.run_target / _v40=None"
let v48 : US0 = US0_0
let v49 : (unit -> string) = closure4(v2, v47)
let v50 : (unit -> string) = closure5()
method2(v48, v49, v50)
return false
(*
let v51 : bool = *)
}
|> fun x -> _v22 <- Some x
let v52 : Async<bool> = match _v22 with Some x -> x | None -> failwith "async.new_async_unit / _v22=None"
v52
#endif
|> fun x -> _v16 <- Some x
let v53 : Async<bool> = match _v16 with Some x -> x | None -> failwith "base.run_target / _v16=None"
v53
| US5_0(v54) -> (* Some *)
let v55 : bool = true
let mutable _v55 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v56 : Async<bool> = null |> unbox<Async<bool>>
v56
#endif
#if FABLE_COMPILER_RUST && WASM
let v57 : Async<bool> = null |> unbox<Async<bool>>
v57
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v58 : Async<bool> = null |> unbox<Async<bool>>
v58
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v59 : Async<bool> = null |> unbox<Async<bool>>
v59
#endif
#if FABLE_COMPILER_PYTHON
let v60 : Async<bool> = null |> unbox<Async<bool>>
v60
#endif
#else
let v61 : Async<bool> option = None
let mutable _v61 = v61
async {
let v62 : bool = true
let mutable _v62 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v63 : Async<bool> = null |> unbox<Async<bool>>
v63
#endif
#if FABLE_COMPILER_RUST && WASM
let v64 : Async<bool> = null |> unbox<Async<bool>>
v64
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v65 : Async<bool> = null |> unbox<Async<bool>>
v65
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v66 : Async<bool> = null |> unbox<Async<bool>>
v66
#endif
#if FABLE_COMPILER_PYTHON
let v67 : Async<bool> = null |> unbox<Async<bool>>
v67
#endif
#else
let v68 : Async<bool> option = None
let mutable _v68 = v68
async {
let v69 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v69 = v69
let v70 : System.Threading.CancellationToken = v69
let v71 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v71 = v71
let v72 : System.Net.Sockets.TcpClient = v71
try
let v73 : System.Threading.Tasks.ValueTask = v72.ConnectAsync (v1, v2, v70)
let v74 : (unit -> System.Threading.Tasks.Task) = v73.AsTask
let v75 : System.Threading.Tasks.Task = v74 ()
let v76 : bool = true
let mutable _v76 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v77 : Async<unit> = null |> unbox<Async<unit>>
v77
#endif
#if FABLE_COMPILER_RUST && WASM
let v78 : Async<unit> = null |> unbox<Async<unit>>
v78
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v79 : Async<unit> = null |> unbox<Async<unit>>
v79
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v80 : Async<unit> = null |> unbox<Async<unit>>
v80
#endif
#if FABLE_COMPILER_PYTHON
let v81 : Async<unit> = null |> unbox<Async<unit>>
v81
#endif
#else
let v82 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v83 : Async<unit> = v82 v75
v83
#endif
|> fun x -> _v76 <- Some x
let v84 : Async<unit> = match _v76 with Some x -> x | None -> failwith "base.run_target / _v76=None"
do! v84
return true
with ex ->
let v85 : exn = ex
let v86 : bool = true
let mutable _v86 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v87 : string = $"%A{v85}"
v87
#endif
#if FABLE_COMPILER_RUST && WASM
let v88 : string = $"%A{v85}"
v88
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v89 : string = $"%A{v85}"
v89
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v90 : string = $"%A{v85}"
v90
#endif
#if FABLE_COMPILER_PYTHON
let v91 : string = $"%A{v85}"
v91
#endif
#else
let v92 : string = $"{v85.GetType ()}: {v85.Message}"
v92
#endif
|> fun x -> _v86 <- Some x
let v93 : string = match _v86 with Some x -> x | None -> failwith "base.run_target / _v86=None"
let v94 : US0 = US0_0
let v95 : (unit -> string) = closure4(v2, v93)
let v96 : (unit -> string) = closure5()
method2(v94, v95, v96)
return false
(*
let v97 : bool = *)
}
|> fun x -> _v68 <- Some x
let v98 : Async<bool> = match _v68 with Some x -> x | None -> failwith "async.new_async_unit / _v68=None"
v98
#endif
|> fun x -> _v62 <- Some x
let v99 : Async<bool> = match _v62 with Some x -> x | None -> failwith "base.run_target / _v62=None"
let v100 : bool = true
let mutable _v100 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v101 : Async<US2> = null |> unbox<Async<US2>>
v101
#endif
#if FABLE_COMPILER_RUST && WASM
let v102 : Async<US2> = null |> unbox<Async<US2>>
v102
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v103 : Async<US2> = null |> unbox<Async<US2>>
v103
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v104 : Async<US2> = null |> unbox<Async<US2>>
v104
#endif
#if FABLE_COMPILER_PYTHON
let v105 : Async<US2> = null |> unbox<Async<US2>>
v105
#endif
#else
let v106 : bool = true
let mutable _v106 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v107 : Async<US2> = null |> unbox<Async<US2>>
v107
#endif
#if FABLE_COMPILER_RUST && WASM
let v108 : Async<US2> = null |> unbox<Async<US2>>
v108
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v109 : Async<US2> = null |> unbox<Async<US2>>
v109
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v110 : Async<US2> = null |> unbox<Async<US2>>
v110
#endif
#if FABLE_COMPILER_PYTHON
let v111 : Async<US2> = null |> unbox<Async<US2>>
v111
#endif
#else
let v112 : Async<US2> option = None
let mutable _v112 = v112
async {
let v113 : bool = true
let mutable _v113 : Async<Async<bool>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v114 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v114
#endif
#if FABLE_COMPILER_RUST && WASM
let v115 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v115
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v116 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v116
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v117 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v117
#endif
#if FABLE_COMPILER_PYTHON
let v118 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v118
#endif
#else
let v119 : Async<Async<bool>> = Async.StartChild (v99, v54)
v119
#endif
|> fun x -> _v113 <- Some x
let v120 : Async<Async<bool>> = match _v113 with Some x -> x | None -> failwith "base.run_target / _v113=None"
let! v120 = v120
let v121 : Async<bool> = v120
let v122 : bool = true
let mutable _v122 : Async<Choice<bool, exn>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v123 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v123
#endif
#if FABLE_COMPILER_RUST && WASM
let v124 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v124
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v125 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v125
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v126 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v126
#endif
#if FABLE_COMPILER_PYTHON
let v127 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v127
#endif
#else
let v128 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch
let v129 : Async<Choice<bool, exn>> = v128 v121
v129
#endif
|> fun x -> _v122 <- Some x
let v130 : Async<Choice<bool, exn>> = match _v122 with Some x -> x | None -> failwith "base.run_target / _v122=None"
let v131 : bool = true
let mutable _v131 : Async<US3> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v132 : Async<US3> = null |> unbox<Async<US3>>
v132
#endif
#if FABLE_COMPILER_RUST && WASM
let v133 : Async<US3> = null |> unbox<Async<US3>>
v133
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v134 : Async<US3> = null |> unbox<Async<US3>>
v134
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v135 : Async<US3> = null |> unbox<Async<US3>>
v135
#endif
#if FABLE_COMPILER_PYTHON
let v136 : Async<US3> = null |> unbox<Async<US3>>
v136
#endif
#else
let v137 : Async<US3> option = None
let mutable _v137 = v137
async {
let! v130 = v130
let v138 : Choice<bool, exn> = v130
let v139 : bool = true
let mutable _v139 : US3 option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v140 : US3 = null |> unbox<US3>
v140
#endif
#if FABLE_COMPILER_RUST && WASM
let v141 : US3 = null |> unbox<US3>
v141
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v142 : US3 = null |> unbox<US3>
v142
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v143 : US3 = null |> unbox<US3>
v143
#endif
#if FABLE_COMPILER_PYTHON
let v144 : US3 = null |> unbox<US3>
v144
#endif
#else
let v145 : (bool -> US3) = closure10()
let v146 : (exn -> US3) = closure11()
let v147 : US3 = match v138 with Choice1Of2 x -> v145 x | Choice2Of2 x -> v146 x
v147
#endif
|> fun x -> _v139 <- Some x
let v148 : US3 = match _v139 with Some x -> x | None -> failwith "base.run_target / _v139=None"
return v148
}
|> fun x -> _v137 <- Some x
let v149 : Async<US3> = match _v137 with Some x -> x | None -> failwith "async.new_async_unit / _v137=None"
v149
#endif
|> fun x -> _v131 <- Some x
let v150 : Async<US3> = match _v131 with Some x -> x | None -> failwith "base.run_target / _v131=None"
let v151 : bool = true
let mutable _v151 : Async<US4> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v152 : Async<US4> = null |> unbox<Async<US4>>
v152
#endif
#if FABLE_COMPILER_RUST && WASM
let v153 : Async<US4> = null |> unbox<Async<US4>>
v153
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v154 : Async<US4> = null |> unbox<Async<US4>>
v154
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v155 : Async<US4> = null |> unbox<Async<US4>>
v155
#endif
#if FABLE_COMPILER_PYTHON
let v156 : Async<US4> = null |> unbox<Async<US4>>
v156
#endif
#else
let v157 : Async<US4> option = None
let mutable _v157 = v157
async {
let! v150 = v150
let v158 : US3 = v150
let v164 : US4 =
match v158 with
| US3_0(v159) -> (* Choice1Of2 *)
US4_0(v159)
| US3_1(v161) -> (* Choice2Of2 *)
US4_1(v161)
return v164
}
|> fun x -> _v157 <- Some x
let v165 : Async<US4> = match _v157 with Some x -> x | None -> failwith "async.new_async_unit / _v157=None"
v165
#endif
|> fun x -> _v151 <- Some x
let v166 : Async<US4> = match _v151 with Some x -> x | None -> failwith "base.run_target / _v151=None"
let v167 : bool = true
let mutable _v167 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v168 : Async<US2> = null |> unbox<Async<US2>>
v168
#endif
#if FABLE_COMPILER_RUST && WASM
let v169 : Async<US2> = null |> unbox<Async<US2>>
v169
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v170 : Async<US2> = null |> unbox<Async<US2>>
v170
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v171 : Async<US2> = null |> unbox<Async<US2>>
v171
#endif
#if FABLE_COMPILER_PYTHON
let v172 : Async<US2> = null |> unbox<Async<US2>>
v172
#endif
#else
let v173 : Async<US2> option = None
let mutable _v173 = v173
async {
let! v166 = v166
let v174 : US4 = v166
let v199 : US2 =
match v174 with
| US4_1(v177) -> (* Error *)
let v178 : string = $"%A{v177}"
let v179 : string = "System.TimeoutException"
let v180 : bool = v178.Contains v179
if v180 then
let v181 : US0 = US0_1
let v182 : (unit -> string) = closure12()
let v183 : (unit -> string) = closure13(v54)
method2(v181, v182, v183)
US2_1
else
let v185 : bool = true
let mutable _v185 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v186 : string = $"%A{v177}"
v186
#endif
#if FABLE_COMPILER_RUST && WASM
let v187 : string = $"%A{v177}"
v187
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v188 : string = $"%A{v177}"
v188
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v189 : string = $"%A{v177}"
v189
#endif
#if FABLE_COMPILER_PYTHON
let v190 : string = $"%A{v177}"
v190
#endif
#else
let v191 : string = $"{v177.GetType ()}: {v177.Message}"
v191
#endif
|> fun x -> _v185 <- Some x
let v192 : string = match _v185 with Some x -> x | None -> failwith "base.run_target / _v185=None"
let v193 : US0 = US0_4
let v194 : (unit -> string) = closure14(v192)
let v195 : (unit -> string) = closure13(v54)
method2(v193, v194, v195)
US2_1
| US4_0(v175) -> (* Ok *)
US2_0(v175)
return v199
}
|> fun x -> _v173 <- Some x
let v200 : Async<US2> = match _v173 with Some x -> x | None -> failwith "async.new_async_unit / _v173=None"
v200
#endif
|> fun x -> _v167 <- Some x
let v201 : Async<US2> = match _v167 with Some x -> x | None -> failwith "base.run_target / _v167=None"
return! v201
}
|> fun x -> _v112 <- Some x
let v202 : Async<US2> = match _v112 with Some x -> x | None -> failwith "async.new_async_unit / _v112=None"
v202
#endif
|> fun x -> _v106 <- Some x
let v203 : Async<US2> = match _v106 with Some x -> x | None -> failwith "base.run_target / _v106=None"
v203
#endif
|> fun x -> _v100 <- Some x
let v204 : Async<US2> = match _v100 with Some x -> x | None -> failwith "base.run_target / _v100=None"
let! v204 = v204
let v205 : US2 = v204
let v208 : bool =
match v205 with
| US2_1 -> (* None *)
false
| US2_0(v206) -> (* Some *)
v206
return v208
}
|> fun x -> _v61 <- Some x
let v209 : Async<bool> = match _v61 with Some x -> x | None -> failwith "async.new_async_unit / _v61=None"
v209
#endif
|> fun x -> _v55 <- Some x
let v210 : Async<bool> = match _v55 with Some x -> x | None -> failwith "base.run_target / _v55=None"
v210
let! v212 = v212
let v213 : bool = v212
let v214 : bool = v213 = false
if v214 then
return v2
(*
()
else
*) else
let v215 : int32 = v2 + 1
let v216 : Async<int32> = method6(v0, v1, v215)
return! v216
(*
()
*)
}
|> fun x -> _v9 <- Some x
let v217 : Async<int32> = match _v9 with Some x -> x | None -> failwith "async.new_async_unit / _v9=None"
v217
#endif
|> fun x -> _v3 <- Some x
let v218 : Async<int32> = match _v3 with Some x -> x | None -> failwith "base.run_target / _v3=None"
v218
and closure23 (v0 : int32 option, v1 : string) (v2 : int32) : Async<int32> =
method6(v0, v1, v2)
and closure22 (v0 : int32 option) (v1 : string) : (int32 -> Async<int32>) =
closure23(v0, v1)
and closure21 () (v0 : int32 option) : (string -> (int32 -> Async<int32>)) =
closure22(v0)
let v0 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure0()
let v1 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v0 v1 |> Some
let v2 : (string -> (int32 -> Async<bool>)) = closure2()
let test_port_open x = v2 x
let v3 : (int32 -> (string -> (int32 -> Async<bool>))) = closure7()
let test_port_open_timeout x = v3 x
let v4 : (int32 option -> (bool -> (string -> (int32 -> Async<int64>)))) = closure15()
let wait_for_port_access x = v4 x
let v5 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure21()
let get_available_port x = v5 x
()
00:00:00 debug #1 writeDibCode / output: Fs / path: DirTreeHtml.dib
00:00:00 debug #2 parseDibCode / output: Fs / file: DirTreeHtml.dib
00:00:00 debug #1 persistCodeProject / packages: [Argu; Falco.Markup; FSharp.Control.AsyncSeq; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: DirTreeHtml / hash: / code.Length: 4638
00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj
00:00:00 debug #1 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime linux-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml")
00:00:01 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:01 verbose #3 > Determining projects to restore...
00:00:02 verbose #4 > Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
00:00:03 verbose #5 > The last full restore is still up to date. Nothing left to do.
00:00:03 verbose #6 > Total time taken: 0 milliseconds
00:00:03 verbose #7 > Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
00:00:04 verbose #8 > Restoring C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj
00:00:04 verbose #9 > Starting restore process.
00:00:04 verbose #10 > Total time taken: 0 milliseconds
00:00:05 verbose #11 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 526 ms).
00:00:06 verbose #12 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj]
00:00:19 verbose #13 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\linux-x64\DirTreeHtml.dll
00:00:20 verbose #14 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\
00:00:20 debug #15 execute_with_options_async / exit_code: 0 / output.Length: 1125
00:00:20 debug #16 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime win-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml")
00:00:21 verbose #17 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:21 verbose #18 > Determining projects to restore...
00:00:22 verbose #19 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 482 ms).
00:00:22 verbose #20 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj]
00:00:35 verbose #21 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\win-x64\DirTreeHtml.dll
00:00:40 verbose #22 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\
00:00:40 debug #23 execute_with_options_async / exit_code: 0 / output.Length: 728
In [ ]:
{ pwsh ../lib/spiral/build.ps1 -sequential 1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:01 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path sm'.dib --retries 3",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "sm'.dib", "--retries", "3"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/sm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/sm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:06 verbose #10 > >
00:00:06 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #13 > > │ # sm' │
00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #15 > >
00:00:06 verbose #16 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 verbose #17 > > //// test
00:00:06 verbose #18 > >
00:00:06 verbose #19 > > open testing
00:00:06 verbose #20 > >
00:00:06 verbose #21 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:00:06 verbose #22 > > #r
00:00:06 verbose #23 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #24 > > otNet.Interactive.Spiral.dll"
00:00:06 verbose #25 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:00:06 verbose #26 > > #r
00:00:06 verbose #27 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:06 verbose #28 > > otNet.Interactive.dll"
00:00:06 verbose #29 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:11 verbose #30 > >
00:00:11 verbose #31 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #32 > > open rust_operators
00:00:11 verbose #33 > >
00:00:11 verbose #34 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 verbose #35 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 verbose #36 > > │ ## types │
00:00:11 verbose #37 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 verbose #38 > >
00:00:11 verbose #39 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #40 > > inl types () =
00:00:11 verbose #41 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #42 > > Fable.Core.Emit(\"str\")>]]\n#endif\ntype Str = class end"
00:00:11 verbose #43 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #44 > > Fable.Core.Emit(\"base64::DecodeError\")>]]\n#endif\ntype base64_DecodeError =
00:00:11 verbose #45 > > class end"
00:00:11 verbose #46 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #47 > > Fable.Core.Emit(\"borsh::io::Error\")>]]\n#endif\ntype borsh_io_Error = class
00:00:11 verbose #48 > > end"
00:00:11 verbose #49 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #50 > > Fable.Core.Emit(\"encoding_rs::Encoding\")>]]\n#endif\ntype encoding_rs_Encoding
00:00:11 verbose #51 > > = class end"
00:00:11 verbose #52 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #53 > > Fable.Core.Emit(\"js_sys::JsString\")>]]\n#endif\ntype js_sys_JsString = class
00:00:11 verbose #54 > > end"
00:00:11 verbose #55 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #56 > > Fable.Core.Emit(\"serde_json::Error\")>]]\n#endif\ntype serde_json_Error = class
00:00:11 verbose #57 > > end"
00:00:11 verbose #58 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #59 > > Fable.Core.Emit(\"serde_json::Value\")>]]\n#endif\ntype serde_json_Value = class
00:00:11 verbose #60 > > end"
00:00:11 verbose #61 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #62 > > Fable.Core.Emit(\"serde_wasm_bindgen::Error\")>]]\n#endif\ntype
00:00:11 verbose #63 > > serde_wasm_bindgen_Error = class end"
00:00:11 verbose #64 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #65 > > Fable.Core.Emit(\"std::ffi::OsStr\")>]]\n#endif\ntype std_ffi_OsStr = class end"
00:00:11 verbose #66 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #67 > > Fable.Core.Emit(\"std::ffi::OsString\")>]]\n#endif\ntype std_ffi_OsString =
00:00:11 verbose #68 > > class end"
00:00:11 verbose #69 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #70 > > Fable.Core.Emit(\"std::fmt::Display<$0>\")>]]\n#endif\ntype std_fmt_Display<'T>
00:00:11 verbose #71 > > = class end"
00:00:11 verbose #72 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #73 > > Fable.Core.Emit(\"std::str::Utf8Error\")>]]\n#endif\ntype std_str_Utf8Error =
00:00:11 verbose #74 > > class end"
00:00:11 verbose #75 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #76 > > Fable.Core.Emit(\"std::string::FromUtf8Error\")>]]\n#endif\ntype
00:00:11 verbose #77 > > std_string_FromUtf8Error = class end"
00:00:11 verbose #78 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #79 > > Fable.Core.Emit(\"std::string::String\")>]]\n#endif\ntype std_string_String =
00:00:11 verbose #80 > > class end"
00:00:11 verbose #81 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #82 > > Fable.Core.Emit(\"std::slice::Windows<$0>\")>]]\n#endif\ntype
00:00:11 verbose #83 > > std_slice_Windows<'T> = class end"
00:00:11 verbose #84 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #85 > > Fable.Core.Emit(\"regex::Regex\")>]]\n#endif\ntype regex_Regex = class end"
00:00:11 verbose #86 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #87 > > Fable.Core.Emit(\"regex::Captures\")>]]\n#endif\ntype regex_Captures = class
00:00:11 verbose #88 > > end"
00:00:11 verbose #89 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #90 > > Fable.Core.Emit(\"regex::CaptureMatches\")>]]\n#endif\ntype regex_CaptureMatches
00:00:11 verbose #91 > > = class end"
00:00:11 verbose #92 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:11 verbose #93 > > Fable.Core.Emit(\"regex::Error\")>]]\n#endif\ntype regex_Error = class end"
00:00:11 verbose #94 > >
00:00:11 verbose #95 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #96 > > inl types () =
00:00:11 verbose #97 > > rust.types ()
00:00:11 verbose #98 > > mapm.types ()
00:00:11 verbose #99 > > types ()
00:00:11 verbose #100 > >
00:00:11 verbose #101 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #102 > > nominal display t = $'std_fmt_Display<`t>'
00:00:11 verbose #103 > > nominal str = $'Str'
00:00:11 verbose #104 > > nominal base64_decode_error = $'base64_DecodeError'
00:00:11 verbose #105 > > nominal borsh_io_error = $'borsh_io_Error'
00:00:11 verbose #106 > > nominal utf8_error = $'std_str_Utf8Error'
00:00:11 verbose #107 > > nominal from_utf8_error = $'std_string_FromUtf8Error'
00:00:11 verbose #108 > > nominal json_value = $'serde_json_Value'
00:00:11 verbose #109 > > nominal json_error = $'serde_json_Error'
00:00:11 verbose #110 > > nominal serde_wasm_bindgen_error = $'serde_wasm_bindgen_Error'
00:00:11 verbose #111 > > nominal js_string = $'js_sys_JsString'
00:00:11 verbose #112 > > nominal os_str = $'std_ffi_OsStr'
00:00:11 verbose #113 > > nominal os_string = $'std_ffi_OsString'
00:00:11 verbose #114 > > nominal std_string = $'std_string_String'
00:00:11 verbose #115 > >
00:00:11 verbose #116 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 verbose #117 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 verbose #118 > > │ ## contains │
00:00:11 verbose #119 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 verbose #120 > >
00:00:11 verbose #121 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #122 > > inl contains (value : string) (s : string) : bool =
00:00:11 verbose #123 > > $'!s.Contains !value '
00:00:11 verbose #124 > >
00:00:11 verbose #125 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 verbose #126 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 verbose #127 > > │ ## ends_with │
00:00:11 verbose #128 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 verbose #129 > >
00:00:11 verbose #130 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #131 > > inl ends_with (value : string) (s : string) : bool =
00:00:11 verbose #132 > > $'!s.EndsWith !value '
00:00:11 verbose #133 > >
00:00:11 verbose #134 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 verbose #135 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 verbose #136 > > │ ## last_index_of │
00:00:11 verbose #137 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 verbose #138 > >
00:00:11 verbose #139 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #140 > > inl last_index_of (search : string) (s : string) : i32 =
00:00:11 verbose #141 > > $'!s.LastIndexOf !search '
00:00:11 verbose #142 > >
00:00:11 verbose #143 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 verbose #144 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 verbose #145 > > │ ## pad_left │
00:00:11 verbose #146 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 verbose #147 > >
00:00:11 verbose #148 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #149 > > inl pad_left (total_width : i32) (padding_char : char) (s : string) : string =
00:00:11 verbose #150 > > $'!s.PadLeft (!total_width, !padding_char)'
00:00:11 verbose #151 > >
00:00:11 verbose #152 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 verbose #153 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 verbose #154 > > │ ## pad_right │
00:00:11 verbose #155 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 verbose #156 > >
00:00:11 verbose #157 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #158 > > inl pad_right (total_width : i32) (padding_char : char) (s : string) : string =
00:00:11 verbose #159 > > $'!s.PadRight (!total_width, !padding_char)'
00:00:11 verbose #160 > >
00:00:11 verbose #161 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 verbose #162 > > //// test
00:00:11 verbose #163 > >
00:00:11 verbose #164 > > "123"
00:00:11 verbose #165 > > |> pad_right 6 ' '
00:00:11 verbose #166 > > |> _assert_eq "123 "
00:00:12 verbose #167 > >
00:00:12 verbose #168 > > ╭─[ 857.01ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 verbose #169 > > │ assert_eq / actual: "123 " / expected: "123 " │
00:00:12 verbose #170 > > │ │
00:00:12 verbose #171 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #172 > >
00:00:12 verbose #173 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #174 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #175 > > │ ## starts_with │
00:00:12 verbose #176 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #177 > >
00:00:12 verbose #178 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #179 > > inl starts_with (value : string) (s : string) : bool =
00:00:12 verbose #180 > > $'!s.StartsWith !value '
00:00:12 verbose #181 > >
00:00:12 verbose #182 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #183 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #184 > > │ ## substring │
00:00:12 verbose #185 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #186 > >
00:00:12 verbose #187 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #188 > > inl substring (start : i32) (len : i32) (str : string) : string =
00:00:12 verbose #189 > > $'!str.Substring (!start, !len)'
00:00:12 verbose #190 > >
00:00:12 verbose #191 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #192 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #193 > > │ ## to_lower │
00:00:12 verbose #194 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #195 > >
00:00:12 verbose #196 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #197 > > inl to_lower (input : string) : string =
00:00:12 verbose #198 > > $'!input.ToLower' ()
00:00:12 verbose #199 > >
00:00:12 verbose #200 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #201 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #202 > > │ ## to_upper │
00:00:12 verbose #203 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #204 > >
00:00:12 verbose #205 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #206 > > inl to_upper (input : string) : string =
00:00:12 verbose #207 > > $'!input.ToUpper' ()
00:00:12 verbose #208 > >
00:00:12 verbose #209 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #210 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #211 > > │ ## trim │
00:00:12 verbose #212 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #213 > >
00:00:12 verbose #214 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #215 > > inl trim (input : string) : string =
00:00:12 verbose #216 > > $'!input.Trim' ()
00:00:12 verbose #217 > >
00:00:12 verbose #218 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #219 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #220 > > │ ## trim_end │
00:00:12 verbose #221 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #222 > >
00:00:12 verbose #223 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #224 > > inl trim_end (trim_chars : array_base char) (input : string) : string =
00:00:12 verbose #225 > > $'!input.TrimEnd !trim_chars '
00:00:12 verbose #226 > >
00:00:12 verbose #227 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #228 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #229 > > │ ## trim_start │
00:00:12 verbose #230 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #231 > >
00:00:12 verbose #232 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #233 > > inl trim_start (trim_chars : array_base char) (input : string) : string =
00:00:12 verbose #234 > > $'!input.TrimStart !trim_chars '
00:00:12 verbose #235 > >
00:00:12 verbose #236 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #237 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #238 > > │ ## length │
00:00:12 verbose #239 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #240 > >
00:00:12 verbose #241 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #242 > > inl length forall dim {int}. (input : string) : dim =
00:00:12 verbose #243 > > input |> sm.length
00:00:12 verbose #244 > >
00:00:12 verbose #245 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #246 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #247 > > │ ## length' │
00:00:12 verbose #248 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #249 > >
00:00:12 verbose #250 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #251 > > inl length' forall dim. (input : string) : dim =
00:00:12 verbose #252 > > input |> $'String.length'
00:00:12 verbose #253 > >
00:00:12 verbose #254 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #255 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #256 > > │ ## is_empty │
00:00:12 verbose #257 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #258 > >
00:00:12 verbose #259 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #260 > > inl is_empty (input : string) : bool =
00:00:12 verbose #261 > > length input = 0i32
00:00:12 verbose #262 > >
00:00:12 verbose #263 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #264 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #265 > > │ ## slice │
00:00:12 verbose #266 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #267 > >
00:00:12 verbose #268 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #269 > > inl slice from to s : string =
00:00:12 verbose #270 > > sm.slice s { from to }
00:00:12 verbose #271 > >
00:00:12 verbose #272 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #273 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #274 > > │ ## range │
00:00:12 verbose #275 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #276 > >
00:00:12 verbose #277 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #278 > > inl range forall t. (start : am'.range t) (end : am'.range t) s =
00:00:12 verbose #279 > > inl start, end =
00:00:12 verbose #280 > > match start, end with
00:00:12 verbose #281 > > | Start start, End fn =>
00:00:12 verbose #282 > > start, s |> length' |> fn
00:00:12 verbose #283 > > | End start_fn, End end_fn =>
00:00:12 verbose #284 > > inl len = s |> length'
00:00:12 verbose #285 > > start_fn len, end_fn len
00:00:12 verbose #286 > > s |> slice (start |> u64) (end |> u64)
00:00:12 verbose #287 > >
00:00:12 verbose #288 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #289 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #290 > > │ ## raw_string_literal │
00:00:12 verbose #291 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #292 > >
00:00:12 verbose #293 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #294 > > inl raw_string_literal (s : string) : rust.ref' str =
00:00:12 verbose #295 > > !\($'"r#\\"" + !s + "\\"#"')
00:00:12 verbose #296 > >
00:00:12 verbose #297 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #298 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #299 > > │ ## raw_string_literal_static │
00:00:12 verbose #300 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #301 > >
00:00:12 verbose #302 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #303 > > inl raw_string_literal_static (s : string) : rust.static_ref' str =
00:00:12 verbose #304 > > !\($'"r#\\"" + !s + "\\"#"')
00:00:12 verbose #305 > >
00:00:12 verbose #306 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #307 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #308 > > │ ## (~#) │
00:00:12 verbose #309 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #310 > >
00:00:12 verbose #311 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #312 > > inl (~#) s =
00:00:12 verbose #313 > > s |> raw_string_literal
00:00:12 verbose #314 > >
00:00:12 verbose #315 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #316 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #317 > > │ ## (~##) │
00:00:12 verbose #318 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #319 > >
00:00:12 verbose #320 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #321 > > inl (~##) s =
00:00:12 verbose #322 > > s |> raw_string_literal_static
00:00:12 verbose #323 > >
00:00:12 verbose #324 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #325 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #326 > > │ ## include_str │
00:00:12 verbose #327 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #328 > >
00:00:12 verbose #329 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #330 > > inl include_str (path : string) : rust.ref' str =
00:00:12 verbose #331 > > !\($'"include_str\!(\\\"" + !path + "\\\")"')
00:00:12 verbose #332 > >
00:00:12 verbose #333 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #334 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #335 > > │ ## as_str │
00:00:12 verbose #336 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #337 > >
00:00:12 verbose #338 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #339 > > inl as_str (s : string) : rust.ref' str =
00:00:12 verbose #340 > > // !\\(s, $'"fable_library_rust::String_::LrcStr::as_str(&$0)"')
00:00:12 verbose #341 > > !\\(s, $'"&*$0"')
00:00:12 verbose #342 > >
00:00:12 verbose #343 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #344 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #345 > > │ ## from_std_string │
00:00:12 verbose #346 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #347 > >
00:00:12 verbose #348 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #349 > > inl from_std_string (str : std_string) : string =
00:00:12 verbose #350 > > !\\(str, $'"fable_library_rust::String_::fromString($0)"')
00:00:12 verbose #351 > >
00:00:12 verbose #352 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #353 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #354 > > │ ## ref_to_std_string │
00:00:12 verbose #355 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #356 > >
00:00:12 verbose #357 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #358 > > inl ref_to_std_string (str : rust.ref' str) : std_string =
00:00:12 verbose #359 > > !\\(str, $'"String::from($0)"')
00:00:12 verbose #360 > >
00:00:12 verbose #361 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #362 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #363 > > │ ## cow_to_std_string │
00:00:12 verbose #364 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #365 > >
00:00:12 verbose #366 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #367 > > inl cow_to_std_string (str : rust.cow str) : std_string =
00:00:12 verbose #368 > > !\\(str, $'"String::from($0)"')
00:00:12 verbose #369 > >
00:00:12 verbose #370 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #371 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #372 > > │ ## to_std_string │
00:00:12 verbose #373 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #374 > >
00:00:12 verbose #375 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #376 > > inl to_std_string (s : string) : std_string =
00:00:12 verbose #377 > > s |> as_str |> ref_to_std_string
00:00:12 verbose #378 > >
00:00:12 verbose #379 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #380 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #381 > > │ ## as_str_std │
00:00:12 verbose #382 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #383 > >
00:00:12 verbose #384 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #385 > > inl as_str_std (s : std_string) : rust.ref' str =
00:00:12 verbose #386 > > !\\(s, $'"$0.as_str()"')
00:00:12 verbose #387 > >
00:00:13 verbose #388 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #389 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #390 > > │ ## into_boxed_str │
00:00:13 verbose #391 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #392 > >
00:00:13 verbose #393 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #394 > > inl into_boxed_str (s : std_string) : rust.box str =
00:00:13 verbose #395 > > !\\(s, $'"$0.into_boxed_str()"')
00:00:13 verbose #396 > >
00:00:13 verbose #397 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #398 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #399 > > │ ## os_string_as_ref │
00:00:13 verbose #400 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #401 > >
00:00:13 verbose #402 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #403 > > inl os_string_as_ref (s : os_string) : rust.ref' os_str =
00:00:13 verbose #404 > > !\\(s, $'"$0.as_ref()"')
00:00:13 verbose #405 > >
00:00:13 verbose #406 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #407 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #408 > > │ ## to_os_string │
00:00:13 verbose #409 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #410 > >
00:00:13 verbose #411 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #412 > > inl to_os_string (s : rust.ref' os_str) : os_string =
00:00:13 verbose #413 > > !\\(s, $'"$0.to_os_string()"')
00:00:13 verbose #414 > >
00:00:13 verbose #415 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #416 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #417 > > │ ## os_to_str │
00:00:13 verbose #418 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #419 > >
00:00:13 verbose #420 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #421 > > inl os_to_str (s : os_string) : optionm'.option' (rust.ref' str) =
00:00:13 verbose #422 > > !\\(s, $'"$0.to_str()"')
00:00:13 verbose #423 > >
00:00:13 verbose #424 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #425 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #426 > > │ ## from_os_str_ref │
00:00:13 verbose #427 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #428 > >
00:00:13 verbose #429 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #430 > > inl from_os_str_ref s =
00:00:13 verbose #431 > > s
00:00:13 verbose #432 > > |> to_os_string
00:00:13 verbose #433 > > |> os_to_str
00:00:13 verbose #434 > > |> optionm'.unwrap
00:00:13 verbose #435 > > |> ref_to_std_string
00:00:13 verbose #436 > > |> from_std_string
00:00:13 verbose #437 > >
00:00:13 verbose #438 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #439 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #440 > > │ ## obj_to_string │
00:00:13 verbose #441 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #442 > >
00:00:13 verbose #443 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #444 > > inl obj_to_string x : string =
00:00:13 verbose #445 > > x |> $'_.ToString()'
00:00:13 verbose #446 > >
00:00:13 verbose #447 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #448 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #449 > > │ ## to_string any │
00:00:13 verbose #450 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #451 > >
00:00:13 verbose #452 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #453 > > instance to_string any =
00:00:13 verbose #454 > > obj_to_string
00:00:13 verbose #455 > >
00:00:13 verbose #456 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #457 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #458 > > │ ## to_string result t u │
00:00:13 verbose #459 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #460 > >
00:00:13 verbose #461 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #462 > > instance to_string result t u = fun x =>
00:00:13 verbose #463 > > real
00:00:13 verbose #464 > > open rust
00:00:13 verbose #465 > > typecase (t * u) with
00:00:13 verbose #466 > > | string * string =>
00:00:13 verbose #467 > > match x with
00:00:13 verbose #468 > > | Ok x => x
00:00:13 verbose #469 > > | Error x => $'"sm\'.to_string result / Error: " + !x + ""' : string
00:00:13 verbose #470 > > | std_string * std_string =>
00:00:13 verbose #471 > > match x with
00:00:13 verbose #472 > > | Ok x => from_std_string x
00:00:13 verbose #473 > > | Error x => $'"sm\'.to_string result / Error: " + string !x + ""' :
00:00:13 verbose #474 > > string
00:00:13 verbose #475 > > | _ => obj_to_string `u x
00:00:13 verbose #476 > >
00:00:13 verbose #477 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #478 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #479 > > │ ## format_debug │
00:00:13 verbose #480 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #481 > >
00:00:13 verbose #482 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #483 > > inl format_debug x : string =
00:00:13 verbose #484 > > $'$"%A{!x}"'
00:00:13 verbose #485 > >
00:00:13 verbose #486 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #487 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #488 > > │ ## format_custom' │
00:00:13 verbose #489 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #490 > >
00:00:13 verbose #491 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #492 > > inl format_custom' format x : std_string =
00:00:13 verbose #493 > > !\\(x, $'"format\!(\\\"" + !format + "\\\", $0)"')
00:00:13 verbose #494 > >
00:00:13 verbose #495 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #496 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #497 > > │ ## format' │
00:00:13 verbose #498 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #499 > >
00:00:13 verbose #500 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #501 > > inl format' x : std_string =
00:00:13 verbose #502 > > run_target function
00:00:13 verbose #503 > > | Rust _ => fun () =>
00:00:13 verbose #504 > > !\\(x, $'"format\!(\\\"{}\\\", $0)"')
00:00:13 verbose #505 > > | _ => fun () => null ()
00:00:13 verbose #506 > >
00:00:13 verbose #507 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #508 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #509 > > │ ## format_debug' │
00:00:13 verbose #510 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #511 > >
00:00:13 verbose #512 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #513 > > inl format_debug' x : std_string =
00:00:13 verbose #514 > > run_target function
00:00:13 verbose #515 > > | Rust _ => fun () =>
00:00:13 verbose #516 > > !\\(x, $'"format\!(\\\"{:?}\\\", $0)"')
00:00:13 verbose #517 > > | _ => fun () => null ()
00:00:13 verbose #518 > >
00:00:13 verbose #519 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #520 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #521 > > │ ## format_pretty' │
00:00:13 verbose #522 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #523 > >
00:00:13 verbose #524 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #525 > > inl format_pretty' x : std_string =
00:00:13 verbose #526 > > run_target function
00:00:13 verbose #527 > > | Rust _ => fun () =>
00:00:13 verbose #528 > > !\\(x, $'"format\!(\\\"{:#?}\\\", $0)"')
00:00:13 verbose #529 > > | _ => fun () => null ()
00:00:13 verbose #530 > >
00:00:13 verbose #531 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #532 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #533 > > │ ## format_hex' │
00:00:13 verbose #534 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #535 > >
00:00:13 verbose #536 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #537 > > inl format_hex' x : std_string =
00:00:13 verbose #538 > > run_target function
00:00:13 verbose #539 > > | Rust _ => fun () =>
00:00:13 verbose #540 > > !\\(x, $'"format\!(\\\"{:x}\\\", $0)"')
00:00:13 verbose #541 > > | _ => fun () => null ()
00:00:13 verbose #542 > >
00:00:13 verbose #543 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #544 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #545 > > │ ## format'' │
00:00:13 verbose #546 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #547 > >
00:00:13 verbose #548 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #549 > > inl format'' (format : string) : std_string =
00:00:13 verbose #550 > > !\($'@@$"format\!(" + !format + ")"')
00:00:13 verbose #551 > >
00:00:13 verbose #552 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #553 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #554 > > │ ## format_exception │
00:00:13 verbose #555 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #556 > >
00:00:13 verbose #557 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #558 > > inl format_exception (ex : exn) : string =
00:00:13 verbose #559 > > run_target function
00:00:13 verbose #560 > > | Fsharp (Native) => fun () => $'$"{!ex.GetType ()}: {!ex.Message}"'
00:00:13 verbose #561 > > | _ => fun () => ex |> format_debug
00:00:13 verbose #562 > >
00:00:13 verbose #563 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #564 > > //// test
00:00:13 verbose #565 > >
00:00:13 verbose #566 > > fun () => failwith "test"
00:00:13 verbose #567 > > |> _throws
00:00:13 verbose #568 > > |> optionm.map sm'.format_exception
00:00:13 verbose #569 > > |> _assert_eq (Some "System.Exception: test")
00:00:14 verbose #570 > >
00:00:14 verbose #571 > > ╭─[ 669.65ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 verbose #572 > > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │
00:00:14 verbose #573 > > │ "System.Exception: test" │
00:00:14 verbose #574 > > │ │
00:00:14 verbose #575 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #576 > >
00:00:14 verbose #577 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #578 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #579 > > │ ## replace │
00:00:14 verbose #580 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #581 > >
00:00:14 verbose #582 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #583 > > inl replace (old_value : string) (new_value : string) (s : string) : string =
00:00:14 verbose #584 > > $'!s.Replace (!old_value, !new_value)'
00:00:14 verbose #585 > >
00:00:14 verbose #586 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #587 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #588 > > │ ## regex │
00:00:14 verbose #589 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #590 > >
00:00:14 verbose #591 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #592 > > nominal regex = $'regex_Regex'
00:00:14 verbose #593 > >
00:00:14 verbose #594 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #595 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #596 > > │ ## regex_error │
00:00:14 verbose #597 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #598 > >
00:00:14 verbose #599 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #600 > > nominal regex_error = $'regex_Error'
00:00:14 verbose #601 > >
00:00:14 verbose #602 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #603 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #604 > > │ ## new_regex │
00:00:14 verbose #605 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #606 > >
00:00:14 verbose #607 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #608 > > inl new_regex (pattern : string) : resultm.result' regex regex_error =
00:00:14 verbose #609 > > run_target function
00:00:14 verbose #610 > > | Rust (Native) => fun () =>
00:00:14 verbose #611 > > inl pattern = join pattern
00:00:14 verbose #612 > > !\\(pattern, $'$"regex::Regex::new(&$0)"')
00:00:14 verbose #613 > > | _ => fun () => null ()
00:00:14 verbose #614 > >
00:00:14 verbose #615 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #616 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #617 > > │ ## captures │
00:00:14 verbose #618 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #619 > >
00:00:14 verbose #620 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #621 > > nominal regex_captures = $'regex_Captures'
00:00:14 verbose #622 > >
00:00:14 verbose #623 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #624 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #625 > > │ ## regex_capture_matches │
00:00:14 verbose #626 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #627 > >
00:00:14 verbose #628 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #629 > > nominal regex_capture_matches = $'regex_CaptureMatches'
00:00:14 verbose #630 > >
00:00:14 verbose #631 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #632 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #633 > > │ ## regex_captures │
00:00:14 verbose #634 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #635 > >
00:00:14 verbose #636 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #637 > > inl regex_captures (s : string) (regex : regex) : am'.vec (mapm.hash_map
00:00:14 verbose #638 > > (rust.ref' str) (rust.ref' str)) =
00:00:14 verbose #639 > > inl s = join s
00:00:14 verbose #640 > > !\\(regex, $'$"$0.captures_iter(&*!s).map(|caps| $0.capture_names().map(|x|
00:00:14 verbose #641 > > x.and_then(|n| Some((n,
00:00:14 verbose #642 > > caps.name(n)?.as_str())))).flatten().collect()).collect()"')
00:00:14 verbose #643 > >
00:00:14 verbose #644 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #645 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #646 > > │ ## replace_regex │
00:00:14 verbose #647 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #648 > >
00:00:14 verbose #649 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #650 > > inl replace_regex (pattern : string) (replacement : string) (s : string) :
00:00:14 verbose #651 > > string =
00:00:14 verbose #652 > > run_target function
00:00:14 verbose #653 > > | Fsharp (Native) => fun () =>
00:00:14 verbose #654 > > inl replacement = join replacement
00:00:14 verbose #655 > > $'System.Text.RegularExpressions.Regex.Replace (!s, !pattern,
00:00:14 verbose #656 > > !replacement)'
00:00:14 verbose #657 > > | Rust (Native) => fun () =>
00:00:14 verbose #658 > > inl s = join s
00:00:14 verbose #659 > > inl replacement = join replacement
00:00:14 verbose #660 > > inl regex = pattern |> new_regex |> resultm.unwrap'
00:00:14 verbose #661 > > !\\((regex, s, replacement), $'$"$0.replace_all(&$1, &*$2)"')
00:00:14 verbose #662 > > |> cow_to_std_string
00:00:14 verbose #663 > > |> from_std_string
00:00:14 verbose #664 > > | _ => fun () => null ()
00:00:14 verbose #665 > >
00:00:14 verbose #666 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #667 > > //// test
00:00:14 verbose #668 > >
00:00:14 verbose #669 > > " 123"
00:00:14 verbose #670 > > |> replace_regex "\\s\\w2" ""
00:00:14 verbose #671 > > |> _assert_eq "3"
00:00:14 verbose #672 > >
00:00:14 verbose #673 > > ╭─[ 73.17ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:14 verbose #674 > > │ assert_eq / actual: "3" / expected: "3" │
00:00:14 verbose #675 > > │ │
00:00:14 verbose #676 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #677 > >
00:00:14 verbose #678 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #679 > > //// test
00:00:14 verbose #680 > > ///! rust -d regex
00:00:14 verbose #681 > >
00:00:14 verbose #682 > > types ()
00:00:14 verbose #683 > > " 123"
00:00:14 verbose #684 > > |> replace_regex "\\s\\w2" ""
00:00:14 verbose #685 > > |> _assert_eq "3"
00:00:21 verbose #686 > >
00:00:21 verbose #687 > > ╭─[ 6.74s - return value ]─────────────────────────────────────────────────────╮
00:00:21 verbose #688 > > │ assert_eq / actual: "3" / expected: "3" │
00:00:21 verbose #689 > > │ │
00:00:21 verbose #690 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #691 > >
00:00:21 verbose #692 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #693 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #694 > > │ ## serialize │
00:00:21 verbose #695 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #696 > >
00:00:21 verbose #697 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #698 > > inl serialize forall t. (x : t) : resultm.result' std_string json_error =
00:00:21 verbose #699 > > !\($'"serde_json::to_string(&!x)"')
00:00:21 verbose #700 > >
00:00:21 verbose #701 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #702 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #703 > > │ ## deserialize │
00:00:21 verbose #704 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #705 > >
00:00:21 verbose #706 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #707 > > inl deserialize forall t. (json : string) : resultm.result' t std_string =
00:00:21 verbose #708 > > inl json = join json
00:00:21 verbose #709 > > inl json = json |> as_str
00:00:21 verbose #710 > > !\($'"serde_json::from_str(&!json)"')
00:00:21 verbose #711 > > |> resultm.map_error' fun (x : json_error) => x |> format'
00:00:21 verbose #712 > >
00:00:21 verbose #713 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #714 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #715 > > │ ## borsh_deserialize │
00:00:21 verbose #716 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #717 > >
00:00:21 verbose #718 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #719 > > inl borsh_deserialize forall t. (data : array_base u8) : resultm.result' t
00:00:21 verbose #720 > > std_string =
00:00:21 verbose #721 > > inl data = data |> am'.as_slice
00:00:21 verbose #722 > > (!\($'"true; let mut !data = !data"') : bool) |> ignore
00:00:21 verbose #723 > > inl result = !\($'"borsh::BorshDeserialize::deserialize(&mut !data)"')
00:00:21 verbose #724 > > result
00:00:21 verbose #725 > > |> resultm.map_error' fun (x : borsh_io_error) => x |> format'
00:00:21 verbose #726 > >
00:00:21 verbose #727 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #728 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #729 > > │ ## deserialize_vec │
00:00:21 verbose #730 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #731 > >
00:00:21 verbose #732 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #733 > > inl deserialize_vec (value : json_value) : resultm.result' (am'.vec u8)
00:00:21 verbose #734 > > std_string =
00:00:21 verbose #735 > > inl value = join value
00:00:21 verbose #736 > > !\($'"serde_json::from_value(!value)"')
00:00:21 verbose #737 > > |> resultm.map_error' fun (x : json_error) => x |> format'
00:00:21 verbose #738 > >
00:00:21 verbose #739 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #740 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #741 > > │ ## encode_uri_component │
00:00:21 verbose #742 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #743 > >
00:00:21 verbose #744 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #745 > > inl encode_uri_component (s : std_string) : js_string =
00:00:21 verbose #746 > > !\($'"js_sys::encode_uri_component(&!s)"')
00:00:21 verbose #747 > >
00:00:21 verbose #748 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #749 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #750 > > │ ## strip_prefix │
00:00:21 verbose #751 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #752 > >
00:00:21 verbose #753 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #754 > > inl strip_prefix (prefix : char) (s : std_string) : optionm'.option' (rust.ref'
00:00:21 verbose #755 > > str) =
00:00:21 verbose #756 > > inl s = join s
00:00:21 verbose #757 > > !\($'"!s.strip_prefix(!prefix)"')
00:00:21 verbose #758 > >
00:00:21 verbose #759 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #760 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #761 > > │ ## str_from_utf8 │
00:00:21 verbose #762 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #763 > >
00:00:21 verbose #764 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #765 > > inl str_from_utf8 (bytes : rust.ref' (am'.slice u8)) : resultm.result'
00:00:21 verbose #766 > > (rust.ref' str) utf8_error =
00:00:21 verbose #767 > > !\($'"std::str::from_utf8(!bytes)"')
00:00:21 verbose #768 > >
00:00:21 verbose #769 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #770 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #771 > > │ ## string_from_utf8 │
00:00:21 verbose #772 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #773 > >
00:00:21 verbose #774 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #775 > > inl string_from_utf8 (bytes : am'.vec u8) : resultm.result' std_string
00:00:21 verbose #776 > > from_utf8_error =
00:00:21 verbose #777 > > !\($'"std::string::String::from_utf8(!bytes)"')
00:00:21 verbose #778 > >
00:00:21 verbose #779 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #780 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #781 > > │ ## base64_decode │
00:00:21 verbose #782 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #783 > >
00:00:21 verbose #784 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #785 > > inl base64_decode (s : std_string) : result std_string std_string =
00:00:21 verbose #786 > > fun () =>
00:00:21 verbose #787 > > inl s = join s
00:00:21 verbose #788 > > inl bytes : resultm.result' (am'.vec u8) base64_decode_error =
00:00:21 verbose #789 > >
00:00:21 verbose #790 > > !\($'"base64::Engine::decode(&base64::engine::general_purpose::STANDARD, !s)"')
00:00:21 verbose #791 > > bytes
00:00:21 verbose #792 > > |> resultm.map_error' format'
00:00:21 verbose #793 > > |> resultm.try'
00:00:21 verbose #794 > > |> string_from_utf8
00:00:21 verbose #795 > > |> resultm.map_error' format'
00:00:21 verbose #796 > > |> fun x =>
00:00:21 verbose #797 > > join x ()
00:00:21 verbose #798 > > |> resultm.unbox
00:00:21 verbose #799 > >
00:00:21 verbose #800 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #801 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #802 > > │ ## encoding' │
00:00:21 verbose #803 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #804 > >
00:00:21 verbose #805 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #806 > > nominal encoding' = $'encoding_rs_Encoding'
00:00:21 verbose #807 > >
00:00:21 verbose #808 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #809 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #810 > > │ ## encoding_utf8' │
00:00:21 verbose #811 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #812 > >
00:00:21 verbose #813 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #814 > > inl encoding_utf8' () : rust.ref' encoding' =
00:00:21 verbose #815 > > !\($'"encoding_rs::UTF_8"')
00:00:21 verbose #816 > >
00:00:21 verbose #817 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #818 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #819 > > │ ## encoding_1252 │
00:00:21 verbose #820 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #821 > >
00:00:21 verbose #822 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #823 > > inl encoding_1252' () : rust.ref' encoding' =
00:00:21 verbose #824 > > !\($'"encoding_rs::WINDOWS_1252"')
00:00:21 verbose #825 > >
00:00:21 verbose #826 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #827 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #828 > > │ ## encoding_encode │
00:00:21 verbose #829 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #830 > >
00:00:21 verbose #831 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #832 > > inl encoding_encode' (encoding : rust.ref' encoding') (text : string) : rust.cow
00:00:21 verbose #833 > > (am'.slice u8) =
00:00:21 verbose #834 > > !\\((encoding, text), $'"$0.encode(&*$1).0"')
00:00:21 verbose #835 > >
00:00:21 verbose #836 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #837 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #838 > > │ ## write_all_text │
00:00:21 verbose #839 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #840 > >
00:00:21 verbose #841 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #842 > > inl write_all_text (path : string) (text : string) : () =
00:00:21 verbose #843 > > run_target function
00:00:21 verbose #844 > > | Fsharp (Native) => fun () =>
00:00:21 verbose #845 > > inl text = join text
00:00:21 verbose #846 > > $'System.IO.File.WriteAllText (!path, !text)'
00:00:21 verbose #847 > > | Rust (Native) => fun () =>
00:00:21 verbose #848 > > open rust_operators
00:00:21 verbose #849 > > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"')
00:00:21 verbose #850 > > | _ => fun () => null ()
00:00:21 verbose #851 > >
00:00:21 verbose #852 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #853 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #854 > > │ ## utf8_decode │
00:00:21 verbose #855 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #856 > >
00:00:21 verbose #857 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #858 > > inl utf8_decode (data : am'.vec u8) : resultm.result' std_string (rust.cow str)
00:00:21 verbose #859 > > =
00:00:21 verbose #860 > > !\($'$"encoding::Encoding::decode(encoding::all::UTF_8, &!data,
00:00:21 verbose #861 > > encoding::DecoderTrap::Replace)"')
00:00:21 verbose #862 > >
00:00:21 verbose #863 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #864 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #865 > > │ ## concat_array_trailing │
00:00:21 verbose #866 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #867 > >
00:00:21 verbose #868 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #869 > > inl concat_array_trailing (separator : string) (input : a i32 string) =
00:00:21 verbose #870 > > ("", input)
00:00:21 verbose #871 > > ||> am.fold fun acc (x : string) =>
00:00:21 verbose #872 > > $'!acc + !x + !separator + ""'
00:00:21 verbose #873 > >
00:00:21 verbose #874 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #875 > > //// test
00:00:21 verbose #876 > > ///! rust
00:00:21 verbose #877 > >
00:00:21 verbose #878 > > ;[[
00:00:21 verbose #879 > > "1"
00:00:21 verbose #880 > > "2"
00:00:21 verbose #881 > > "3"
00:00:21 verbose #882 > > ]]
00:00:21 verbose #883 > > |> fun x =>
00:00:21 verbose #884 > > inl code = (a x : _ i32 _) |> concat_array_trailing "\n"
00:00:21 verbose #885 > > code
00:00:21 verbose #886 > > |> _assert_eq "1\n2\n3\n"
00:00:26 verbose #887 > >
00:00:26 verbose #888 > > ╭─[ 4.71s - return value ]─────────────────────────────────────────────────────╮
00:00:26 verbose #889 > > │ assert_eq / actual: "1 │
00:00:26 verbose #890 > > │ 2 │
00:00:26 verbose #891 > > │ 3 │
00:00:26 verbose #892 > > │ " / expected: "1 │
00:00:26 verbose #893 > > │ 2 │
00:00:26 verbose #894 > > │ 3 │
00:00:26 verbose #895 > > │ " │
00:00:26 verbose #896 > > │ │
00:00:26 verbose #897 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 verbose #898 > >
00:00:26 verbose #899 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:26 verbose #900 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:26 verbose #901 > > │ ## concat_list_trailing │
00:00:26 verbose #902 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 verbose #903 > >
00:00:26 verbose #904 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:26 verbose #905 > > inl concat_list_trailing separator input =
00:00:26 verbose #906 > > ("", input)
00:00:26 verbose #907 > > ||> listm.fold fun acc (x : string) =>
00:00:26 verbose #908 > > $'!acc + !x + !separator + ""'
00:00:26 verbose #909 > >
00:00:26 verbose #910 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:26 verbose #911 > > //// test
00:00:26 verbose #912 > > ///! rust
00:00:26 verbose #913 > >
00:00:26 verbose #914 > > [[
00:00:26 verbose #915 > > "1"
00:00:26 verbose #916 > > "2"
00:00:26 verbose #917 > > "3"
00:00:26 verbose #918 > > ]]
00:00:26 verbose #919 > > |> fun x =>
00:00:26 verbose #920 > > inl code = (x : _) |> concat_list_trailing "\n"
00:00:26 verbose #921 > > code
00:00:26 verbose #922 > > |> _assert_eq "1\n2\n3\n"
00:00:30 verbose #923 > >
00:00:30 verbose #924 > > ╭─[ 4.56s - return value ]─────────────────────────────────────────────────────╮
00:00:30 verbose #925 > > │ assert_eq / actual: "1 │
00:00:30 verbose #926 > > │ 2 │
00:00:30 verbose #927 > > │ 3 │
00:00:30 verbose #928 > > │ " / expected: "1 │
00:00:30 verbose #929 > > │ 2 │
00:00:30 verbose #930 > > │ 3 │
00:00:30 verbose #931 > > │ " │
00:00:30 verbose #932 > > │ │
00:00:30 verbose #933 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 verbose #934 > >
00:00:30 verbose #935 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:30 verbose #936 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:30 verbose #937 > > │ ## concat_list_heap_trailing │
00:00:30 verbose #938 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 verbose #939 > >
00:00:30 verbose #940 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:30 verbose #941 > > inl concat_list_heap_trailing separator input =
00:00:30 verbose #942 > > inl separator = join separator
00:00:30 verbose #943 > > inl separator = separator |> as_str
00:00:30 verbose #944 > > ("", input)
00:00:30 verbose #945 > > ||> listm.fold fun acc (x : string) =>
00:00:30 verbose #946 > > inl acc = acc |> to_std_string
00:00:30 verbose #947 > > inl x = x |> as_str
00:00:30 verbose #948 > > $'$"{!acc}{!x}{!separator}"'
00:00:30 verbose #949 > >
00:00:30 verbose #950 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:30 verbose #951 > > //// test
00:00:30 verbose #952 > > ///! rust
00:00:30 verbose #953 > >
00:00:30 verbose #954 > > types ()
00:00:30 verbose #955 > >
00:00:30 verbose #956 > > [[
00:00:30 verbose #957 > > "1"
00:00:30 verbose #958 > > "2"
00:00:30 verbose #959 > > "3"
00:00:30 verbose #960 > > ]]
00:00:30 verbose #961 > > |> fun x =>
00:00:30 verbose #962 > > inl code = (x : _) |> concat_list_heap_trailing "\n"
00:00:30 verbose #963 > > code
00:00:30 verbose #964 > > |> _assert_eq "1\n2\n3\n"
00:00:35 verbose #965 > >
00:00:35 verbose #966 > > ╭─[ 4.57s - return value ]─────────────────────────────────────────────────────╮
00:00:35 verbose #967 > > │ assert_eq / actual: "1 │
00:00:35 verbose #968 > > │ 2 │
00:00:35 verbose #969 > > │ 3 │
00:00:35 verbose #970 > > │ " / expected: "1 │
00:00:35 verbose #971 > > │ 2 │
00:00:35 verbose #972 > > │ 3 │
00:00:35 verbose #973 > > │ " │
00:00:35 verbose #974 > > │ │
00:00:35 verbose #975 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #976 > >
00:00:35 verbose #977 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:35 verbose #978 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:35 verbose #979 > > │ ## concat │
00:00:35 verbose #980 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #981 > >
00:00:35 verbose #982 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 verbose #983 > > inl concat (a : string) (b : seq.seq' _) : string =
00:00:35 verbose #984 > > inl a = join a
00:00:35 verbose #985 > > b |> $'String.concat' a
00:00:35 verbose #986 > >
00:00:35 verbose #987 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:35 verbose #988 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:35 verbose #989 > > │ ## ellipsis │
00:00:35 verbose #990 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #991 > >
00:00:35 verbose #992 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 verbose #993 > > inl ellipsis (max : i32) (s : string) =
00:00:35 verbose #994 > > if sm.length s <= max
00:00:35 verbose #995 > > then s
00:00:35 verbose #996 > > else s |> slice 0 (max - 1) |> fun x => $'!x + "..."'
00:00:35 verbose #997 > >
00:00:35 verbose #998 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 verbose #999 > > //// test
00:00:35 verbose #1000 > >
00:00:35 verbose #1001 > > "12345"
00:00:35 verbose #1002 > > |> ellipsis 2
00:00:35 verbose #1003 > > |> _assert_eq "12..."
00:00:35 verbose #1004 > >
00:00:35 verbose #1005 > > "12345"
00:00:35 verbose #1006 > > |> ellipsis 4
00:00:35 verbose #1007 > > |> _assert_eq "1234..."
00:00:35 verbose #1008 > >
00:00:35 verbose #1009 > > ╭─[ 109.61ms - stdout ]────────────────────────────────────────────────────────╮
00:00:35 verbose #1010 > > │ assert_eq / actual: "12..." / expected: "12..." │
00:00:35 verbose #1011 > > │ assert_eq / actual: "1234..." / expected: "1234..." │
00:00:35 verbose #1012 > > │ │
00:00:35 verbose #1013 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #1014 > >
00:00:35 verbose #1015 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:35 verbose #1016 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:35 verbose #1017 > > │ ## ellipsis_end │
00:00:35 verbose #1018 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #1019 > >
00:00:35 verbose #1020 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 verbose #1021 > > let ellipsis_end (max : i64) (s : string) =
00:00:35 verbose #1022 > > inl len = sm.length s
00:00:35 verbose #1023 > > if len <= max
00:00:35 verbose #1024 > > then s
00:00:35 verbose #1025 > > else
00:00:35 verbose #1026 > > inl half = f64 max / 2
00:00:35 verbose #1027 > > inl start_half = half |> math.ceil |> i64
00:00:35 verbose #1028 > > inl end_half = half |> math.floor |> i64
00:00:35 verbose #1029 > > inl start = s |> slice 0 (start_half - 1)
00:00:35 verbose #1030 > > inl end = s |> slice (len - end_half) (len - 1)
00:00:35 verbose #1031 > > (a ;[[start; "..."; end]] : _ i32 _)
00:00:35 verbose #1032 > > |> seq.of_array
00:00:35 verbose #1033 > > |> concat ""
00:00:35 verbose #1034 > >
00:00:35 verbose #1035 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 verbose #1036 > > //// test
00:00:35 verbose #1037 > >
00:00:35 verbose #1038 > > "12345"
00:00:35 verbose #1039 > > |> ellipsis_end 2
00:00:35 verbose #1040 > > |> _assert_eq "1...5"
00:00:35 verbose #1041 > >
00:00:35 verbose #1042 > > "12345"
00:00:35 verbose #1043 > > |> ellipsis_end 3
00:00:35 verbose #1044 > > |> _assert_eq "12...5"
00:00:35 verbose #1045 > >
00:00:35 verbose #1046 > > "1234567"
00:00:35 verbose #1047 > > |> ellipsis_end 4
00:00:35 verbose #1048 > > |> _assert_eq "12...67"
00:00:36 verbose #1049 > >
00:00:36 verbose #1050 > > ╭─[ 278.31ms - stdout ]────────────────────────────────────────────────────────╮
00:00:36 verbose #1051 > > │ assert_eq / actual: "1...5" / expected: "1...5" │
00:00:36 verbose #1052 > > │ assert_eq / actual: "12...5" / expected: "12...5" │
00:00:36 verbose #1053 > > │ assert_eq / actual: "12...67" / expected: "12...67" │
00:00:36 verbose #1054 > > │ │
00:00:36 verbose #1055 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1056 > >
00:00:36 verbose #1057 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1058 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1059 > > │ ## format_ellipsis │
00:00:36 verbose #1060 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1061 > >
00:00:36 verbose #1062 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1063 > > inl format_ellipsis s =
00:00:36 verbose #1064 > > s
00:00:36 verbose #1065 > > |> format_debug
00:00:36 verbose #1066 > > |> ellipsis_end 400
00:00:36 verbose #1067 > >
00:00:36 verbose #1068 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1069 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1070 > > │ ## split │
00:00:36 verbose #1071 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1072 > >
00:00:36 verbose #1073 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1074 > > inl split (separator : string) (str : string) : array_base string =
00:00:36 verbose #1075 > > $'!str.Split !separator '
00:00:36 verbose #1076 > >
00:00:36 verbose #1077 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1078 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1079 > > │ ## split_string │
00:00:36 verbose #1080 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1081 > >
00:00:36 verbose #1082 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1083 > > inl split_string (separator : array_base string) (str : string) : array_base
00:00:36 verbose #1084 > > string =
00:00:36 verbose #1085 > > run_target function
00:00:36 verbose #1086 > > | Fsharp (Native) => fun () => $'!str.Split (!separator,
00:00:36 verbose #1087 > > System.StringSplitOptions.None)'
00:00:36 verbose #1088 > > | _ => fun () => str |> split ((a separator : _ i32 _) |> seq.of_array
00:00:36 verbose #1089 > > |> concat "")
00:00:36 verbose #1090 > >
00:00:36 verbose #1091 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1092 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1093 > > │ ## join' │
00:00:36 verbose #1094 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1095 > >
00:00:36 verbose #1096 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1097 > > inl join' (concat : string) (s : a i32 string) : string =
00:00:36 verbose #1098 > > $'System.String.Join (!concat, !s)'
00:00:36 verbose #1099 > >
00:00:36 verbose #1100 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1101 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1102 > > │ ## to_char_array │
00:00:36 verbose #1103 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1104 > >
00:00:36 verbose #1105 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1106 > > inl to_char_array (str : string) : a i32 char =
00:00:36 verbose #1107 > > am.init (str |> sm.length) (fun i => sm.index str i)
00:00:36 verbose #1108 > >
00:00:36 verbose #1109 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1110 > > //// test
00:00:36 verbose #1111 > >
00:00:36 verbose #1112 > > "abc"
00:00:36 verbose #1113 > > |> to_char_array
00:00:36 verbose #1114 > > |> _assert_eq (a ;[['a'; 'b'; 'c']])
00:00:36 verbose #1115 > >
00:00:36 verbose #1116 > > ╭─[ 163.98ms - stdout ]────────────────────────────────────────────────────────╮
00:00:36 verbose #1117 > > │ assert_eq / actual: [|'a'; 'b'; 'c'|] / expected: [|'a'; 'b'; 'c'|] │
00:00:36 verbose #1118 > > │ │
00:00:36 verbose #1119 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1120 > >
00:00:36 verbose #1121 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1122 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1123 > > │ ## to_char_list │
00:00:36 verbose #1124 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1125 > >
00:00:36 verbose #1126 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1127 > > inl to_char_list (str : string) : list char =
00:00:36 verbose #1128 > > listm.init (str |> sm.length) (fun (i : i64) => sm.index str i)
00:00:36 verbose #1129 > >
00:00:36 verbose #1130 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1131 > > //// test
00:00:36 verbose #1132 > >
00:00:36 verbose #1133 > > "abc"
00:00:36 verbose #1134 > > |> to_char_list
00:00:36 verbose #1135 > > |> _assert_eq [['a'; 'b'; 'c']]
00:00:36 verbose #1136 > >
00:00:36 verbose #1137 > > ╭─[ 90.37ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:36 verbose #1138 > > │ assert_eq / actual: UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) / expected: │
00:00:36 verbose #1139 > > │ UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) │
00:00:36 verbose #1140 > > │ │
00:00:36 verbose #1141 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1142 > >
00:00:36 verbose #1143 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1144 > > nominal encoding = $'System.Text.Encoding'
00:00:36 verbose #1145 > >
00:00:36 verbose #1146 > > inl encoding_utf8 () : encoding =
00:00:36 verbose #1147 > > $'System.Text.Encoding.UTF8'
00:00:36 verbose #1148 > >
00:00:36 verbose #1149 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1150 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1151 > > │ ## utf8_get_bytes │
00:00:36 verbose #1152 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1153 > >
00:00:36 verbose #1154 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1155 > > inl utf8_get_bytes (s : string) : a i32 u8 =
00:00:36 verbose #1156 > > s |> $'`encoding.UTF8.GetBytes'
00:00:36 verbose #1157 > >
00:00:36 verbose #1158 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1159 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1160 > > │ ## byte_to_string │
00:00:36 verbose #1161 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1162 > >
00:00:36 verbose #1163 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1164 > > inl byte_to_string (format : string) (x : u8) : string =
00:00:36 verbose #1165 > > $'!x.ToString' format
00:00:36 verbose #1166 > >
00:00:36 verbose #1167 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1168 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1169 > > │ ## windows │
00:00:36 verbose #1170 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1171 > >
00:00:36 verbose #1172 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1173 > > nominal windows t = $'std_slice_Windows<`t>'
00:00:36 verbose #1174 > >
00:00:36 verbose #1175 > > inl windows (len : unativeint) (source : am'.vec u8) : windows u8 =
00:00:36 verbose #1176 > > inl source = source |> rust.new_box |> rust.box_leak
00:00:36 verbose #1177 > > // inl source' = source |> rust.clone
00:00:36 verbose #1178 > > inl result = !\\(len, $'"<[[_]]>::windows(!source, $0)"')
00:00:36 verbose #1179 > > // source |> rust.drop
00:00:36 verbose #1180 > > result
00:00:36 verbose #1181 > >
00:00:36 verbose #1182 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1183 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1184 > > │ ## any │
00:00:36 verbose #1185 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1186 > >
00:00:36 verbose #1187 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1188 > > inl any forall t. (fn : string -> bool) (source : windows t) : bool =
00:00:36 verbose #1189 > > (!\($'"true; let mut !source = !source"') : bool) |> ignore
00:00:36 verbose #1190 > > inl fn' x =
00:00:36 verbose #1191 > > x
00:00:36 verbose #1192 > > |> str_from_utf8
00:00:36 verbose #1193 > > |> resultm.unwrap_or' #""
00:00:36 verbose #1194 > > |> ref_to_std_string
00:00:36 verbose #1195 > > |> from_std_string
00:00:36 verbose #1196 > > |> fn
00:00:36 verbose #1197 > > !\\(fn', $'"!source.any(move |x| $0(x))"')
00:00:36 verbose #1198 > >
00:00:36 verbose #1199 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1200 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1201 > > │ ## slice_contains │
00:00:36 verbose #1202 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1203 > >
00:00:36 verbose #1204 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1205 > > inl slice_contains (text : string) (source : am'.vec u8) : bool =
00:00:36 verbose #1206 > > fun () =>
00:00:36 verbose #1207 > > inl source = join source
00:00:36 verbose #1208 > > source
00:00:36 verbose #1209 > > |> windows (text |> length |> (fun x => x : i32) |> convert)
00:00:36 verbose #1210 > > |> any ((=.) text)
00:00:36 verbose #1211 > > |> fun x => join x ()
00:00:36 verbose #1212 > >
00:00:36 verbose #1213 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1214 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1215 > > │ ## as_bytes │
00:00:36 verbose #1216 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1217 > >
00:00:36 verbose #1218 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1219 > > inl as_bytes (text : string) : rust.ref' (am'.slice u8) =
00:00:36 verbose #1220 > > inl text = join text
00:00:36 verbose #1221 > > !\($'"!text.as_bytes()"')
00:00:36 verbose #1222 > >
00:00:36 verbose #1223 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 verbose #1224 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 verbose #1225 > > │ ## main │
00:00:36 verbose #1226 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 verbose #1227 > >
00:00:36 verbose #1228 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 verbose #1229 > > inl main () =
00:00:36 verbose #1230 > > types ()
00:00:36 verbose #1231 > > $'let contains x = !contains x' : ()
00:00:36 verbose #1232 > > $'let ends_with x = !ends_with x' : ()
00:00:36 verbose #1233 > > $'let pad_left x = !pad_left x' : ()
00:00:36 verbose #1234 > > $'let pad_right x = !pad_right x' : ()
00:00:36 verbose #1235 > > $'let replace x = !replace x' : ()
00:00:36 verbose #1236 > > $'let replace_regex x = !replace_regex x' : ()
00:00:36 verbose #1237 > > inl slice (a : i32) (b : i32) c = slice a b c
00:00:36 verbose #1238 > > $'let slice x = !slice x' : ()
00:00:36 verbose #1239 > > $'let split x = !split x' : ()
00:00:36 verbose #1240 > > $'let split_string x = !split_string x' : ()
00:00:36 verbose #1241 > > $'let starts_with x = !starts_with x' : ()
00:00:36 verbose #1242 > > $'let substring x = !substring x' : ()
00:00:36 verbose #1243 > > $'let to_lower x = !to_lower x' : ()
00:00:36 verbose #1244 > > $'let to_upper x = !to_upper x' : ()
00:00:36 verbose #1245 > > $'let trim x = !trim x' : ()
00:00:36 verbose #1246 > > $'let trim_end x = !trim_end x' : ()
00:00:36 verbose #1247 > > $'let trim_start x = !trim_start x' : ()
00:00:36 verbose #1248 > > $'let ellipsis x = !ellipsis x' : ()
00:00:36 verbose #1249 > > $'let ellipsis_end x = !ellipsis_end x' : ()
00:00:36 verbose #1250 > > $'let format_exception x = !format_exception x' : ()
00:00:36 verbose #1251 > > $'let concat_array_trailing x = !concat_array_trailing x' : ()
00:00:36 verbose #1252 > > inl concat a (b : seq.seq' string) = concat a b
00:00:36 verbose #1253 > > $'let concat x = !concat x' : ()
00:00:36 verbose #1254 > > $'let join\' x = !join' x' : ()
00:00:36 verbose #1255 > > $'let to_char_array x = !to_char_array x' : ()
00:00:38 verbose #1256 > 00:00:37 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/764306196eb4b978b2bf043bcedca4fa6b0833ffd3e8f1fd9d8998fb52b15844/main.spi
00:00:42 verbose #1257 > >
00:00:42 verbose #1258 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:42 verbose #1259 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:42 verbose #1260 > > │ ## to_string std_string │
00:00:42 verbose #1261 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 verbose #1262 > >
00:00:42 verbose #1263 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:42 verbose #1264 > > open rust
00:00:42 verbose #1265 > > instance to_string std_string = from_std_string
00:00:43 verbose #1266 > 00:00:41 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7ecb02ea36675416f6eca3cb7e70681a2d367e65721d944e97af9ad5a41adcad/main.spi
00:00:43 verbose #1267 > 00:00:41 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 61630
00:00:43 verbose #1268 > 00:00:41 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:46 verbose #1269 > 00:00:43 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb to html
00:00:46 verbose #1270 > 00:00:43 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:46 verbose #1271 > 00:00:43 verbose #7 ! validate(nb)
00:00:49 verbose #1272 > 00:00:46 verbose #8 ! [NbConvertApp] Writing 461823 bytes to c:\home\git\polyglot\lib\spiral\sm'.dib.html
00:00:49 verbose #1273 > 00:00:46 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637
00:00:49 verbose #1274 > 00:00:46 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637
00:00:49 verbose #1275 > 00:00:46 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:50 verbose #1276 > 00:00:47 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:50 verbose #1277 > 00:00:47 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:51 verbose #1278 > 00:00:48 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 62326
00:00:51 debug #1279 execute_with_options_async / exit_code: 0 / output.Length: 67040
00:00:51 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path sm'.dib --retries 3
00:00:51 debug #1280 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path rust.dib --retries 3",
[||], None, None, true, None)
00:00:51 verbose #1281 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "rust.dib", "--retries", "3"])
00:00:51 verbose #1282 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/rust.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:53 verbose #1283 > >
00:00:53 verbose #1284 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:54 verbose #1285 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:54 verbose #1286 > > │ # rust │
00:00:54 verbose #1287 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:54 verbose #1288 > >
00:00:54 verbose #1289 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:54 verbose #1290 > > //// test
00:00:54 verbose #1291 > >
00:00:54 verbose #1292 > > open testing
00:00:54 verbose #1293 > >
00:00:54 verbose #1294 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:00:54 verbose #1295 > > #r
00:00:54 verbose #1296 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:54 verbose #1297 > > otNet.Interactive.Spiral.dll"
00:00:54 verbose #1298 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:00:54 verbose #1299 > > #r
00:00:54 verbose #1300 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:54 verbose #1301 > > otNet.Interactive.dll"
00:00:54 verbose #1302 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:59 verbose #1303 > >
00:00:59 verbose #1304 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1305 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1306 > > │ ## types │
00:00:59 verbose #1307 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1308 > >
00:00:59 verbose #1309 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1310 > > inl types () =
00:00:59 verbose #1311 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1312 > > Fable.Core.Emit(\"core::any::Any\")>]]\n#endif\ntype core_any_Any = class end"
00:00:59 verbose #1313 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1314 > > Fable.Core.Emit(\"_\")>]]\n#endif\ntype core_ops_Try<'T> = class end"
00:00:59 verbose #1315 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1316 > > Fable.Core.Emit(\"Func0<$0>\")>]]\n#endif\ntype Func0<'T> = class end"
00:00:59 verbose #1317 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Func1<$0,
00:00:59 verbose #1318 > > $1>\")>]]\n#endif\ntype Func0<'T, 'U> = class end"
00:00:59 verbose #1319 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1320 > > Fable.Core.Emit(\"Box<$0>\")>]]\n#endif\ntype Box<'T> = class end"
00:00:59 verbose #1321 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"dyn
00:00:59 verbose #1322 > > $0\")>]]\n#endif\ntype Dyn<'T> = class end"
00:00:59 verbose #1323 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1324 > > Fable.Core.Emit(\"Send\")>]]\n#endif\ntype Send<'T> = class end"
00:00:59 verbose #1325 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn() ->
00:00:59 verbose #1326 > > $0\")>]]\n#endif\ntype Fn<'T> = class end"
00:00:59 verbose #1327 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1328 > > Fable.Core.Emit(\"Fn()\")>]]\n#endif\ntype FnUnit = class end"
00:00:59 verbose #1329 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"FnOnce()
00:00:59 verbose #1330 > > -> $0\")>]]\n#endif\ntype FnOnce<'T> = class end"
00:00:59 verbose #1331 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1332 > > Fable.Core.Emit(\"Fn($0)\")>]]\n#endif\ntype ActionFn<'T> = class end"
00:00:59 verbose #1333 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn($0,
00:00:59 verbose #1334 > > $1)\")>]]\n#endif\ntype ActionFn2<'T, 'U> = class end"
00:00:59 verbose #1335 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"impl
00:00:59 verbose #1336 > > $0\")>]]\n#endif\ntype Impl<'T> = class end"
00:00:59 verbose #1337 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"mut
00:00:59 verbose #1338 > > $0\")>]]\n#endif\ntype Mut<'T> = class end"
00:00:59 verbose #1339 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1340 > > Fable.Core.Emit(\"&$0\")>]]\n#endif\ntype Ref<'T> = class end"
00:00:59 verbose #1341 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0 +
00:00:59 verbose #1342 > > $1\")>]]\n#endif\ntype LifetimeJoin<'T, 'U> = class end"
00:00:59 verbose #1343 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1344 > > Fable.Core.Emit(\"'static\")>]]\n#endif\ntype StaticLifetime = class end"
00:00:59 verbose #1345 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1346 > > Fable.Core.Emit(\"$0\")>]]\n#endif\ntype LifetimeRef<'T> = class end"
00:00:59 verbose #1347 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0
00:00:59 verbose #1348 > > $1\")>]]\n#endif\ntype Lifetime<'T, 'U> = class end"
00:00:59 verbose #1349 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1350 > > Fable.Core.Emit(\"MutCell<$0>\")>]]\n#endif\ntype MutCell<'T> = class end"
00:00:59 verbose #1351 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1352 > > Fable.Core.Emit(\"std::any::Any\")>]]\n#endif\ntype std_any_Any = class end"
00:00:59 verbose #1353 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1354 > > Fable.Core.Emit(\"std::borrow::Cow<$0>\")>]]\n#endif\ntype std_borrow_Cow<'T> =
00:00:59 verbose #1355 > > class end"
00:00:59 verbose #1356 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1357 > > Fable.Core.Emit(\"std::cell::RefCell<$0>\")>]]\n#endif\ntype
00:00:59 verbose #1358 > > std_cell_RefCell<'T> = class end"
00:00:59 verbose #1359 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1360 > > Fable.Core.Emit(\"std::pin::Pin<$0>\")>]]\n#endif\ntype std_pin_Pin<'T> = class
00:00:59 verbose #1361 > > end"
00:00:59 verbose #1362 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1363 > > Fable.Core.Emit(\"std::rc::Rc<$0>\")>]]\n#endif\ntype std_rc_Rc<'T> = class end"
00:00:59 verbose #1364 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:00:59 verbose #1365 > > Fable.Core.Emit(\"std::rc::Weak<$0>\")>]]\n#endif\ntype std_rc_Weak<'T> = class
00:00:59 verbose #1366 > > end"
00:00:59 verbose #1367 > >
00:00:59 verbose #1368 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1369 > > nominal unit = $'unit'
00:00:59 verbose #1370 > > nominal any = $'core_any_Any'
00:00:59 verbose #1371 > > nominal try t = $'core_ops_Try<`t>'
00:00:59 verbose #1372 > > nominal cow t = $'std_borrow_Cow<`t>'
00:00:59 verbose #1373 > > nominal ref_cell t = $'std_cell_RefCell<`t>'
00:00:59 verbose #1374 > > nominal rc t = $'std_rc_Rc<`t>'
00:00:59 verbose #1375 > > nominal lifetime_join' (t : * -> *) u = $'LifetimeRef<`(t u)>'
00:00:59 verbose #1376 > > nominal lifetime_join t u = $'LifetimeJoin<`t, `u>'
00:00:59 verbose #1377 > > nominal lifetime t u = $'Lifetime<`t, `u>'
00:00:59 verbose #1378 > > nominal static_lifetime = $'StaticLifetime'
00:00:59 verbose #1379 > > nominal ref t = $'Ref<`t>'
00:00:59 verbose #1380 > > nominal static_ref t = ref (lifetime static_lifetime t)
00:00:59 verbose #1381 > > nominal weak_rc t = $'std_rc_Weak<`t>'
00:00:59 verbose #1382 > > nominal box t = $'Box<`t>'
00:00:59 verbose #1383 > > nominal mut_cell t = $'MutCell<`t>'
00:00:59 verbose #1384 > > nominal pin t = $'std_pin_Pin<`t>'
00:00:59 verbose #1385 > > nominal dyn' t = $'Dyn<`t>'
00:00:59 verbose #1386 > > nominal fn' t = $'Fn<`t>'
00:00:59 verbose #1387 > > nominal action_fn t = $'ActionFn<`t>'
00:00:59 verbose #1388 > > nominal action_fn2 t u = $'ActionFn2<`t, `u>'
00:00:59 verbose #1389 > > nominal fn_once t = $'FnOnce<`t>'
00:00:59 verbose #1390 > > nominal fn_unit = $'FnUnit'
00:00:59 verbose #1391 > > nominal func0 t = $'Func0<`t>'
00:00:59 verbose #1392 > > nominal func1 t u =
00:00:59 verbose #1393 > > `(
00:00:59 verbose #1394 > > typecase t with
00:00:59 verbose #1395 > > | () => `func0 `u
00:00:59 verbose #1396 > > | _ => $'' : $'Func0<`t, `u>'
00:00:59 verbose #1397 > > )
00:00:59 verbose #1398 > > nominal impl t = $'Impl<`t>'
00:00:59 verbose #1399 > > nominal mut' t = $'Mut<`t>'
00:00:59 verbose #1400 > > nominal ref' t = $'Ref<`t>'
00:00:59 verbose #1401 > > nominal send t = lifetime_join t $'Send<`t>'
00:00:59 verbose #1402 > > nominal static_ref' t = static_ref t
00:00:59 verbose #1403 > >
00:00:59 verbose #1404 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1405 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1406 > > │ ## emit_expr │
00:00:59 verbose #1407 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1408 > >
00:00:59 verbose #1409 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1410 > > inl emit_expr forall a t. (args : a) (code : string) : t =
00:00:59 verbose #1411 > > real
00:00:59 verbose #1412 > > $'Fable.Core.RustInterop.emitRustExpr !args !code ' : t
00:00:59 verbose #1413 > >
00:00:59 verbose #1414 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1415 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1416 > > │ ## (~!\\) │
00:00:59 verbose #1417 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1418 > >
00:00:59 verbose #1419 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1420 > > inl (~!\) forall t. (code : string) : t =
00:00:59 verbose #1421 > > emit_expr () code
00:00:59 verbose #1422 > >
00:00:59 verbose #1423 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1424 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1425 > > │ ## (~!\\\\) │
00:00:59 verbose #1426 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1427 > >
00:00:59 verbose #1428 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1429 > > inl (~!\\) forall t u. ((args : t), (code : string)) : u =
00:00:59 verbose #1430 > > emit_expr args code
00:00:59 verbose #1431 > >
00:00:59 verbose #1432 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1433 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1434 > > │ ## emit │
00:00:59 verbose #1435 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1436 > >
00:00:59 verbose #1437 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1438 > > inl emit forall t. (x : t) : t =
00:00:59 verbose #1439 > > !\\(x, $'"$0"')
00:00:59 verbose #1440 > >
00:00:59 verbose #1441 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1442 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1443 > > │ ## emit' │
00:00:59 verbose #1444 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1445 > >
00:00:59 verbose #1446 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1447 > > inl emit' forall t. (x : t) : t =
00:00:59 verbose #1448 > > !\\(x, $'"let !x = $0"')
00:00:59 verbose #1449 > > x
00:00:59 verbose #1450 > >
00:00:59 verbose #1451 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1452 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1453 > > │ ## clone │
00:00:59 verbose #1454 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1455 > >
00:00:59 verbose #1456 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1457 > > inl clone forall t. (x : t) : t =
00:00:59 verbose #1458 > > !\\(x, $'"$0.clone()"')
00:00:59 verbose #1459 > >
00:00:59 verbose #1460 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1461 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1462 > > │ ## new_box │
00:00:59 verbose #1463 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1464 > >
00:00:59 verbose #1465 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1466 > > inl new_box forall t. (x : t) : box t =
00:00:59 verbose #1467 > > !\\(x, $'"Box::new($0)"')
00:00:59 verbose #1468 > >
00:00:59 verbose #1469 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1470 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1471 > > │ ## new_rc │
00:00:59 verbose #1472 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1473 > >
00:00:59 verbose #1474 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1475 > > inl new_rc forall t. (x : t) : rc t =
00:00:59 verbose #1476 > > !\\(x, $'"std::rc::Rc::new($0)"')
00:00:59 verbose #1477 > >
00:00:59 verbose #1478 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1479 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1480 > > │ ## rc_clone │
00:00:59 verbose #1481 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1482 > >
00:00:59 verbose #1483 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1484 > > inl rc_clone forall t. (x : rc t) : rc t =
00:00:59 verbose #1485 > > !\\(x, $'"std::rc::Rc::clone(&$0)"')
00:00:59 verbose #1486 > >
00:00:59 verbose #1487 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1488 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1489 > > │ ## rc_unwrap_or_clone │
00:00:59 verbose #1490 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1491 > >
00:00:59 verbose #1492 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1493 > > inl rc_unwrap_or_clone forall t. (x : rc t) : t =
00:00:59 verbose #1494 > > !\\(x, $'"std::rc::Rc::unwrap_or_clone($0)"')
00:00:59 verbose #1495 > >
00:00:59 verbose #1496 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1497 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1498 > > │ ## rc_downgrade │
00:00:59 verbose #1499 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1500 > >
00:00:59 verbose #1501 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1502 > > inl rc_downgrade forall t. (x : rc t) : weak_rc t =
00:00:59 verbose #1503 > > inl x = join x
00:00:59 verbose #1504 > > !\($'"std::rc::Rc::downgrade(&!x)"')
00:00:59 verbose #1505 > >
00:00:59 verbose #1506 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1507 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1508 > > │ ## new_ref_cell │
00:00:59 verbose #1509 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1510 > >
00:00:59 verbose #1511 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1512 > > inl new_ref_cell forall t. (x : t) : ref_cell t =
00:00:59 verbose #1513 > > inl x = join x
00:00:59 verbose #1514 > > !\($'"std::cell::RefCell::new(!x)"')
00:00:59 verbose #1515 > >
00:00:59 verbose #1516 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1517 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1518 > > │ ## ref_cell_borrow │
00:00:59 verbose #1519 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1520 > >
00:00:59 verbose #1521 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1522 > > inl ref_cell_borrow forall t. (x : rc (ref_cell t)) : t =
00:00:59 verbose #1523 > > inl x = join x
00:00:59 verbose #1524 > > !\($'"*std::cell::RefCell::borrow(&std::rc::Rc::clone(&!x))"')
00:00:59 verbose #1525 > >
00:00:59 verbose #1526 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1527 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1528 > > │ ## ref_cell_borrow_mut │
00:00:59 verbose #1529 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1530 > >
00:00:59 verbose #1531 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1532 > > inl ref_cell_borrow_mut forall t. (x : rc (ref_cell t)) : mut' t =
00:00:59 verbose #1533 > > inl x = join x
00:00:59 verbose #1534 > > !\($'"*std::cell::RefCell::borrow_mut(&std::rc::Rc::clone(&!x))"')
00:00:59 verbose #1535 > >
00:00:59 verbose #1536 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1537 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1538 > > │ ## to_mut │
00:00:59 verbose #1539 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1540 > >
00:00:59 verbose #1541 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1542 > > inl to_mut forall t. (x : t) : t =
00:00:59 verbose #1543 > > (!\($'"true; // 1"') : bool) |> ignore
00:00:59 verbose #1544 > > (!\($'"true; let mut !x = !x"') : bool) |> ignore
00:00:59 verbose #1545 > > (!\($'"true; !x"') : bool) |> ignore
00:00:59 verbose #1546 > > !\($'"!x"')
00:00:59 verbose #1547 > > // inl result = !\($'"!x"') : mut' t
00:00:59 verbose #1548 > > // !\($'"!result"')
00:00:59 verbose #1549 > > // inl result = !\($'"*/ // a"') : mut' t
00:00:59 verbose #1550 > > // inl result = !\($'"!x"') : mut' t
00:00:59 verbose #1551 > > // result |> fun x => $'!x |> unbox // b'
00:00:59 verbose #1552 > >
00:00:59 verbose #1553 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1554 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1555 > > │ ## ref_map │
00:00:59 verbose #1556 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1557 > >
00:00:59 verbose #1558 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1559 > > inl ref_map forall t u. (fn : t -> u) (x : ref' t) : ref' u =
00:00:59 verbose #1560 > > !\($'"!fn(!x)"')
00:00:59 verbose #1561 > >
00:00:59 verbose #1562 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1563 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1564 > > │ ## ref_invoke │
00:00:59 verbose #1565 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1566 > >
00:00:59 verbose #1567 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1568 > > inl ref_invoke forall t u. (fn : t -> u) (ref : ref' t) : u =
00:00:59 verbose #1569 > > !\\(fn, $'"$0(!ref.clone())"')
00:00:59 verbose #1570 > >
00:00:59 verbose #1571 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1572 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1573 > > │ ## cow_as_ref │
00:00:59 verbose #1574 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1575 > >
00:00:59 verbose #1576 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1577 > > inl cow_as_ref forall t. (s : cow t) : ref' t =
00:00:59 verbose #1578 > > !\\(s, $'"$0.as_ref()"')
00:00:59 verbose #1579 > >
00:00:59 verbose #1580 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1581 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1582 > > │ ## from_mut │
00:00:59 verbose #1583 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1584 > >
00:00:59 verbose #1585 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1586 > > inl from_mut forall t. (x : mut' t) : t =
00:00:59 verbose #1587 > > !\($'"!x"')
00:00:59 verbose #1588 > >
00:00:59 verbose #1589 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1590 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1591 > > │ ## box_fn │
00:00:59 verbose #1592 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1593 > >
00:00:59 verbose #1594 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1595 > > inl box_fn forall t. (x : () -> ()) : box t =
00:00:59 verbose #1596 > > inl x = join x
00:00:59 verbose #1597 > > !\($'"Box::new(move || !x())"')
00:00:59 verbose #1598 > >
00:00:59 verbose #1599 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1600 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1601 > > │ ## box_pin │
00:00:59 verbose #1602 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1603 > >
00:00:59 verbose #1604 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1605 > > inl box_pin forall t. (x : t) : pin (box t) =
00:00:59 verbose #1606 > > inl x = join x
00:00:59 verbose #1607 > > !\($'"Box::pin(!x)"')
00:00:59 verbose #1608 > >
00:00:59 verbose #1609 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1610 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1611 > > │ ## to_ref │
00:00:59 verbose #1612 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1613 > >
00:00:59 verbose #1614 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1615 > > inl to_ref forall t. (x : t) : ref' t =
00:00:59 verbose #1616 > > !\\(x, $'"&$0"')
00:00:59 verbose #1617 > >
00:00:59 verbose #1618 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1619 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1620 > > │ ## deref │
00:00:59 verbose #1621 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1622 > >
00:00:59 verbose #1623 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1624 > > inl deref forall t. (ref : ref' t) : t =
00:00:59 verbose #1625 > > !\\(ref, $'"*$0"')
00:00:59 verbose #1626 > >
00:00:59 verbose #1627 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1628 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1629 > > │ ## ops_deref │
00:00:59 verbose #1630 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1631 > >
00:00:59 verbose #1632 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1633 > > inl ops_deref forall t. (ref : t) : t =
00:00:59 verbose #1634 > > inl ref = join ref
00:00:59 verbose #1635 > > !\($'"core::ops::Deref::deref(&!ref)"')
00:00:59 verbose #1636 > >
00:00:59 verbose #1637 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1638 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1639 > > │ ## func0_invoke │
00:00:59 verbose #1640 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1641 > >
00:00:59 verbose #1642 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1643 > > inl func0_invoke forall t. (x : func0 t) : t =
00:00:59 verbose #1644 > > !\\(x, $'"$0()"')
00:00:59 verbose #1645 > >
00:00:59 verbose #1646 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1647 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1648 > > │ ## func0_move │
00:00:59 verbose #1649 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1650 > >
00:00:59 verbose #1651 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1652 > > inl func0_move forall t. (fn : func0 t) : t =
00:00:59 verbose #1653 > > inl fn = join fn
00:00:59 verbose #1654 > > !\($'"(move || !fn())()"')
00:00:59 verbose #1655 > >
00:00:59 verbose #1656 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1657 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1658 > > │ ## move │
00:00:59 verbose #1659 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1660 > >
00:00:59 verbose #1661 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1662 > > inl move forall t. (fn : () -> t) : func0 t =
00:00:59 verbose #1663 > > !\\(fn, $'"Func0::new(move || $0())"')
00:00:59 verbose #1664 > >
00:00:59 verbose #1665 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1666 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1667 > > │ ## to_static_ref_unbox │
00:00:59 verbose #1668 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1669 > >
00:00:59 verbose #1670 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1671 > > inl to_static_ref_unbox forall t. (x : ref' t) : static_ref' t =
00:00:59 verbose #1672 > > x |> unbox
00:00:59 verbose #1673 > >
00:00:59 verbose #1674 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1675 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1676 > > │ ## from_static_ref_unbox │
00:00:59 verbose #1677 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1678 > >
00:00:59 verbose #1679 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1680 > > inl from_static_ref_unbox forall t. (x : static_ref' t) : ref' t =
00:00:59 verbose #1681 > > x |> unbox
00:00:59 verbose #1682 > >
00:00:59 verbose #1683 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1684 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1685 > > │ ## box_leak │
00:00:59 verbose #1686 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1687 > >
00:00:59 verbose #1688 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1689 > > inl box_leak forall t. (x : box t) : static_ref' (mut' t) =
00:00:59 verbose #1690 > > !\\(x, $'"Box::leak($0)"')
00:00:59 verbose #1691 > >
00:00:59 verbose #1692 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1693 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1694 > > │ ## drop │
00:00:59 verbose #1695 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1696 > >
00:00:59 verbose #1697 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1698 > > inl drop forall t. (x : t) : () =
00:00:59 verbose #1699 > > !\\(x, $'"drop($0)"')
00:00:59 verbose #1700 > >
00:00:59 verbose #1701 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1702 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1703 > > │ ## break │
00:00:59 verbose #1704 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1705 > >
00:00:59 verbose #1706 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1707 > > inl break () : () =
00:00:59 verbose #1708 > > (!\($'"true; break"') : bool) |> ignore
00:00:59 verbose #1709 > >
00:00:59 verbose #1710 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:59 verbose #1711 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:59 verbose #1712 > > │ ## fix_closure' │
00:00:59 verbose #1713 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:59 verbose #1714 > >
00:00:59 verbose #1715 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:59 verbose #1716 > > inl fix_closure' (depth : u8 * u8) x =
00:00:59 verbose #1717 > > inl rec loop text (acc : string) n : string =
00:00:59 verbose #1718 > > if n <= 0
00:00:59 verbose #1719 > > then acc
00:00:59 verbose #1720 > > else loop text (acc +. text) (n - 1)
00:00:59 verbose #1721 > > inl a = depth |> fst |> loop "}" ""
00:00:59 verbose #1722 > > inl b = depth |> snd |> loop "{" ""
00:00:59 verbose #1723 > > $'"!x " + !a + "); " + !b + " //"'
00:01:00 verbose #1724 > >
00:01:00 verbose #1725 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:00 verbose #1726 > > //// test
00:01:00 verbose #1727 > >
00:01:00 verbose #1728 > > fix_closure' (3, 2) 0i32
00:01:00 verbose #1729 > > |> _assert_eq "0 }}}); {{ //"
00:01:00 verbose #1730 > >
00:01:00 verbose #1731 > > ╭─[ 892.83ms - stdout ]────────────────────────────────────────────────────────╮
00:01:00 verbose #1732 > > │ assert_eq / actual: "0 }}}); {{ //" / expected: "0 }}}); {{ //" │
00:01:00 verbose #1733 > > │ │
00:01:00 verbose #1734 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:00 verbose #1735 > >
00:01:00 verbose #1736 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:00 verbose #1737 > > //// test
00:01:00 verbose #1738 > >
00:01:00 verbose #1739 > > fix_closure' (0, 0) ()
00:01:00 verbose #1740 > > |> _assert_eq "() ); //"
00:01:00 verbose #1741 > >
00:01:00 verbose #1742 > > ╭─[ 45.70ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:00 verbose #1743 > > │ assert_eq / actual: "() ); //" / expected: "() ); //" │
00:01:00 verbose #1744 > > │ │
00:01:00 verbose #1745 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:00 verbose #1746 > >
00:01:00 verbose #1747 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:00 verbose #1748 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:00 verbose #1749 > > │ ## fix_closure │
00:01:00 verbose #1750 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:00 verbose #1751 > >
00:01:00 verbose #1752 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:00 verbose #1753 > > inl fix_closure depth x =
00:01:00 verbose #1754 > > inl code = fix_closure' depth x
00:01:00 verbose #1755 > > !\code
00:01:00 verbose #1756 > >
00:01:00 verbose #1757 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:00 verbose #1758 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:00 verbose #1759 > > │ ## loop │
00:01:00 verbose #1760 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:00 verbose #1761 > >
00:01:00 verbose #1762 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:00 verbose #1763 > > inl loop (depth : i32) (fn : () -> ()) : () =
00:01:00 verbose #1764 > > (!\($'"true; loop { // rust.loop"') : bool) |> ignore
00:01:00 verbose #1765 > > fn ()
00:01:00 verbose #1766 > >
00:01:00 verbose #1767 > > listm.init depth id
00:01:00 verbose #1768 > > |> listm.iter fun n =>
00:01:00 verbose #1769 > > (!\($'"true; } // rust.loop"') : bool) |> ignore
00:01:00 verbose #1770 > >
00:01:00 verbose #1771 > > (!\($'"true; } // rust.loop"') : bool) |> ignore
00:01:00 verbose #1772 > >
00:01:00 verbose #1773 > > listm.init depth id
00:01:00 verbose #1774 > > |> listm.iter fun n =>
00:01:00 verbose #1775 > > (!\($'"true; { // rust.loop"') : bool) |> ignore
00:01:01 verbose #1776 > >
00:01:01 verbose #1777 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:01 verbose #1778 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:01 verbose #1779 > > │ ## run_tests │
00:01:01 verbose #1780 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:01 verbose #1781 > >
00:01:01 verbose #1782 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:01 verbose #1783 > > inl run_tests tests =
00:01:01 verbose #1784 > > (!\($'"true; () //"') : bool) |> ignore
00:01:01 verbose #1785 > >
00:01:01 verbose #1786 > > tests
00:01:01 verbose #1787 > > |> listm.iter fun name, fn =>
00:01:01 verbose #1788 > > !\($'"} /* /*"')
00:01:01 verbose #1789 > > (!\($'$"*/ #[[test]] fn " + !name + "() { //"') : bool) |> ignore
00:01:01 verbose #1790 > > fn name |> ignore
00:01:01 verbose #1791 > >
00:01:01 verbose #1792 > > tests
00:01:01 verbose #1793 > > |> listm.iter fun name, fn =>
00:01:01 verbose #1794 > > !\($'"{ //"') : ()
00:01:01 verbose #1795 > >
00:01:01 verbose #1796 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:01 verbose #1797 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:01 verbose #1798 > > │ ## capture │
00:01:01 verbose #1799 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:01 verbose #1800 > >
00:01:01 verbose #1801 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:01 verbose #1802 > > inl capture forall t. (fn : () -> t) : t =
00:01:01 verbose #1803 > > (!\($'"true; let _result = (|| { //"') : bool) |> ignore
00:01:01 verbose #1804 > > (!\\(fn (), $'"true; $0 })()"') : bool) |> ignore
00:01:01 verbose #1805 > > !\($'"_result"')
00:01:01 verbose #1806 > >
00:01:01 verbose #1807 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:01 verbose #1808 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:01 verbose #1809 > > │ ## capture_move │
00:01:01 verbose #1810 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:01 verbose #1811 > >
00:01:01 verbose #1812 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:01 verbose #1813 > > inl capture_move forall t. (fn : () -> t) : t =
00:01:01 verbose #1814 > > (!\($'"true; let _result = (move || { //"') : bool) |> ignore
00:01:01 verbose #1815 > > (!\\(fn (), $'"true; $0 })()"') : bool) |> ignore
00:01:01 verbose #1816 > > !\($'"_result"')
00:01:01 verbose #1817 > 00:00:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 26743
00:01:01 verbose #1818 > 00:00:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:04 verbose #1819 > 00:00:12 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust.dib.ipynb to html
00:01:04 verbose #1820 > 00:00:12 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:04 verbose #1821 > 00:00:12 verbose #7 ! validate(nb)
00:01:06 verbose #1822 > 00:00:14 verbose #8 ! [NbConvertApp] Writing 361317 bytes to c:\home\git\polyglot\lib\spiral\rust.dib.html
00:01:06 verbose #1823 > 00:00:15 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639
00:01:06 verbose #1824 > 00:00:15 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639
00:01:06 verbose #1825 > 00:00:15 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:07 verbose #1826 > 00:00:16 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:07 verbose #1827 > 00:00:16 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:08 verbose #1828 > 00:00:16 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 27441
00:01:08 debug #1829 execute_with_options_async / exit_code: 0 / output.Length: 30720
00:01:08 debug #4 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path rust.dib --retries 3
00:01:08 debug #1830 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path testing.dib --retries 3",
[||], None, None, true, None)
00:01:08 verbose #1831 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "testing.dib", "--retries", "3"])
00:01:08 verbose #1832 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/testing.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/testing.dib" --output-path "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:10 verbose #1833 > >
00:01:10 verbose #1834 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:10 verbose #1835 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:10 verbose #1836 > > │ # testing │
00:01:10 verbose #1837 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:11 verbose #1838 > >
00:01:11 verbose #1839 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:11 verbose #1840 > > inl __expect fn log name b a =
00:01:11 verbose #1841 > > inl result = fn a b
00:01:11 verbose #1842 > > inl result =
00:01:11 verbose #1843 > > result || join result
00:01:11 verbose #1844 > > if log |> not
00:01:11 verbose #1845 > > then "__expect"
00:01:11 verbose #1846 > > else
00:01:11 verbose #1847 > > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"'
00:01:11 verbose #1848 > > text |> console.write_line
00:01:11 verbose #1849 > > text
00:01:11 verbose #1850 > > |> assert result
00:01:11 verbose #1851 > >
00:01:11 verbose #1852 > > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |>
00:01:11 verbose #1853 > > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a
00:01:11 verbose #1854 > > inl _assert_approx_eq e b a = __assert_approx_eq true e b a
00:01:11 verbose #1855 > >
00:01:11 verbose #1856 > > inl __assert_eq log b a = __expect (=) log "assert_eq" b a
00:01:11 verbose #1857 > > inl _assert_eq b a = __assert_eq true b a
00:01:11 verbose #1858 > >
00:01:11 verbose #1859 > > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a
00:01:11 verbose #1860 > > inl _assert_eq' b a = __assert_eq' true b a
00:01:11 verbose #1861 > >
00:01:11 verbose #1862 > > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a
00:01:11 verbose #1863 > > inl _assert_ne b a = __assert_ne true b a
00:01:11 verbose #1864 > >
00:01:11 verbose #1865 > > inl __assert_gt log b a = __expect (>) log "assert_gt" b a
00:01:11 verbose #1866 > > inl _assert_gt b a = __assert_gt true b a
00:01:11 verbose #1867 > >
00:01:11 verbose #1868 > > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a
00:01:11 verbose #1869 > > inl _assert_ge b a = __assert_ge true b a
00:01:11 verbose #1870 > >
00:01:11 verbose #1871 > > inl __assert_lt log b a = __expect (<) log "assert_lt" b a
00:01:11 verbose #1872 > > inl _assert_lt b a = __assert_lt true b a
00:01:11 verbose #1873 > >
00:01:11 verbose #1874 > > inl __assert_le log b a = __expect (<=) log "assert_le" b a
00:01:11 verbose #1875 > > inl _assert_le b a = __assert_le true b a
00:01:11 verbose #1876 > >
00:01:11 verbose #1877 > > inl __assert_contains forall t. log (b : t) a =
00:01:11 verbose #1878 > > __expect
00:01:11 verbose #1879 > > fun a b =>
00:01:11 verbose #1880 > > a
00:01:11 verbose #1881 > > |> $'List.ofSeq'
00:01:11 verbose #1882 > > |> fun x => x : listm'.list' t
00:01:11 verbose #1883 > > |> $'List.tryFind' ((=) b)
00:01:11 verbose #1884 > > |> optionm'.unbox
00:01:11 verbose #1885 > > |> fun (x : _ t) => x <> None
00:01:11 verbose #1886 > > log "assert_contains" b a
00:01:11 verbose #1887 > > inl _assert_contains b a = __assert_contains true b a
00:01:11 verbose #1888 > >
00:01:11 verbose #1889 > > inl __assert_string_contains log b a = __expect sm'.contains log
00:01:11 verbose #1890 > > "assert_string_contains" a b
00:01:11 verbose #1891 > > inl _assert_string_contains b a = __assert_string_contains true b a
00:01:11 verbose #1892 > >
00:01:11 verbose #1893 > > inl _throws (fn : () -> ()) : option exn =
00:01:11 verbose #1894 > > inl none = None : option exn
00:01:11 verbose #1895 > > inl some (s : exn) = Some s
00:01:11 verbose #1896 > > $'try !fn (); !none with ex -> ex |> !some '
00:01:11 verbose #1897 > >
00:01:11 verbose #1898 > > inl __assert_between log a b actual =
00:01:11 verbose #1899 > > inl assert_between actual (a, b) =
00:01:11 verbose #1900 > > __assert_ge false a actual
00:01:11 verbose #1901 > > __assert_le false b actual
00:01:11 verbose #1902 > > true
00:01:11 verbose #1903 > > __expect assert_between log "assert_between" (a, b) actual
00:01:11 verbose #1904 > > inl _assert_between a b actual = __assert_between true a b actual
00:01:11 verbose #1905 > >
00:01:11 verbose #1906 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:11 verbose #1907 > > #r
00:01:11 verbose #1908 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:11 verbose #1909 > > otNet.Interactive.Spiral.dll"
00:01:11 verbose #1910 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:01:11 verbose #1911 > > #r
00:01:11 verbose #1912 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:11 verbose #1913 > > otNet.Interactive.dll"
00:01:11 verbose #1914 > > open type Microsoft.DotNet.Interactive.Kernel
00:01:15 verbose #1915 > >
00:01:15 verbose #1916 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:15 verbose #1917 > > inl __expect fn log name b a =
00:01:15 verbose #1918 > > inl result = fn a b
00:01:15 verbose #1919 > > inl result =
00:01:15 verbose #1920 > > result || join result
00:01:15 verbose #1921 > > if log |> not
00:01:15 verbose #1922 > > then "__expect"
00:01:15 verbose #1923 > > else
00:01:15 verbose #1924 > > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"'
00:01:15 verbose #1925 > > text |> console.write_line
00:01:15 verbose #1926 > > text
00:01:15 verbose #1927 > > |> assert result
00:01:15 verbose #1928 > >
00:01:15 verbose #1929 > > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |>
00:01:15 verbose #1930 > > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a
00:01:15 verbose #1931 > > inl _assert_approx_eq e b a = __assert_approx_eq true e b a
00:01:15 verbose #1932 > >
00:01:15 verbose #1933 > > inl __assert_eq log b a = __expect (=) log "assert_eq" b a
00:01:15 verbose #1934 > > inl _assert_eq b a = __assert_eq true b a
00:01:15 verbose #1935 > >
00:01:15 verbose #1936 > > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a
00:01:15 verbose #1937 > > inl _assert_eq' b a = __assert_eq' true b a
00:01:15 verbose #1938 > >
00:01:15 verbose #1939 > > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a
00:01:15 verbose #1940 > > inl _assert_ne b a = __assert_ne true b a
00:01:15 verbose #1941 > >
00:01:15 verbose #1942 > > inl __assert_gt log b a = __expect (>) log "assert_gt" b a
00:01:15 verbose #1943 > > inl _assert_gt b a = __assert_gt true b a
00:01:15 verbose #1944 > >
00:01:15 verbose #1945 > > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a
00:01:15 verbose #1946 > > inl _assert_ge b a = __assert_ge true b a
00:01:15 verbose #1947 > >
00:01:15 verbose #1948 > > inl __assert_lt log b a = __expect (<) log "assert_lt" b a
00:01:15 verbose #1949 > > inl _assert_lt b a = __assert_lt true b a
00:01:15 verbose #1950 > >
00:01:15 verbose #1951 > > inl __assert_le log b a = __expect (<=) log "assert_le" b a
00:01:15 verbose #1952 > > inl _assert_le b a = __assert_le true b a
00:01:15 verbose #1953 > >
00:01:15 verbose #1954 > > inl __assert_contains forall t. log (b : t) a =
00:01:15 verbose #1955 > > __expect
00:01:15 verbose #1956 > > fun a b =>
00:01:15 verbose #1957 > > a
00:01:15 verbose #1958 > > |> $'List.ofSeq'
00:01:15 verbose #1959 > > |> fun x => x : listm'.list' t
00:01:15 verbose #1960 > > |> $'List.tryFind' ((=) b)
00:01:15 verbose #1961 > > |> optionm'.unbox
00:01:15 verbose #1962 > > |> fun (x : _ t) => x <> None
00:01:15 verbose #1963 > > log "as...
00:01:16 verbose #1964 > >
00:01:16 verbose #1965 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:16 verbose #1966 > > //// test
00:01:16 verbose #1967 > >
00:01:16 verbose #1968 > > 1f64
00:01:16 verbose #1969 > > |> _assert_approx_eq (Some 3) 2
00:01:17 verbose #1970 > >
00:01:17 verbose #1971 > > ╭─[ 702.47ms - stdout ]────────────────────────────────────────────────────────╮
00:01:17 verbose #1972 > > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │
00:01:17 verbose #1973 > > │ │
00:01:17 verbose #1974 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:17 verbose #1975 > >
00:01:17 verbose #1976 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:17 verbose #1977 > > //// test
00:01:17 verbose #1978 > >
00:01:17 verbose #1979 > > "abcd"
00:01:17 verbose #1980 > > |> _assert_contains 'b'
00:01:17 verbose #1981 > >
00:01:17 verbose #1982 > > ╭─[ 796.46ms - stdout ]────────────────────────────────────────────────────────╮
00:01:17 verbose #1983 > > │ assert_contains / actual: "abcd" / expected: 'b' │
00:01:17 verbose #1984 > > │ │
00:01:17 verbose #1985 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:17 verbose #1986 > >
00:01:17 verbose #1987 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:17 verbose #1988 > > //// test
00:01:17 verbose #1989 > >
00:01:17 verbose #1990 > > (dyn 1f64)
00:01:17 verbose #1991 > > |> _assert_approx_eq (Some 3) 2
00:01:18 verbose #1992 > >
00:01:18 verbose #1993 > > ╭─[ 105.45ms - stdout ]────────────────────────────────────────────────────────╮
00:01:18 verbose #1994 > > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │
00:01:18 verbose #1995 > > │ │
00:01:18 verbose #1996 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:18 verbose #1997 > >
00:01:18 verbose #1998 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:18 verbose #1999 > > inl print_and_return x =
00:01:18 verbose #2000 > > $'printfn $"print_and_return / x: {!x}"'
00:01:18 verbose #2001 > > x
00:01:18 verbose #2002 > 00:00:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 6114
00:01:18 verbose #2003 > 00:00:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:21 verbose #2004 > 00:00:13 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/testing.dib.ipynb to html
00:01:21 verbose #2005 > 00:00:13 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:21 verbose #2006 > 00:00:13 verbose #7 ! validate(nb)
00:01:22 verbose #2007 > 00:00:14 verbose #8 ! [NbConvertApp] Writing 286919 bytes to c:\home\git\polyglot\lib\spiral\testing.dib.html
00:01:22 verbose #2008 > 00:00:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645
00:01:22 verbose #2009 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645
00:01:22 verbose #2010 > 00:00:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:24 verbose #2011 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:24 verbose #2012 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:24 verbose #2013 > 00:00:16 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 6818
00:01:24 debug #2014 execute_with_options_async / exit_code: 0 / output.Length: 9392
00:01:24 debug #5 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path testing.dib --retries 3
00:01:24 debug #2015 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path guid.dib --retries 3",
[||], None, None, true, None)
00:01:24 verbose #2016 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "guid.dib", "--retries", "3"])
00:01:24 verbose #2017 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/guid.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/guid.dib" --output-path "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:27 verbose #2018 > >
00:01:27 verbose #2019 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:27 verbose #2020 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:27 verbose #2021 > > │ # guid │
00:01:27 verbose #2022 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:27 verbose #2023 > >
00:01:27 verbose #2024 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:27 verbose #2025 > > //// test
00:01:27 verbose #2026 > >
00:01:27 verbose #2027 > > open testing
00:01:27 verbose #2028 > >
00:01:27 verbose #2029 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:27 verbose #2030 > > #r
00:01:27 verbose #2031 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:27 verbose #2032 > > otNet.Interactive.Spiral.dll"
00:01:27 verbose #2033 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:01:27 verbose #2034 > > #r
00:01:27 verbose #2035 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:27 verbose #2036 > > otNet.Interactive.dll"
00:01:27 verbose #2037 > > open type Microsoft.DotNet.Interactive.Kernel
00:01:32 verbose #2038 > >
00:01:32 verbose #2039 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:32 verbose #2040 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:32 verbose #2041 > > │ ## guid │
00:01:32 verbose #2042 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:32 verbose #2043 > >
00:01:32 verbose #2044 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:32 verbose #2045 > > nominal guid = $'System.Guid'
00:01:32 verbose #2046 > >
00:01:32 verbose #2047 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:32 verbose #2048 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:32 verbose #2049 > > │ ## new_guid │
00:01:32 verbose #2050 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:32 verbose #2051 > >
00:01:32 verbose #2052 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:32 verbose #2053 > > inl new_guid (x : string) : guid =
00:01:32 verbose #2054 > > x |> convert
00:01:32 verbose #2055 > >
00:01:32 verbose #2056 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:32 verbose #2057 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:32 verbose #2058 > > │ ## new_raw_guid │
00:01:32 verbose #2059 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:32 verbose #2060 > >
00:01:32 verbose #2061 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:32 verbose #2062 > > inl new_raw_guid () : guid =
00:01:32 verbose #2063 > > $'System.Guid.NewGuid' ()
00:01:32 verbose #2064 > >
00:01:32 verbose #2065 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:32 verbose #2066 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:32 verbose #2067 > > │ ## main │
00:01:32 verbose #2068 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:32 verbose #2069 > >
00:01:32 verbose #2070 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:32 verbose #2071 > > inl main () =
00:01:32 verbose #2072 > > $'let new_guid x = !new_guid x' : ()
00:01:32 verbose #2073 > > $'let new_raw_guid x = !new_raw_guid x' : ()
00:01:33 verbose #2074 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 2715
00:01:33 verbose #2075 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:36 verbose #2076 > 00:00:11 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/guid.dib.ipynb to html
00:01:36 verbose #2077 > 00:00:11 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:36 verbose #2078 > 00:00:11 verbose #7 ! validate(nb)
00:01:37 verbose #2079 > 00:00:12 verbose #8 ! [NbConvertApp] Writing 276422 bytes to c:\home\git\polyglot\lib\spiral\guid.dib.html
00:01:37 verbose #2080 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639
00:01:37 verbose #2081 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639
00:01:37 verbose #2082 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:38 verbose #2083 > 00:00:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:38 verbose #2084 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:39 verbose #2085 > 00:00:14 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 3413
00:01:39 debug #2086 execute_with_options_async / exit_code: 0 / output.Length: 5734
00:01:39 debug #6 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path guid.dib --retries 3
00:01:39 debug #2087 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path async.dib --retries 3",
[||], None, None, true, None)
00:01:39 verbose #2088 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "async.dib", "--retries", "3"])
00:01:39 verbose #2089 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/async.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/async.dib" --output-path "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:42 verbose #2090 > >
00:01:42 verbose #2091 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:42 verbose #2092 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:42 verbose #2093 > > │ # async │
00:01:42 verbose #2094 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:42 verbose #2095 > >
00:01:42 verbose #2096 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:42 verbose #2097 > > //// test
00:01:42 verbose #2098 > >
00:01:42 verbose #2099 > > open testing
00:01:42 verbose #2100 > >
00:01:42 verbose #2101 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:42 verbose #2102 > > #r
00:01:42 verbose #2103 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:42 verbose #2104 > > otNet.Interactive.Spiral.dll"
00:01:42 verbose #2105 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:01:42 verbose #2106 > > #r
00:01:42 verbose #2107 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:42 verbose #2108 > > otNet.Interactive.dll"
00:01:42 verbose #2109 > > open type Microsoft.DotNet.Interactive.Kernel
00:01:47 verbose #2110 > >
00:01:47 verbose #2111 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2112 > > open rust_operators
00:01:47 verbose #2113 > >
00:01:47 verbose #2114 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2115 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2116 > > │ ## types │
00:01:47 verbose #2117 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2118 > >
00:01:47 verbose #2119 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2120 > > inl types () =
00:01:47 verbose #2121 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2122 > > Fable.Core.Emit(\"async_std::task::JoinHandle<$0>\")>]]\n#endif\ntype
00:01:47 verbose #2123 > > async_std_task_JoinHandle<'T> = class end"
00:01:47 verbose #2124 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2125 > > Fable.Core.Emit(\"std::future::Future<Output = $0>\")>]]\n#endif\ntype
00:01:47 verbose #2126 > > std_future_Future<'T> = class end"
00:01:47 verbose #2127 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2128 > > Fable.Core.Emit(\"rayon::vec::IntoIter<$0>\")>]]\n#endif\ntype
00:01:47 verbose #2129 > > rayon_vec_IntoIter<'T> = class end"
00:01:47 verbose #2130 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2131 > > Fable.Core.Emit(\"rayon::iter::Map<$0, _>\")>]]\n#endif\ntype rayon_iter_Map<'T>
00:01:47 verbose #2132 > > = class end"
00:01:47 verbose #2133 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2134 > > Fable.Core.Emit(\"futures_lite::stream::StreamExt\")>]]\n#endif\ntype
00:01:47 verbose #2135 > > futures_lite_stream_StreamExt = class end"
00:01:47 verbose #2136 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2137 > > Fable.Core.Emit(\"futures::future::TryJoinAll<$0>\")>]]\n#endif\ntype
00:01:47 verbose #2138 > > futures_future_TryJoinAll<'T> = class end"
00:01:47 verbose #2139 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2140 > > Fable.Core.Emit(\"futures::future::Fuse<$0>\")>]]\n#endif\ntype
00:01:47 verbose #2141 > > futures_future_Fuse<'T> = class end"
00:01:47 verbose #2142 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:47 verbose #2143 > > Fable.Core.Emit(\"futures::future::JoinAll<$0>\")>]]\n#endif\ntype
00:01:47 verbose #2144 > > futures_future_JoinAll<'T> = class end"
00:01:47 verbose #2145 > >
00:01:47 verbose #2146 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2147 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2148 > > │ ## async │
00:01:47 verbose #2149 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2150 > >
00:01:47 verbose #2151 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2152 > > nominal async t = $'Async<`t>'
00:01:47 verbose #2153 > >
00:01:47 verbose #2154 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2155 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2156 > > │ ## task │
00:01:47 verbose #2157 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2158 > >
00:01:47 verbose #2159 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2160 > > nominal task t =
00:01:47 verbose #2161 > > `(
00:01:47 verbose #2162 > > typecase t with
00:01:47 verbose #2163 > > | () => $'' : $'System.Threading.Tasks.Task'
00:01:47 verbose #2164 > > | _ => $'' : $'System.Threading.Tasks.Task<`t>'
00:01:47 verbose #2165 > > )
00:01:47 verbose #2166 > >
00:01:47 verbose #2167 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2168 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2169 > > │ ## future │
00:01:47 verbose #2170 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2171 > >
00:01:47 verbose #2172 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2173 > > nominal future t = $'std_future_Future<`t>'
00:01:47 verbose #2174 > >
00:01:47 verbose #2175 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2176 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2177 > > │ ## future_pin │
00:01:47 verbose #2178 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2179 > >
00:01:47 verbose #2180 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2181 > > type future_pin t = rust.pin (rust.box (rust.dyn' (future t)))
00:01:47 verbose #2182 > >
00:01:47 verbose #2183 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2184 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2185 > > │ ## future_pin_send │
00:01:47 verbose #2186 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2187 > >
00:01:47 verbose #2188 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2189 > > type future_pin_send t = rust.pin (rust.box (rust.send (rust.dyn' (future t))))
00:01:47 verbose #2190 > >
00:01:47 verbose #2191 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2192 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2193 > > │ ## block_on │
00:01:47 verbose #2194 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2195 > >
00:01:47 verbose #2196 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2197 > > inl block_on forall t. (fn : future_pin t) : t =
00:01:47 verbose #2198 > > !\\(fn, $'"futures_lite::future::block_on($0)"')
00:01:47 verbose #2199 > >
00:01:47 verbose #2200 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2201 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2202 > > │ ## block_on_send │
00:01:47 verbose #2203 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2204 > >
00:01:47 verbose #2205 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2206 > > inl block_on_send forall t. (fn : future_pin_send t) : t =
00:01:47 verbose #2207 > > !\($'"futures_lite::future::block_on(!fn)"')
00:01:47 verbose #2208 > >
00:01:47 verbose #2209 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2210 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2211 > > │ ## stream_ext │
00:01:47 verbose #2212 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2213 > >
00:01:47 verbose #2214 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2215 > > nominal stream_ext = $'futures_lite_stream_StreamExt'
00:01:47 verbose #2216 > >
00:01:47 verbose #2217 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2218 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2219 > > │ ## join_handle │
00:01:47 verbose #2220 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2221 > >
00:01:47 verbose #2222 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2223 > > nominal join_handle t = $'async_std_task_JoinHandle<`t>'
00:01:47 verbose #2224 > >
00:01:47 verbose #2225 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2226 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2227 > > │ ## spawn │
00:01:47 verbose #2228 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2229 > >
00:01:47 verbose #2230 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2231 > > inl spawn forall t. (fn : future_pin_send t) : join_handle t =
00:01:47 verbose #2232 > > !\($'"async_std::task::spawn(!fn)"')
00:01:47 verbose #2233 > >
00:01:47 verbose #2234 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2235 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2236 > > │ ## try_join_all │
00:01:47 verbose #2237 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2238 > >
00:01:47 verbose #2239 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2240 > > nominal try_join_all t = $'futures_future_TryJoinAll<`t>'
00:01:47 verbose #2241 > >
00:01:47 verbose #2242 > > inl try_join_all forall t. (x : am'.vec (future_pin (resultm.result' t
00:01:47 verbose #2243 > > sm'.std_string))) : try_join_all (future_pin (resultm.result' t sm'.std_string))
00:01:47 verbose #2244 > > =
00:01:47 verbose #2245 > > inl x = join x
00:01:47 verbose #2246 > > !\($'"futures::future::try_join_all(!x)"')
00:01:47 verbose #2247 > >
00:01:47 verbose #2248 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2249 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2250 > > │ ## fuse │
00:01:47 verbose #2251 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2252 > >
00:01:47 verbose #2253 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2254 > > nominal fuse t = $'futures_future_Fuse<`t>'
00:01:47 verbose #2255 > >
00:01:47 verbose #2256 > > inl future_fuse forall t. (x : future_pin t) : fuse (future_pin t) =
00:01:47 verbose #2257 > > !\($'"futures::future::FutureExt::fuse(!x)"')
00:01:47 verbose #2258 > >
00:01:47 verbose #2259 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2260 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2261 > > │ ## join_all │
00:01:47 verbose #2262 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2263 > >
00:01:47 verbose #2264 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2265 > > nominal join_all t = $'futures_future_JoinAll<`t>'
00:01:47 verbose #2266 > >
00:01:47 verbose #2267 > > inl join_all forall t. (x : am'.vec (future_pin t)) : join_all (future_pin t) =
00:01:47 verbose #2268 > > inl x = join x
00:01:47 verbose #2269 > > !\($'"futures::future::join_all(!x)"')
00:01:47 verbose #2270 > >
00:01:47 verbose #2271 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2272 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2273 > > │ ## join_all_send │
00:01:47 verbose #2274 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2275 > >
00:01:47 verbose #2276 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2277 > > inl join_all_send forall t. (x : am'.vec (future_pin_send t)) : join_all
00:01:47 verbose #2278 > > (future_pin_send t) =
00:01:47 verbose #2279 > > inl x = join x
00:01:47 verbose #2280 > > !\($'"futures::future::join_all(!x)"')
00:01:47 verbose #2281 > >
00:01:47 verbose #2282 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2283 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2284 > > │ ## await_handle │
00:01:47 verbose #2285 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2286 > >
00:01:47 verbose #2287 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2288 > > inl await_handle forall t. (x : join_handle t) : t =
00:01:47 verbose #2289 > > !\($'"!x.await"')
00:01:47 verbose #2290 > >
00:01:47 verbose #2291 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2292 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2293 > > │ ## await_all │
00:01:47 verbose #2294 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2295 > >
00:01:47 verbose #2296 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2297 > > inl await_all forall t. (x : join_all (future_pin t)) : am'.vec t =
00:01:47 verbose #2298 > > !\($'"!x.await"')
00:01:47 verbose #2299 > >
00:01:47 verbose #2300 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2301 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2302 > > │ ## await_all_send │
00:01:47 verbose #2303 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2304 > >
00:01:47 verbose #2305 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2306 > > inl await_all_send forall t. (x : join_all (future_pin_send t)) : am'.vec t =
00:01:47 verbose #2307 > > !\($'"!x.await"')
00:01:47 verbose #2308 > >
00:01:47 verbose #2309 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2310 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2311 > > │ ## try_await_all │
00:01:47 verbose #2312 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2313 > >
00:01:47 verbose #2314 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2315 > > inl try_await_all forall t. (x : try_join_all (future_pin (resultm.result' t
00:01:47 verbose #2316 > > sm'.std_string))) : resultm.result' (am'.vec t) sm'.std_string =
00:01:47 verbose #2317 > > !\($'"!x.await"')
00:01:47 verbose #2318 > >
00:01:47 verbose #2319 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2320 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2321 > > │ ## try_await_all_send │
00:01:47 verbose #2322 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2323 > >
00:01:47 verbose #2324 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2325 > > inl try_await_all_send forall t. (x : try_join_all (future_pin_send
00:01:47 verbose #2326 > > (resultm.result' t sm'.std_string))) : resultm.result' (am'.vec t)
00:01:47 verbose #2327 > > sm'.std_string =
00:01:47 verbose #2328 > > !\($'"!x.await"')
00:01:47 verbose #2329 > >
00:01:47 verbose #2330 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2331 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2332 > > │ ## await │
00:01:47 verbose #2333 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2334 > >
00:01:47 verbose #2335 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2336 > > inl await forall t. (x : future_pin t) : t =
00:01:47 verbose #2337 > > !\($'"!x.await"')
00:01:47 verbose #2338 > >
00:01:47 verbose #2339 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2340 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2341 > > │ ## await │
00:01:47 verbose #2342 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2343 > >
00:01:47 verbose #2344 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2345 > > inl await_send forall t. (x : future_pin_send t) : t =
00:01:47 verbose #2346 > > !\($'"!x.await"')
00:01:48 verbose #2347 > >
00:01:48 verbose #2348 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2349 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2350 > > │ ## into_iter │
00:01:48 verbose #2351 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2352 > >
00:01:48 verbose #2353 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2354 > > nominal into_iter t = $'rayon_vec_IntoIter<`t>'
00:01:48 verbose #2355 > >
00:01:48 verbose #2356 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2357 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2358 > > │ ## into_par_iter │
00:01:48 verbose #2359 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2360 > >
00:01:48 verbose #2361 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2362 > > inl into_par_iter forall t. (x : am'.vec t) : into_iter t =
00:01:48 verbose #2363 > > !\($'"rayon::iter::IntoParallelIterator::into_par_iter(!x)"')
00:01:48 verbose #2364 > >
00:01:48 verbose #2365 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2366 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2367 > > │ ## par_iter │
00:01:48 verbose #2368 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2369 > >
00:01:48 verbose #2370 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2371 > > inl par_iter forall t. (x : am'.vec t) : into_iter t =
00:01:48 verbose #2372 > > !\($'"rayon::iter::IntoParallelIterator::par_iter(!x)"')
00:01:48 verbose #2373 > >
00:01:48 verbose #2374 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2375 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2376 > > │ ## iter_map │
00:01:48 verbose #2377 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2378 > >
00:01:48 verbose #2379 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2380 > > nominal iter_map t u = $'rayon_iter_Map<`t>'
00:01:48 verbose #2381 > >
00:01:48 verbose #2382 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2383 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2384 > > │ ## par_map │
00:01:48 verbose #2385 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2386 > >
00:01:48 verbose #2387 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2388 > > inl par_map forall t u. (fn : t -> u) (ar : into_iter t) : iter_map (into_iter
00:01:48 verbose #2389 > > t) u =
00:01:48 verbose #2390 > > !\\((ar, fn), $'"rayon::iter::ParallelIterator::map($0, |x| $1(x))"')
00:01:48 verbose #2391 > >
00:01:48 verbose #2392 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2393 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2394 > > │ ## par_collect │
00:01:48 verbose #2395 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2396 > >
00:01:48 verbose #2397 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2398 > > inl par_collect forall t u. (iter : iter_map (into_iter t) u) : am'.vec u =
00:01:48 verbose #2399 > > !\\(iter, $'"rayon::iter::ParallelIterator::collect($0)"')
00:01:48 verbose #2400 > >
00:01:48 verbose #2401 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2402 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2403 > > │ ## try_join_all_iter │
00:01:48 verbose #2404 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2405 > >
00:01:48 verbose #2406 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2407 > > inl try_join_all_iter forall t. (x : am'.vec (future_pin_send (resultm.result' t
00:01:48 verbose #2408 > > sm'.std_string))) : try_join_all (future_pin_send (resultm.result' t
00:01:48 verbose #2409 > > sm'.std_string)) =
00:01:48 verbose #2410 > > inl x = join x
00:01:48 verbose #2411 > > !\($'"futures::future::try_join_all(!x)"')
00:01:48 verbose #2412 > >
00:01:48 verbose #2413 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2414 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2415 > > │ ## new_future │
00:01:48 verbose #2416 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2417 > >
00:01:48 verbose #2418 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2419 > > inl new_future forall t. (x : () -> t) : future_pin t =
00:01:48 verbose #2420 > > join
00:01:48 verbose #2421 > > !\($'"{Box::pin(async { //"')
00:01:48 verbose #2422 > > x () |> fun x => join $'!x '
00:01:48 verbose #2423 > > !\($'"}}) //"')
00:01:48 verbose #2424 > >
00:01:48 verbose #2425 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2426 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2427 > > │ ## new_future_move │
00:01:48 verbose #2428 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2429 > >
00:01:48 verbose #2430 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2431 > > inl new_future_move forall t. (x : () -> t) : future_pin t =
00:01:48 verbose #2432 > > join
00:01:48 verbose #2433 > > !\($'"{Box::pin(async move { //"')
00:01:48 verbose #2434 > > x () |> fun x => join $'!x '
00:01:48 verbose #2435 > > !\($'"}}) //"')
00:01:48 verbose #2436 > >
00:01:48 verbose #2437 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2438 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2439 > > │ ## future_init │
00:01:48 verbose #2440 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2441 > >
00:01:48 verbose #2442 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2443 > > inl future_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) :
00:01:48 verbose #2444 > > future_pin t =
00:01:48 verbose #2445 > > // join
00:01:48 verbose #2446 > > // if flag = 1
00:01:48 verbose #2447 > > // then new_future_move x
00:01:48 verbose #2448 > > // else new_future x
00:01:48 verbose #2449 > > if flag = 1
00:01:48 verbose #2450 > > then !\($'"let __result = Box::pin(async move { //"')
00:01:48 verbose #2451 > > else !\($'"let __result = Box::pin(async { //"')
00:01:48 verbose #2452 > >
00:01:48 verbose #2453 > > let x' = x ()
00:01:48 verbose #2454 > > inl x' = join x'
00:01:48 verbose #2455 > >
00:01:48 verbose #2456 > > x' |> rust.fix_closure depth
00:01:48 verbose #2457 > >
00:01:48 verbose #2458 > > !\($'"__result"')
00:01:48 verbose #2459 > >
00:01:48 verbose #2460 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2461 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2462 > > │ ## future_init_send │
00:01:48 verbose #2463 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2464 > >
00:01:48 verbose #2465 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2466 > > inl future_init_send forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) :
00:01:48 verbose #2467 > > future_pin_send t =
00:01:48 verbose #2468 > > // join
00:01:48 verbose #2469 > > // if flag = 1
00:01:48 verbose #2470 > > // then new_future_move x
00:01:48 verbose #2471 > > // else new_future x
00:01:48 verbose #2472 > > join
00:01:48 verbose #2473 > > if flag = 1
00:01:48 verbose #2474 > > then !\($'"let __result = Box::pin(async move { //"')
00:01:48 verbose #2475 > > else !\($'"let __result = Box::pin(async { //"')
00:01:48 verbose #2476 > >
00:01:48 verbose #2477 > > let x' = x ()
00:01:48 verbose #2478 > > inl x' = join x'
00:01:48 verbose #2479 > >
00:01:48 verbose #2480 > > x' |> rust.fix_closure depth
00:01:48 verbose #2481 > >
00:01:48 verbose #2482 > > !\($'"__result"')
00:01:48 verbose #2483 > >
00:01:48 verbose #2484 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2485 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2486 > > │ ## new_future_move_init │
00:01:48 verbose #2487 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2488 > >
00:01:48 verbose #2489 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2490 > > inl new_future_move_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t)
00:01:48 verbose #2491 > > : future_pin t =
00:01:48 verbose #2492 > > future_init depth flag x
00:01:48 verbose #2493 > > // join
00:01:48 verbose #2494 > > // !\($'"{Box::pin(async move { //"')
00:01:48 verbose #2495 > > // inl x' = x () |> fun x => join $'!x '
00:01:48 verbose #2496 > >
00:01:48 verbose #2497 > > // inl depth = depth |> fst
00:01:48 verbose #2498 > > // if depth = 1
00:01:48 verbose #2499 > > // then !\($'"!x' })"')
00:01:48 verbose #2500 > > // elif depth = 2
00:01:48 verbose #2501 > > // then !\($'"!x' }})"')
00:01:48 verbose #2502 > > // elif depth = 3
00:01:48 verbose #2503 > > // then !\($'"!x' }}})"')
00:01:48 verbose #2504 > > // elif depth = 4
00:01:48 verbose #2505 > > // then !\($'"!x' }}}})"')
00:01:48 verbose #2506 > >
00:01:48 verbose #2507 > > // !\($'"// 1"')
00:01:48 verbose #2508 > >
00:01:48 verbose #2509 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2510 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2511 > > │ ## new_async_unit │
00:01:48 verbose #2512 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2513 > >
00:01:48 verbose #2514 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2515 > > inl new_async_unit forall t. (fn : () -> ()) : async t =
00:01:48 verbose #2516 > > run_target function
00:01:48 verbose #2517 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2518 > > inl result : optionm'.option' (async t) = optionm'.none' ()
00:01:48 verbose #2519 > > $'let mutable _!result = !result '
00:01:48 verbose #2520 > > $'async {'
00:01:48 verbose #2521 > > fn ()
00:01:48 verbose #2522 > > $'}'
00:01:48 verbose #2523 > > $'|> fun x -> _!result <- Some x'
00:01:48 verbose #2524 > > $'match _!result with Some x -> x | None -> failwith
00:01:48 verbose #2525 > > "async.new_async_unit / _!result=None"'
00:01:48 verbose #2526 > > | _ => fun () => null ()
00:01:48 verbose #2527 > >
00:01:48 verbose #2528 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2529 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2530 > > │ ## new_async │
00:01:48 verbose #2531 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2532 > >
00:01:48 verbose #2533 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2534 > > inl new_async forall t. (fn : () -> t) : async t =
00:01:48 verbose #2535 > > new_async_unit (fn >> ignore)
00:01:48 verbose #2536 > >
00:01:48 verbose #2537 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2538 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2539 > > │ ## new_task │
00:01:48 verbose #2540 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2541 > >
00:01:48 verbose #2542 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2543 > > inl new_task forall t. (fn : () -> t) : task t =
00:01:48 verbose #2544 > > run_target function
00:01:48 verbose #2545 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2546 > > inl result : optionm'.option' (task t) = optionm'.none' ()
00:01:48 verbose #2547 > > $'let mutable _!result = !result '
00:01:48 verbose #2548 > > $'task {'
00:01:48 verbose #2549 > > fn () |> ignore
00:01:48 verbose #2550 > > $'}'
00:01:48 verbose #2551 > > $'|> fun x -> _!result <- Some x'
00:01:48 verbose #2552 > > $'match _!result with Some x -> x | None -> failwith "async.new_task
00:01:48 verbose #2553 > > / _!result=None"'
00:01:48 verbose #2554 > > | _ => fun () => null ()
00:01:48 verbose #2555 > >
00:01:48 verbose #2556 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2557 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2558 > > │ ## await_task │
00:01:48 verbose #2559 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2560 > >
00:01:48 verbose #2561 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2562 > > inl await_task forall t. (a : task t) : async t =
00:01:48 verbose #2563 > > run_target function
00:01:48 verbose #2564 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2565 > > a |> $'Async.AwaitTask'
00:01:48 verbose #2566 > > | _ => fun () => null ()
00:01:48 verbose #2567 > >
00:01:48 verbose #2568 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2569 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2570 > > │ ## ignore │
00:01:48 verbose #2571 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2572 > >
00:01:48 verbose #2573 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2574 > > inl ignore forall t. (a : async t) : async () =
00:01:48 verbose #2575 > > run_target function
00:01:48 verbose #2576 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2577 > > a |> $'Async.Ignore'
00:01:48 verbose #2578 > > | _ => fun () => null ()
00:01:48 verbose #2579 > >
00:01:48 verbose #2580 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2581 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2582 > > │ ## run_synchronously │
00:01:48 verbose #2583 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2584 > >
00:01:48 verbose #2585 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2586 > > inl run_synchronously forall t. (a : async t) : t =
00:01:48 verbose #2587 > > run_target function
00:01:48 verbose #2588 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2589 > > a |> $'Async.RunSynchronously'
00:01:48 verbose #2590 > > | _ => fun () => null ()
00:01:48 verbose #2591 > >
00:01:48 verbose #2592 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2593 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2594 > > │ ## start │
00:01:48 verbose #2595 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2596 > >
00:01:48 verbose #2597 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2598 > > inl start (a : async ()) : () =
00:01:48 verbose #2599 > > run_target function
00:01:48 verbose #2600 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2601 > > a |> $'Async.Start'
00:01:48 verbose #2602 > > | _ => fun () => null ()
00:01:48 verbose #2603 > >
00:01:48 verbose #2604 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2605 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2606 > > │ ## start_child │
00:01:48 verbose #2607 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2608 > >
00:01:48 verbose #2609 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2610 > > inl start_child forall t. (a : async t) : async (async t) =
00:01:48 verbose #2611 > > run_target function
00:01:48 verbose #2612 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2613 > > a |> $'Async.StartChild'
00:01:48 verbose #2614 > > | _ => fun () => null ()
00:01:48 verbose #2615 > >
00:01:48 verbose #2616 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2617 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2618 > > │ ## start_child_timeout │
00:01:48 verbose #2619 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2620 > >
00:01:48 verbose #2621 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2622 > > inl start_child_timeout forall t. (timeout : i32) (a : async t) : async (async
00:01:48 verbose #2623 > > t) =
00:01:48 verbose #2624 > > run_target function
00:01:48 verbose #2625 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2626 > > $'Async.StartChild (!a, !timeout)'
00:01:48 verbose #2627 > > | _ => fun () => null ()
00:01:48 verbose #2628 > >
00:01:48 verbose #2629 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2630 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2631 > > │ ## start_immediate │
00:01:48 verbose #2632 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2633 > >
00:01:48 verbose #2634 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2635 > > inl start_immediate forall t. (a : async t) : () =
00:01:48 verbose #2636 > > run_target function
00:01:48 verbose #2637 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2638 > > a |> $'Async.StartImmediate'
00:01:48 verbose #2639 > > | _ => fun () => null ()
00:01:48 verbose #2640 > >
00:01:48 verbose #2641 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2642 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2643 > > │ ## task_canceled_exception │
00:01:48 verbose #2644 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2645 > >
00:01:48 verbose #2646 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2647 > > nominal task_canceled_exception =
00:01:48 verbose #2648 > > $'System.Threading.Tasks.TaskCanceledException'
00:01:48 verbose #2649 > >
00:01:48 verbose #2650 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2651 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2652 > > │ ## sleep │
00:01:48 verbose #2653 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2654 > >
00:01:48 verbose #2655 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2656 > > inl sleep (ms : i32) : async () =
00:01:48 verbose #2657 > > run_target function
00:01:48 verbose #2658 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2659 > > ms |> $'Async.Sleep'
00:01:48 verbose #2660 > > | _ => fun () => null ()
00:01:48 verbose #2661 > >
00:01:48 verbose #2662 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2663 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2664 > > │ ## do │
00:01:48 verbose #2665 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2666 > >
00:01:48 verbose #2667 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2668 > > inl do (a : async ()) : () =
00:01:48 verbose #2669 > > $'do\! !a '
00:01:48 verbose #2670 > >
00:01:48 verbose #2671 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2672 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2673 > > │ ## let' │
00:01:48 verbose #2674 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2675 > >
00:01:48 verbose #2676 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2677 > > inl let' forall t. (a : async t) : t =
00:01:48 verbose #2678 > > $'let\! !a = !a '
00:01:48 verbose #2679 > > $'!a '
00:01:48 verbose #2680 > >
00:01:48 verbose #2681 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2682 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2683 > > │ ## return_await │
00:01:48 verbose #2684 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2685 > >
00:01:48 verbose #2686 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2687 > > inl return_await forall t. (a : async t) : () =
00:01:48 verbose #2688 > > $'return\! !a '
00:01:48 verbose #2689 > >
00:01:48 verbose #2690 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2691 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2692 > > │ ## return_await' │
00:01:48 verbose #2693 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2694 > >
00:01:48 verbose #2695 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2696 > > inl return_await' forall t. (a : async t) : t =
00:01:48 verbose #2697 > > $'return\! !a '
00:01:48 verbose #2698 > >
00:01:48 verbose #2699 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2700 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2701 > > │ ## map │
00:01:48 verbose #2702 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2703 > >
00:01:48 verbose #2704 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2705 > > inl map forall t u. (fn : t -> u) (a : async t) : async u =
00:01:48 verbose #2706 > > fun () =>
00:01:48 verbose #2707 > > inl x = a |> let'
00:01:48 verbose #2708 > > fn x |> return
00:01:48 verbose #2709 > > |> new_async_unit
00:01:48 verbose #2710 > >
00:01:48 verbose #2711 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2712 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2713 > > │ ## choice │
00:01:48 verbose #2714 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2715 > >
00:01:48 verbose #2716 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2717 > > union choice t1 t2 =
00:01:48 verbose #2718 > > | Choice1Of2 : t1
00:01:48 verbose #2719 > > | Choice2Of2 : t2
00:01:48 verbose #2720 > >
00:01:48 verbose #2721 > > nominal choice' t1 t2 = $'Choice<`t1, `t2>'
00:01:48 verbose #2722 > >
00:01:48 verbose #2723 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2724 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2725 > > │ ## choice_unbox │
00:01:48 verbose #2726 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2727 > >
00:01:48 verbose #2728 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2729 > > inl choice_unbox forall t1 t2. (choice : choice' t1 t2) : choice t1 t2 =
00:01:48 verbose #2730 > > run_target function
00:01:48 verbose #2731 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2732 > > inl choice1Of2 (x : t1) : _ _ t2 = Choice1Of2 x
00:01:48 verbose #2733 > > inl choice2Of2 (x : t2) : _ t1 _ = Choice2Of2 x
00:01:48 verbose #2734 > > $'match !choice with Choice1Of2 x -> !choice1Of2 x | Choice2Of2 x ->
00:01:48 verbose #2735 > > !choice2Of2 x'
00:01:48 verbose #2736 > > | _ => fun () => null ()
00:01:48 verbose #2737 > >
00:01:48 verbose #2738 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2739 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2740 > > │ ## catch' │
00:01:48 verbose #2741 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2742 > >
00:01:48 verbose #2743 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2744 > > inl catch' forall t e. (a : async t) : async (choice' t e) =
00:01:48 verbose #2745 > > run_target function
00:01:48 verbose #2746 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2747 > > a |> $'Async.Catch'
00:01:48 verbose #2748 > > | _ => fun () => null ()
00:01:48 verbose #2749 > >
00:01:48 verbose #2750 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2751 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2752 > > │ ## catch │
00:01:48 verbose #2753 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2754 > >
00:01:48 verbose #2755 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2756 > > inl catch forall t e. (a : async t) : async (result t e) =
00:01:48 verbose #2757 > > a
00:01:48 verbose #2758 > > |> catch'
00:01:48 verbose #2759 > > |> map choice_unbox
00:01:48 verbose #2760 > > |> map function
00:01:48 verbose #2761 > > | Choice1Of2 result => Ok result
00:01:48 verbose #2762 > > | Choice2Of2 ex => Error ex
00:01:48 verbose #2763 > >
00:01:48 verbose #2764 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2765 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2766 > > │ ## run_with_timeout_async │
00:01:48 verbose #2767 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2768 > >
00:01:48 verbose #2769 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2770 > > inl run_with_timeout_async forall t. (timeout : i32) (fn : async t) : async
00:01:48 verbose #2771 > > (option t) =
00:01:48 verbose #2772 > > run_target function
00:01:48 verbose #2773 > > | Fsharp (Native) => fun () =>
00:01:48 verbose #2774 > > fun () =>
00:01:48 verbose #2775 > > inl _locals () = $'$"timeout: {!timeout} / {!_locals ()}"'
00:01:48 verbose #2776 > > inl child = fn |> start_child_timeout timeout |> let'
00:01:48 verbose #2777 > > child
00:01:48 verbose #2778 > > |> catch
00:01:48 verbose #2779 > > |> map function
00:01:48 verbose #2780 > > | Ok result => Some result
00:01:48 verbose #2781 > > | Error ex when ex |> sm'.format_debug |> sm'.contains
00:01:48 verbose #2782 > > "System.TimeoutException" =>
00:01:48 verbose #2783 > > trace Debug (fun () => $'"run_with_timeout_async"')
00:01:48 verbose #2784 > > _locals
00:01:48 verbose #2785 > > None
00:01:48 verbose #2786 > > | Error (ex : exn) =>
00:01:48 verbose #2787 > > inl ex = ex |> sm'.format_exception
00:01:48 verbose #2788 > > trace Critical (fun () => $'$"run_with_timeout_async**
00:01:48 verbose #2789 > > ex: {!ex}"') _locals
00:01:48 verbose #2790 > > None
00:01:48 verbose #2791 > > |> return_await
00:01:48 verbose #2792 > > |> new_async_unit
00:01:48 verbose #2793 > > | _ => fun () => null ()
00:01:48 verbose #2794 > >
00:01:48 verbose #2795 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2796 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2797 > > │ ## run_with_timeout │
00:01:48 verbose #2798 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2799 > >
00:01:48 verbose #2800 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2801 > > inl run_with_timeout timeout fn =
00:01:48 verbose #2802 > > fn
00:01:48 verbose #2803 > > |> run_with_timeout_async timeout
00:01:48 verbose #2804 > > |> run_synchronously
00:01:48 verbose #2805 > >
00:01:48 verbose #2806 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2807 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2808 > > │ ## cancellation_token │
00:01:48 verbose #2809 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2810 > >
00:01:48 verbose #2811 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2812 > > inl cancellation_token () : async threading.cancellation_token =
00:01:48 verbose #2813 > > $'Async.CancellationToken'
00:01:48 verbose #2814 > >
00:01:48 verbose #2815 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2816 > > inl default_cancellation_token () : threading.cancellation_token =
00:01:48 verbose #2817 > > $'Async.DefaultCancellationToken'
00:01:48 verbose #2818 > >
00:01:48 verbose #2819 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:48 verbose #2820 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:48 verbose #2821 > > │ ## merge_cancellation_token_with_default_async │
00:01:48 verbose #2822 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:48 verbose #2823 > >
00:01:48 verbose #2824 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:48 verbose #2825 > > inl merge_cancellation_token_with_default_async
00:01:48 verbose #2826 > > (token : threading.cancellation_token)
00:01:49 verbose #2827 > > : async threading.cancellation_token
00:01:49 verbose #2828 > > =
00:01:49 verbose #2829 > > run_target function
00:01:49 verbose #2830 > > | Fsharp (Native) => fun () =>
00:01:49 verbose #2831 > > fun () =>
00:01:49 verbose #2832 > > inl ct = cancellation_token () |> let'
00:01:49 verbose #2833 > > inl dct = default_cancellation_token ()
00:01:49 verbose #2834 > > inl cts = threading.create_linked_token_source ;[[ ct; dct;
00:01:49 verbose #2835 > > token ]]
00:01:49 verbose #2836 > > cts |> threading.cancellation_source_token |> return
00:01:49 verbose #2837 > > |> new_async_unit
00:01:49 verbose #2838 > > | _ => fun () => null ()
00:01:49 verbose #2839 > >
00:01:49 verbose #2840 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:49 verbose #2841 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:49 verbose #2842 > > │ ## with_trace_level │
00:01:49 verbose #2843 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:49 verbose #2844 > >
00:01:49 verbose #2845 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:49 verbose #2846 > > inl with_trace_level forall t. level fn : _ t = new_async fun () =>
00:01:49 verbose #2847 > > inl trace_state = get_trace_state_or_init None
00:01:49 verbose #2848 > > inl old_trace_level = *trace_state.level
00:01:49 verbose #2849 > > inl trace_level = trace_state.level
00:01:49 verbose #2850 > > try_finally
00:01:49 verbose #2851 > > fun () =>
00:01:49 verbose #2852 > > trace_level <- level
00:01:49 verbose #2853 > > fn |> return_await
00:01:49 verbose #2854 > > fun () =>
00:01:49 verbose #2855 > > trace_level <- old_trace_level
00:01:49 verbose #2856 > >
00:01:49 verbose #2857 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:49 verbose #2858 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:49 verbose #2859 > > │ ## value_task │
00:01:49 verbose #2860 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:49 verbose #2861 > >
00:01:49 verbose #2862 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:49 verbose #2863 > > nominal value_task = $'System.Threading.Tasks.ValueTask'
00:01:49 verbose #2864 > >
00:01:49 verbose #2865 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:49 verbose #2866 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:49 verbose #2867 > > │ ## value_task_as_task │
00:01:49 verbose #2868 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:49 verbose #2869 > >
00:01:49 verbose #2870 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:49 verbose #2871 > > inl value_task_as_task (task : value_task) : task () =
00:01:49 verbose #2872 > > $'!task.AsTask' ()
00:01:49 verbose #2873 > >
00:01:49 verbose #2874 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:49 verbose #2875 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:49 verbose #2876 > > │ ## await_value_task_unit │
00:01:49 verbose #2877 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:49 verbose #2878 > >
00:01:49 verbose #2879 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:49 verbose #2880 > > inl await_value_task_unit (task : value_task) : async () =
00:01:49 verbose #2881 > > task |> value_task_as_task |> await_task
00:01:49 verbose #2882 > >
00:01:49 verbose #2883 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:49 verbose #2884 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:49 verbose #2885 > > │ ## main │
00:01:49 verbose #2886 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:49 verbose #2887 > >
00:01:49 verbose #2888 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:49 verbose #2889 > > inl main () =
00:01:49 verbose #2890 > > types ()
00:01:49 verbose #2891 > > $'let merge_cancellation_token_with_default_async x =
00:01:49 verbose #2892 > > !merge_cancellation_token_with_default_async x' : ()
00:01:50 verbose #2893 > 00:00:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39866
00:01:50 verbose #2894 > 00:00:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/async.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:53 verbose #2895 > 00:00:13 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/async.dib.ipynb to html
00:01:53 verbose #2896 > 00:00:13 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:53 verbose #2897 > 00:00:13 verbose #7 ! validate(nb)
00:01:55 verbose #2898 > 00:00:15 verbose #8 ! [NbConvertApp] Writing 398904 bytes to c:\home\git\polyglot\lib\spiral\async.dib.html
00:01:55 verbose #2899 > 00:00:15 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 641
00:01:55 verbose #2900 > 00:00:15 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 641
00:01:55 verbose #2901 > 00:00:15 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:56 verbose #2902 > 00:00:17 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:56 verbose #2903 > 00:00:17 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:57 verbose #2904 > 00:00:17 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 40566
00:01:57 debug #2905 execute_with_options_async / exit_code: 0 / output.Length: 44392
00:01:57 debug #7 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path async.dib --retries 3
00:01:57 debug #2906 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path runtime.dib --retries 3",
[||], None, None, true, None)
00:01:57 verbose #2907 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "runtime.dib", "--retries", "3"])
00:01:57 verbose #2908 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/runtime.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/runtime.dib" --output-path "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:59 verbose #2909 > >
00:01:59 verbose #2910 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:59 verbose #2911 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:59 verbose #2912 > > │ # runtime │
00:01:59 verbose #2913 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:59 verbose #2914 > >
00:01:59 verbose #2915 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:59 verbose #2916 > > open rust_operators
00:01:59 verbose #2917 > > open sm'_operators
00:01:59 verbose #2918 > >
00:01:59 verbose #2919 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:02:00 verbose #2920 > > #r
00:02:00 verbose #2921 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:00 verbose #2922 > > otNet.Interactive.Spiral.dll"
00:02:00 verbose #2923 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:02:00 verbose #2924 > > #r
00:02:00 verbose #2925 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:00 verbose #2926 > > otNet.Interactive.dll"
00:02:00 verbose #2927 > > open type Microsoft.DotNet.Interactive.Kernel
00:02:05 verbose #2928 > >
00:02:05 verbose #2929 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #2930 > > //// test
00:02:05 verbose #2931 > >
00:02:05 verbose #2932 > > open testing
00:02:05 verbose #2933 > > open file_system_operators
00:02:05 verbose #2934 > >
00:02:05 verbose #2935 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #2936 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #2937 > > │ ## types │
00:02:05 verbose #2938 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #2939 > >
00:02:05 verbose #2940 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #2941 > > inl types () =
00:02:05 verbose #2942 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2943 > > Fable.Core.Emit(\"clap::Arg\")>]]\n#endif\ntype clap_Arg = class end"
00:02:05 verbose #2944 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2945 > > Fable.Core.Emit(\"clap::ArgAction\")>]]\n#endif\ntype clap_ArgAction = class
00:02:05 verbose #2946 > > end"
00:02:05 verbose #2947 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2948 > > Fable.Core.Emit(\"clap::Command\")>]]\n#endif\ntype clap_Command = class end"
00:02:05 verbose #2949 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2950 > > Fable.Core.Emit(\"clap::ArgMatches\")>]]\n#endif\ntype clap_ArgMatches = class
00:02:05 verbose #2951 > > end"
00:02:05 verbose #2952 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2953 > > Fable.Core.Emit(\"clap::builder::ValueRange\")>]]\n#endif\ntype
00:02:05 verbose #2954 > > clap_builder_ValueRange = class end"
00:02:05 verbose #2955 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2956 > > Fable.Core.Emit(\"clap::builder::ValueParser\")>]]\n#endif\ntype
00:02:05 verbose #2957 > > clap_builder_ValueParser = class end"
00:02:05 verbose #2958 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2959 > > Fable.Core.Emit(\"clap::builder::PossibleValue\")>]]\n#endif\ntype
00:02:05 verbose #2960 > > clap_builder_PossibleValue = class end"
00:02:05 verbose #2961 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2962 > > Fable.Core.Emit(\"std::process::Child\")>]]\n#endif\ntype std_process_Child =
00:02:05 verbose #2963 > > class end"
00:02:05 verbose #2964 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2965 > > Fable.Core.Emit(\"std::process::ChildStderr\")>]]\n#endif\ntype
00:02:05 verbose #2966 > > std_process_ChildStderr = class end"
00:02:05 verbose #2967 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2968 > > Fable.Core.Emit(\"std::process::ChildStdout\")>]]\n#endif\ntype
00:02:05 verbose #2969 > > std_process_ChildStdout = class end"
00:02:05 verbose #2970 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2971 > > Fable.Core.Emit(\"std::process::ChildStdin\")>]]\n#endif\ntype
00:02:05 verbose #2972 > > std_process_ChildStdin = class end"
00:02:05 verbose #2973 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2974 > > Fable.Core.Emit(\"std::process::Command\")>]]\n#endif\ntype std_process_Command
00:02:05 verbose #2975 > > = class end"
00:02:05 verbose #2976 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2977 > > Fable.Core.Emit(\"std::process::ExitStatus\")>]]\n#endif\ntype
00:02:05 verbose #2978 > > std_process_ExitStatus = class end"
00:02:05 verbose #2979 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2980 > > Fable.Core.Emit(\"std::process::Output\")>]]\n#endif\ntype std_process_Output =
00:02:05 verbose #2981 > > class end"
00:02:05 verbose #2982 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:05 verbose #2983 > > Fable.Core.Emit(\"std::process::Stdio\")>]]\n#endif\ntype std_process_Stdio =
00:02:05 verbose #2984 > > class end"
00:02:05 verbose #2985 > >
00:02:05 verbose #2986 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #2987 > > inl types () =
00:02:05 verbose #2988 > > types ()
00:02:05 verbose #2989 > > am'.types ()
00:02:05 verbose #2990 > > async.types ()
00:02:05 verbose #2991 > > env.types ()
00:02:05 verbose #2992 > > rust.types ()
00:02:05 verbose #2993 > > seq.types ()
00:02:05 verbose #2994 > > sm'.types ()
00:02:05 verbose #2995 > > threading.types ()
00:02:05 verbose #2996 > >
00:02:05 verbose #2997 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #2998 > > //// test
00:02:05 verbose #2999 > >
00:02:05 verbose #3000 > > inl types () =
00:02:05 verbose #3001 > > file_system.types ()
00:02:05 verbose #3002 > > types ()
00:02:05 verbose #3003 > >
00:02:05 verbose #3004 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3005 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3006 > > │ ## process_child │
00:02:05 verbose #3007 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3008 > >
00:02:05 verbose #3009 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3010 > > nominal process_child = $'std_process_Child'
00:02:05 verbose #3011 > >
00:02:05 verbose #3012 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3013 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3014 > > │ ## process_child_stderr │
00:02:05 verbose #3015 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3016 > >
00:02:05 verbose #3017 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3018 > > nominal process_child_stderr = $'std_process_ChildStderr'
00:02:05 verbose #3019 > >
00:02:05 verbose #3020 > > inl process_child_stderr
00:02:05 verbose #3021 > > (child : rust.ref' (rust.mut' process_child))
00:02:05 verbose #3022 > > : rust.ref' (rust.mut' (optionm'.option' process_child_stderr))
00:02:05 verbose #3023 > > =
00:02:05 verbose #3024 > > !\($'"&mut !child.stderr"')
00:02:05 verbose #3025 > >
00:02:05 verbose #3026 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3027 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3028 > > │ ## process_child_stdout │
00:02:05 verbose #3029 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3030 > >
00:02:05 verbose #3031 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3032 > > nominal process_child_stdout = $'std_process_ChildStdout'
00:02:05 verbose #3033 > >
00:02:05 verbose #3034 > > inl process_child_stdout
00:02:05 verbose #3035 > > (child : rust.ref' (rust.mut' process_child))
00:02:05 verbose #3036 > > : rust.ref' (rust.mut' (optionm'.option' process_child_stdout))
00:02:05 verbose #3037 > > =
00:02:05 verbose #3038 > > !\($'"&mut !child.stdout"')
00:02:05 verbose #3039 > >
00:02:05 verbose #3040 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3041 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3042 > > │ ## process_child_stdin │
00:02:05 verbose #3043 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3044 > >
00:02:05 verbose #3045 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3046 > > nominal process_child_stdin = $'std_process_ChildStdin'
00:02:05 verbose #3047 > >
00:02:05 verbose #3048 > > inl process_child_stdin
00:02:05 verbose #3049 > > (child : rust.ref' (rust.mut' process_child))
00:02:05 verbose #3050 > > : rust.ref' (rust.mut' (optionm'.option' process_child_stdin))
00:02:05 verbose #3051 > > =
00:02:05 verbose #3052 > > !\\(child, $'"&mut $0.stdin"')
00:02:05 verbose #3053 > >
00:02:05 verbose #3054 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3055 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3056 > > │ ## process_command │
00:02:05 verbose #3057 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3058 > >
00:02:05 verbose #3059 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3060 > > nominal process_command = $'std_process_Command'
00:02:05 verbose #3061 > >
00:02:05 verbose #3062 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3063 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3064 > > │ ## process_stdio │
00:02:05 verbose #3065 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3066 > >
00:02:05 verbose #3067 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3068 > > nominal process_stdio = $'std_process_Stdio'
00:02:05 verbose #3069 > >
00:02:05 verbose #3070 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3071 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3072 > > │ ## process_output │
00:02:05 verbose #3073 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3074 > >
00:02:05 verbose #3075 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3076 > > nominal process_output = $'std_process_Output'
00:02:05 verbose #3077 > >
00:02:05 verbose #3078 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3079 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3080 > > │ ## process_exit_status │
00:02:05 verbose #3081 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3082 > >
00:02:05 verbose #3083 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3084 > > nominal process_exit_status = $'std_process_ExitStatus'
00:02:05 verbose #3085 > >
00:02:05 verbose #3086 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3087 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3088 > > │ ## process_output_status │
00:02:05 verbose #3089 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3090 > >
00:02:05 verbose #3091 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3092 > > inl process_output_status (output : process_output) : process_exit_status =
00:02:05 verbose #3093 > > !\\(output, $'"$0.status"')
00:02:05 verbose #3094 > >
00:02:05 verbose #3095 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3096 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3097 > > │ ## process_exit_status_code │
00:02:05 verbose #3098 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3099 > >
00:02:05 verbose #3100 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3101 > > inl process_exit_status_code (status : process_exit_status) : optionm'.option'
00:02:05 verbose #3102 > > i32 =
00:02:05 verbose #3103 > > !\\(status, $'"$0.code()"')
00:02:05 verbose #3104 > >
00:02:05 verbose #3105 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3106 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3107 > > │ ## os_platform │
00:02:05 verbose #3108 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3109 > >
00:02:05 verbose #3110 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3111 > > nominal os_platform' = $'System.Runtime.InteropServices.OSPlatform'
00:02:05 verbose #3112 > >
00:02:05 verbose #3113 > > union os_platform =
00:02:05 verbose #3114 > > | Windows
00:02:05 verbose #3115 > >
00:02:05 verbose #3116 > > inl os_platform = function
00:02:05 verbose #3117 > > | Windows => $'`os_platform'.Windows' : os_platform'
00:02:05 verbose #3118 > >
00:02:05 verbose #3119 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3120 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3121 > > │ ## is_os_platform │
00:02:05 verbose #3122 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3123 > >
00:02:05 verbose #3124 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3125 > > inl is_os_platform (x : os_platform') : bool =
00:02:05 verbose #3126 > > x |> $'System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform'
00:02:05 verbose #3127 > >
00:02:05 verbose #3128 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3129 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3130 > > │ ## is_windows │
00:02:05 verbose #3131 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3132 > >
00:02:05 verbose #3133 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3134 > > inl is_windows () : bool =
00:02:05 verbose #3135 > > run_target function
00:02:05 verbose #3136 > > | Fsharp (Native) => fun () =>
00:02:05 verbose #3137 > > Windows |> os_platform |> is_os_platform
00:02:05 verbose #3138 > > | Rust (Native) => fun () =>
00:02:05 verbose #3139 > > !\($'"cfg\!(windows)"')
00:02:05 verbose #3140 > > | _ => fun () => null ()
00:02:05 verbose #3141 > >
00:02:05 verbose #3142 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #3143 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #3144 > > │ ## get_executable_suffix │
00:02:05 verbose #3145 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #3146 > >
00:02:05 verbose #3147 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3148 > > inl get_executable_suffix () =
00:02:05 verbose #3149 > > if is_windows ()
00:02:05 verbose #3150 > > then ".exe"
00:02:05 verbose #3151 > > else ""
00:02:05 verbose #3152 > >
00:02:05 verbose #3153 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #3154 > > //// test
00:02:05 verbose #3155 > >
00:02:05 verbose #3156 > > get_executable_suffix ()
00:02:06 verbose #3157 > >
00:02:06 verbose #3158 > > ╭─[ 787.32ms - return value ]──────────────────────────────────────────────────╮
00:02:06 verbose #3159 > > │ .exe │
00:02:06 verbose #3160 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:06 verbose #3161 > >
00:02:06 verbose #3162 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:06 verbose #3163 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:06 verbose #3164 > > │ ## quoted │
00:02:06 verbose #3165 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:06 verbose #3166 > >
00:02:06 verbose #3167 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:06 verbose #3168 > > union quoted =
00:02:06 verbose #3169 > > | Quoted
00:02:06 verbose #3170 > > | NotQuoted
00:02:06 verbose #3171 > >
00:02:06 verbose #3172 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:06 verbose #3173 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:06 verbose #3174 > > │ ## split_command │
00:02:06 verbose #3175 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:06 verbose #3176 > >
00:02:06 verbose #3177 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:06 verbose #3178 > > union command_parse_step =
00:02:06 verbose #3179 > > | Start
00:02:06 verbose #3180 > > | Path : quoted
00:02:06 verbose #3181 > > | Arguments
00:02:06 verbose #3182 > >
00:02:06 verbose #3183 > > inl split_command (command : string) =
00:02:06 verbose #3184 > > let rec loop (path, args) (chars : list char) step =
00:02:06 verbose #3185 > > match step, chars with
00:02:06 verbose #3186 > > | _, (('"' | '\'') :: tail) when path = "" => loop (path, args) tail
00:02:06 verbose #3187 > > (Path Quoted)
00:02:06 verbose #3188 > > | Path (Quoted), (('"' | '\'') :: tail) => loop (path, args) tail (Path
00:02:06 verbose #3189 > > NotQuoted)
00:02:06 verbose #3190 > > | Path (Quoted), (' ' :: tail) => loop ($'$"{!path} "', args) tail (Path
00:02:06 verbose #3191 > > Quoted)
00:02:06 verbose #3192 > > | (Start | Path _), (' ' :: tail) => loop (path, args) tail Arguments
00:02:06 verbose #3193 > > | Arguments, (char :: tail) => loop (path, $'$"{!args}{!char}"') tail
00:02:06 verbose #3194 > > Arguments
00:02:06 verbose #3195 > > | _, (char :: tail) => loop ($'$"{!path}{!char}"', args) tail step
00:02:06 verbose #3196 > > | _ => path |> sm'.replace @"\" "/", args
00:02:06 verbose #3197 > > loop (join "", "") (command |> sm'.to_char_array |> am'.to_list' |>
00:02:06 verbose #3198 > > listm'.unbox) Start
00:02:06 verbose #3199 > >
00:02:06 verbose #3200 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:06 verbose #3201 > > //// test
00:02:06 verbose #3202 > >
00:02:06 verbose #3203 > > split_command ""
00:02:06 verbose #3204 > > |> _assert_eq ("", "")
00:02:06 verbose #3205 > >
00:02:06 verbose #3206 > > split_command "/a/b/c"
00:02:06 verbose #3207 > > |> _assert_eq ("/a/b/c", "")
00:02:06 verbose #3208 > >
00:02:06 verbose #3209 > > split_command "cat file.txt"
00:02:06 verbose #3210 > > |> _assert_eq ("cat", "file.txt")
00:02:06 verbose #3211 > >
00:02:06 verbose #3212 > > split_command $'"""..\\..\\file.exe file1.txt file2.txt"""'
00:02:06 verbose #3213 > > |> _assert_eq ("../../file.exe", "file1.txt file2.txt")
00:02:06 verbose #3214 > >
00:02:06 verbose #3215 > > split_command $'\@"c:\\dir\\file.exe ""file1.txt file2.txt"""'
00:02:06 verbose #3216 > > |> _assert_eq ("c:/dir/file.exe", $'\@"""file1.txt file2.txt"""')
00:02:06 verbose #3217 > >
00:02:06 verbose #3218 > > split_command $'\@"""..\\..\\dir name\\file.exe"" ""file 1.txt"" file2.txt"'
00:02:06 verbose #3219 > > |> _assert_eq ("../../dir name/file.exe", $'\@"""file 1.txt"" file2.txt"')
00:02:06 verbose #3220 > >
00:02:06 verbose #3221 > > split_command $'\@"""..\\..\\file 1.exe"" -c \\\\""echo 1\\\\"""'
00:02:06 verbose #3222 > > |> _assert_eq ("../../file 1.exe", $'\@"-c \\\\""echo 1\\\\"""')
00:02:06 verbose #3223 > >
00:02:06 verbose #3224 > > split_command $'\@"..\\..\\file 1.exe -c \\\\""echo 1\\\\"""'
00:02:06 verbose #3225 > > |> _assert_eq ("../../file", $'\@"1.exe -c \\\\""echo 1\\\\"""')
00:02:07 verbose #3226 > >
00:02:07 verbose #3227 > > ╭─[ 1.45s - stdout ]───────────────────────────────────────────────────────────╮
00:02:07 verbose #3228 > > │ assert_eq / actual: struct ("", "") / expected: struct ("", "") │
00:02:07 verbose #3229 > > │ assert_eq / actual: struct ("/a/b/c", "") / expected: struct ("/a/b/c", "") │
00:02:07 verbose #3230 > > │ assert_eq / actual: struct ("cat", "file.txt") / expected: struct ("cat", │
00:02:07 verbose #3231 > > │ "file.txt") │
00:02:07 verbose #3232 > > │ assert_eq / actual: struct ("../../file.exe", "file1.txt file2.txt") / │
00:02:07 verbose #3233 > > │ expected: struct ("../../file.exe", "file1.txt file2.txt") │
00:02:07 verbose #3234 > > │ assert_eq / actual: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") / │
00:02:07 verbose #3235 > > │ expected: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") │
00:02:07 verbose #3236 > > │ assert_eq / actual: struct ("../../dir name/file.exe", ""file 1.txt" │
00:02:07 verbose #3237 > > │ file2.txt") / expected: struct ("../../dir name/file.exe", ""file 1.txt" │
00:02:07 verbose #3238 > > │ file2.txt") │
00:02:07 verbose #3239 > > │ assert_eq / actual: struct ("../../file 1.exe", "-c \\"echo 1\\"") / │
00:02:07 verbose #3240 > > │ expected: struct ("../../file 1.exe", "-c \\"echo 1\\"") │
00:02:07 verbose #3241 > > │ assert_eq / actual: struct ("../../file", "1.exe -c \\"echo 1\\"") / │
00:02:07 verbose #3242 > > │ expected: struct ("../../file", "1.exe -c \\"echo 1\\"") │
00:02:07 verbose #3243 > > │ │
00:02:07 verbose #3244 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #3245 > >
00:02:07 verbose #3246 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #3247 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #3248 > > │ ## process │
00:02:07 verbose #3249 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #3250 > >
00:02:07 verbose #3251 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:07 verbose #3252 > > nominal process = $'System.Diagnostics.Process'
00:02:07 verbose #3253 > >
00:02:07 verbose #3254 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #3255 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #3256 > > │ ## process_start_info │
00:02:07 verbose #3257 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #3258 > >
00:02:07 verbose #3259 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:07 verbose #3260 > > nominal process_start_info = $'System.Diagnostics.ProcessStartInfo'
00:02:07 verbose #3261 > >
00:02:07 verbose #3262 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #3263 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #3264 > > │ ## data_received_event_args │
00:02:07 verbose #3265 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #3266 > >
00:02:07 verbose #3267 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:07 verbose #3268 > > nominal data_received_event_args = $'System.Diagnostics.DataReceivedEventArgs'
00:02:07 verbose #3269 > >
00:02:07 verbose #3270 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #3271 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #3272 > > │ ## new_process │
00:02:07 verbose #3273 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #3274 > >
00:02:07 verbose #3275 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:07 verbose #3276 > > inl new_process (process_start_info : process_start_info) : process =
00:02:07 verbose #3277 > > $'new `process (StartInfo = !process_start_info)'
00:02:07 verbose #3278 > >
00:02:07 verbose #3279 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #3280 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #3281 > > │ ## process_start │
00:02:07 verbose #3282 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #3283 > >
00:02:07 verbose #3284 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:07 verbose #3285 > > inl process_start (process : process) : bool =
00:02:07 verbose #3286 > > $'!process.Start' ()
00:02:07 verbose #3287 > >
00:02:07 verbose #3288 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:07 verbose #3289 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:07 verbose #3290 > > │ ## process_exit_code │
00:02:07 verbose #3291 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:07 verbose #3292 > >
00:02:07 verbose #3293 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:07 verbose #3294 > > inl process_exit_code (process : process) : i32 =
00:02:07 verbose #3295 > > $'!process.ExitCode'
00:02:08 verbose #3296 > >
00:02:08 verbose #3297 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3298 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3299 > > │ ## process_id │
00:02:08 verbose #3300 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3301 > >
00:02:08 verbose #3302 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3303 > > inl process_id (process : process) : i32 =
00:02:08 verbose #3304 > > $'!process.Id'
00:02:08 verbose #3305 > >
00:02:08 verbose #3306 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3307 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3308 > > │ ## process_has_exited │
00:02:08 verbose #3309 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3310 > >
00:02:08 verbose #3311 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3312 > > inl process_has_exited (process : process) : bool =
00:02:08 verbose #3313 > > run_target function
00:02:08 verbose #3314 > > | Fsharp (Native) => fun () =>
00:02:08 verbose #3315 > > $'!process.HasExited'
00:02:08 verbose #3316 > > | _ => fun () => null ()
00:02:08 verbose #3317 > >
00:02:08 verbose #3318 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3319 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3320 > > │ ## process_kill │
00:02:08 verbose #3321 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3322 > >
00:02:08 verbose #3323 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3324 > > inl process_kill (process : process) : () =
00:02:08 verbose #3325 > > run_target function
00:02:08 verbose #3326 > > | Fsharp (Native) => fun () =>
00:02:08 verbose #3327 > > $'!process.Kill' ()
00:02:08 verbose #3328 > > | _ => fun () => null ()
00:02:08 verbose #3329 > >
00:02:08 verbose #3330 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3331 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3332 > > │ ## process_begin_error_read_line │
00:02:08 verbose #3333 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3334 > >
00:02:08 verbose #3335 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3336 > > inl process_begin_error_read_line (process : process) : () =
00:02:08 verbose #3337 > > $'!process.BeginErrorReadLine' ()
00:02:08 verbose #3338 > >
00:02:08 verbose #3339 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3340 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3341 > > │ ## process_begin_output_read_line │
00:02:08 verbose #3342 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3343 > >
00:02:08 verbose #3344 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3345 > > inl process_begin_output_read_line (process : process) : () =
00:02:08 verbose #3346 > > $'!process.BeginOutputReadLine' ()
00:02:08 verbose #3347 > >
00:02:08 verbose #3348 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3349 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3350 > > │ ## process_add_output_data_received │
00:02:08 verbose #3351 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3352 > >
00:02:08 verbose #3353 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3354 > > inl process_add_output_data_received fn (process : process) : () =
00:02:08 verbose #3355 > > $'!process.OutputDataReceived.Add !fn '
00:02:08 verbose #3356 > >
00:02:08 verbose #3357 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3358 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3359 > > │ ## process_add_error_data_received │
00:02:08 verbose #3360 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3361 > >
00:02:08 verbose #3362 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3363 > > inl process_add_error_data_received fn (process : process) : () =
00:02:08 verbose #3364 > > $'!process.ErrorDataReceived.Add !fn '
00:02:08 verbose #3365 > >
00:02:08 verbose #3366 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3367 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3368 > > │ ## process_wait_for_exit_async │
00:02:08 verbose #3369 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3370 > >
00:02:08 verbose #3371 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3372 > > inl process_wait_for_exit_async (ct : threading.cancellation_token) (process :
00:02:08 verbose #3373 > > process) : async.task () =
00:02:08 verbose #3374 > > $'!process.WaitForExitAsync !ct '
00:02:08 verbose #3375 > >
00:02:08 verbose #3376 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3377 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3378 > > │ ## event_data │
00:02:08 verbose #3379 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3380 > >
00:02:08 verbose #3381 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3382 > > inl event_data (e : data_received_event_args) : string =
00:02:08 verbose #3383 > > $'!e.Data'
00:02:08 verbose #3384 > >
00:02:08 verbose #3385 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3386 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3387 > > │ ## execution_line │
00:02:08 verbose #3388 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3389 > >
00:02:08 verbose #3390 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3391 > > type execution_line =
00:02:08 verbose #3392 > > {
00:02:08 verbose #3393 > > process_id : int
00:02:08 verbose #3394 > > line : string
00:02:08 verbose #3395 > > error : bool
00:02:08 verbose #3396 > > }
00:02:08 verbose #3397 > >
00:02:08 verbose #3398 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3399 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3400 > > │ ## execution_options │
00:02:08 verbose #3401 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3402 > >
00:02:08 verbose #3403 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3404 > > type execution_options =
00:02:08 verbose #3405 > > {
00:02:08 verbose #3406 > > command : string
00:02:08 verbose #3407 > > cancellation_token : optionm'.option' threading.cancellation_token
00:02:08 verbose #3408 > > environment_variables : array_base (string * string)
00:02:08 verbose #3409 > > on_line : optionm'.option' (execution_line -> async.async ())
00:02:08 verbose #3410 > > stdin : optionm'.option' (threading.arc (threading.mutex
00:02:08 verbose #3411 > > process_child_stdin) -> ())
00:02:08 verbose #3412 > > trace : bool
00:02:08 verbose #3413 > > working_directory : optionm'.option' string
00:02:08 verbose #3414 > > }
00:02:08 verbose #3415 > >
00:02:08 verbose #3416 > > inl execution_options (fn : execution_options -> execution_options) :
00:02:08 verbose #3417 > > execution_options =
00:02:08 verbose #3418 > > {
00:02:08 verbose #3419 > > command = ""
00:02:08 verbose #3420 > > cancellation_token = None |> optionm'.box
00:02:08 verbose #3421 > > environment_variables = ;[[]]
00:02:08 verbose #3422 > > on_line = None |> optionm'.box
00:02:08 verbose #3423 > > stdin = None |> optionm'.box
00:02:08 verbose #3424 > > trace = true
00:02:08 verbose #3425 > > working_directory = None |> optionm'.box
00:02:08 verbose #3426 > > }
00:02:08 verbose #3427 > > |> fn
00:02:08 verbose #3428 > >
00:02:08 verbose #3429 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3430 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3431 > > │ ## execute_with_options_async │
00:02:08 verbose #3432 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3433 > >
00:02:08 verbose #3434 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3435 > > let execute_with_options_async (options : execution_options) : _ (i32 * string)
00:02:08 verbose #3436 > > =
00:02:08 verbose #3437 > > run_target function
00:02:08 verbose #3438 > > | Fsharp (Native) => fun () =>
00:02:08 verbose #3439 > > fun () =>
00:02:08 verbose #3440 > > inl file_name, arguments = options.command |> split_command
00:02:08 verbose #3441 > > inl working_directory = options.working_directory |>
00:02:08 verbose #3442 > > optionm'.unbox |> optionm'.default_value ""
00:02:08 verbose #3443 > >
00:02:08 verbose #3444 > > trace Debug (fun () => $'$"execute_with_options_async / options:
00:02:08 verbose #3445 > > %A{!options}"') (join _locals)
00:02:08 verbose #3446 > >
00:02:08 verbose #3447 > > inl utf8 = sm'.encoding_utf8 ()
00:02:08 verbose #3448 > > inl start_info : process_start_info =
00:02:08 verbose #3449 > > $'System.Diagnostics.ProcessStartInfo (Arguments = !arguments,
00:02:08 verbose #3450 > > StandardOutputEncoding = !utf8, WorkingDirectory = !working_directory, FileName
00:02:08 verbose #3451 > > = !file_name, CreateNoWindow = true, RedirectStandardError = true,
00:02:08 verbose #3452 > > RedirectStandardOutput = true, UseShellExecute = false)'
00:02:08 verbose #3453 > >
00:02:08 verbose #3454 > > (a options.environment_variables : _ i32 _)
00:02:08 verbose #3455 > > |> am.iter fun key, value =>
00:02:08 verbose #3456 > > $'!start_info.EnvironmentVariables.[[!key]] <- !value '
00:02:08 verbose #3457 > >
00:02:08 verbose #3458 > > inl proc = start_info |> new_process |> use
00:02:08 verbose #3459 > > inl output : _ string = threading.new_concurrent_stack ()
00:02:08 verbose #3460 > >
00:02:08 verbose #3461 > > inl event error (e : data_received_event_args) = async.new_async
00:02:08 verbose #3462 > > fun () =>
00:02:08 verbose #3463 > > inl data = e |> event_data
00:02:08 verbose #3464 > > if data <> null () then
00:02:08 verbose #3465 > > match options.on_line |> optionm'.unbox with
00:02:08 verbose #3466 > > | Some on_line =>
00:02:08 verbose #3467 > > on_line
00:02:08 verbose #3468 > > {
00:02:08 verbose #3469 > > process_id = proc |> process_id
00:02:08 verbose #3470 > > line = data
00:02:08 verbose #3471 > > error = error
00:02:08 verbose #3472 > > }
00:02:08 verbose #3473 > > |> async.do
00:02:08 verbose #3474 > > | None => ()
00:02:08 verbose #3475 > >
00:02:08 verbose #3476 > > inl text =
00:02:08 verbose #3477 > > if error
00:02:08 verbose #3478 > > then $'$"\! {!data}"'
00:02:08 verbose #3479 > > else $'$"> {!data}"'
00:02:08 verbose #3480 > > if options.trace
00:02:08 verbose #3481 > > then trace Verbose (fun () => text) _locals
00:02:08 verbose #3482 > > else text |> console.write_line
00:02:08 verbose #3483 > >
00:02:08 verbose #3484 > > inl l = if error then $'"\\u001b[[7;4m"' else ""
00:02:08 verbose #3485 > > inl r = if error then $'"\\u001b[[0m"' else ""
00:02:08 verbose #3486 > > output |> threading.concurrent_stack_push
00:02:08 verbose #3487 > > $'$"{!l}{!data}{!r}"'
00:02:08 verbose #3488 > >
00:02:08 verbose #3489 > > proc |> process_add_output_data_received (event false >>
00:02:08 verbose #3490 > > async.start_immediate)
00:02:08 verbose #3491 > > proc |> process_add_error_data_received (event true >>
00:02:08 verbose #3492 > > async.start_immediate)
00:02:08 verbose #3493 > >
00:02:08 verbose #3494 > > if proc |> process_start |> not
00:02:08 verbose #3495 > > then failwith $'$"execute_with_options_async / process_start
00:02:08 verbose #3496 > > error"'
00:02:08 verbose #3497 > >
00:02:08 verbose #3498 > > proc |> process_begin_error_read_line
00:02:08 verbose #3499 > > proc |> process_begin_output_read_line
00:02:08 verbose #3500 > >
00:02:08 verbose #3501 > > inl ct =
00:02:08 verbose #3502 > > options.cancellation_token
00:02:08 verbose #3503 > > |> optionm'.unbox
00:02:08 verbose #3504 > > |> optionm'.default_with threading.token_none
00:02:08 verbose #3505 > > |> async.merge_cancellation_token_with_default_async
00:02:08 verbose #3506 > > |> async.let'
00:02:08 verbose #3507 > >
00:02:08 verbose #3508 > > ct |> threading.token_register fun () =>
00:02:08 verbose #3509 > > if proc |> process_has_exited |> not
00:02:08 verbose #3510 > > then proc |> process_kill
00:02:08 verbose #3511 > > |> use
00:02:08 verbose #3512 > > |> ignore
00:02:08 verbose #3513 > >
00:02:08 verbose #3514 > > inl exit_code : i32 =
00:02:08 verbose #3515 > > fun () =>
00:02:08 verbose #3516 > > try_unit
00:02:08 verbose #3517 > > fun () =>
00:02:08 verbose #3518 > > proc
00:02:08 verbose #3519 > > |> process_wait_for_exit_async ct
00:02:08 verbose #3520 > > |> async.await_task
00:02:08 verbose #3521 > > |> async.do
00:02:08 verbose #3522 > > proc |> process_exit_code |> return
00:02:08 verbose #3523 > > fun ex =>
00:02:08 verbose #3524 > > // with :?
00:02:08 verbose #3525 > > System.Threading.Tasks.TaskCanceledException as ex =>
00:02:08 verbose #3526 > > inl ex' = ex |> sm'.format_exception
00:02:08 verbose #3527 > > output |> threading.concurrent_stack_push ex'
00:02:08 verbose #3528 > > inl ex : async.task_canceled_exception = ex |>
00:02:08 verbose #3529 > > unbox
00:02:08 verbose #3530 > > trace Warning (fun () =>
00:02:08 verbose #3531 > > $'$"execute_with_options_async / WaitForExitAsync / ex: %A{!ex}"') (join
00:02:08 verbose #3532 > > _locals)
00:02:08 verbose #3533 > > (limit.min : i32) |> return
00:02:08 verbose #3534 > > |> async.new_async_unit
00:02:08 verbose #3535 > > |> async.let'
00:02:08 verbose #3536 > >
00:02:08 verbose #3537 > > inl output =
00:02:08 verbose #3538 > > output
00:02:08 verbose #3539 > > |> seq.rev''
00:02:08 verbose #3540 > > |> fun x => x : seq.seq' string
00:02:08 verbose #3541 > > |> sm'.concat "\n"
00:02:08 verbose #3542 > >
00:02:08 verbose #3543 > > trace Debug (fun () =>
00:02:08 verbose #3544 > > $'$"execute_with_options_async / exit_code: {!exit_code}
00:02:08 verbose #3545 > > output.Length: {!output.Length}"'
00:02:08 verbose #3546 > > ) (join _locals)
00:02:08 verbose #3547 > >
00:02:08 verbose #3548 > > (exit_code, output) |> return
00:02:08 verbose #3549 > > |> async.new_async_unit
00:02:08 verbose #3550 > > | _ => fun () =>
00:02:08 verbose #3551 > > global "#if FABLE_COMPILER\n[[<CompilationRepresentation
00:02:08 verbose #3552 > > (CompilationRepresentationFlags.ModuleSuffix)>]]\nmodule System =\n module
00:02:08 verbose #3553 > > Diagnostics =\n type Process = unit\n type DataReceivedEventArgs =
00:02:08 verbose #3554 > > unit\n#endif"
00:02:08 verbose #3555 > > null ()
00:02:08 verbose #3556 > >
00:02:08 verbose #3557 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:08 verbose #3558 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:08 verbose #3559 > > │ ## execute_async │
00:02:08 verbose #3560 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:08 verbose #3561 > >
00:02:08 verbose #3562 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3563 > > inl execute_async command =
00:02:08 verbose #3564 > > execution_options fun x => { x with
00:02:08 verbose #3565 > > command = command
00:02:08 verbose #3566 > > }
00:02:08 verbose #3567 > > |> execute_with_options_async
00:02:08 verbose #3568 > >
00:02:08 verbose #3569 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:08 verbose #3570 > > //// test
00:02:08 verbose #3571 > >
00:02:08 verbose #3572 > > types ()
00:02:08 verbose #3573 > > inl temp_folder, disposable = file_system.create_temp_directory ()
00:02:08 verbose #3574 > > disposable |> use |> ignore
00:02:08 verbose #3575 > > inl file_name = "test.txt"
00:02:08 verbose #3576 > > inl path = temp_folder </> file_name
00:02:08 verbose #3577 > >
00:02:08 verbose #3578 > > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮"
00:02:08 verbose #3579 > > fun () =>
00:02:08 verbose #3580 > > inl exit_code, result = execute_async $'\@$"pwsh -c ""Get-Content
00:02:08 verbose #3581 > > {!path}"""' |> async.let'
00:02:08 verbose #3582 > > exit_code |> join _assert_eq 1
00:02:08 verbose #3583 > > result |> _assert_string_contains "not exist"
00:02:08 verbose #3584 > >
00:02:08 verbose #3585 > > content |> file_system.write_all_text_async path |> async.do
00:02:08 verbose #3586 > >
00:02:08 verbose #3587 > > execution_options fun x => { x with
00:02:08 verbose #3588 > > command = $'\@$"cat ""{!file_name}"""'
00:02:08 verbose #3589 > > working_directory = Some temp_folder |> optionm'.box
00:02:08 verbose #3590 > > }
00:02:08 verbose #3591 > > |> execute_with_options_async
00:02:08 verbose #3592 > > |> async.let'
00:02:08 verbose #3593 > > |> ignore
00:02:08 verbose #3594 > >
00:02:08 verbose #3595 > > execution_options fun x => { x with
00:02:08 verbose #3596 > > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding =
00:02:08 verbose #3597 > > [[System.Text.Encoding]]::UTF8; Get-Content {!file_name}"""'
00:02:08 verbose #3598 > > working_directory = Some temp_folder |> optionm'.box
00:02:08 verbose #3599 > > }
00:02:08 verbose #3600 > > |> execute_with_options_async
00:02:08 verbose #3601 > > |> async.return_await
00:02:08 verbose #3602 > > |> async.new_async_unit
00:02:08 verbose #3603 > > |> async.run_with_timeout 10000
00:02:08 verbose #3604 > > |> function
00:02:08 verbose #3605 > > | Some (exit_code, output) =>
00:02:08 verbose #3606 > > exit_code |> join _assert_eq 0i32
00:02:08 verbose #3607 > > output |> join _assert_eq content
00:02:08 verbose #3608 > > true
00:02:08 verbose #3609 > > | _ => false
00:02:08 verbose #3610 > > |> _assert_eq true
00:02:12 verbose #3611 > >
00:02:12 verbose #3612 > > ╭─[ 4.52s - stdout ]───────────────────────────────────────────────────────────╮
00:02:12 verbose #3613 > > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │
00:02:12 verbose #3614 > > │ "pwsh -c "Get-Content │
00:02:12 verbose #3615 > > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2154-0025-2512-20040 │
00:02:12 verbose #3616 > > │ 0a10a92\test.txt"", │
00:02:12 verbose #3617 > > │ [||], None, None, true, None) │
00:02:12 verbose #3618 > > │ 00:00:00 verbose #2 ! Get-Content: Cannot find path │
00:02:12 verbose #3619 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2154-0025-2512-2004 │
00:02:12 verbose #3620 > > │ 00a10a92\test.txt' because it does not exist. │
00:02:12 verbose #3621 > > │ 00:00:01 debug #3 execute_with_options_async / exit_code: 1 / │
00:02:12 verbose #3622 > > │ output.Length: 179 │
00:02:12 verbose #3623 > > │ assert_eq / actual: 1 / expected: 1 │
00:02:12 verbose #3624 > > │ assert_string_contains / actual: "not exist" / expected: "[ │
00:02:12 verbose #3625 > > │ 31;1mGet-Content: Cannot find path │
00:02:12 verbose #3626 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2154-0025-2512-2004 │
00:02:12 verbose #3627 > > │ 00a10a92\test.txt' because it does not exist." │
00:02:12 verbose #3628 > > │ 00:00:01 debug #4 execute_with_options_async / options: struct (None, "cat │
00:02:12 verbose #3629 > > │ "test.txt"", [||], None, None, true, │
00:02:12 verbose #3630 > > │ Some │
00:02:12 verbose #3631 > > │ │
00:02:12 verbose #3632 > > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2154-0025-2512-2004 │
00:02:12 verbose #3633 > > │ 00a10a92") │
00:02:12 verbose #3634 > > │ 00:00:01 verbose #5 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │
00:02:12 verbose #3635 > > │ 00:00:01 debug #6 execute_with_options_async / exit_code: 0 / │
00:02:12 verbose #3636 > > │ output.Length: 22 │
00:02:12 verbose #3637 > > │ 00:00:01 debug #7 execute_with_options_async / options: struct (None, │
00:02:12 verbose #3638 > > │ "pwsh -c "[System.Console]::OutputEncoding = [ │
00:02:12 verbose #3639 > > │ System.Text.Encoding]::UTF8; Get-Content test.txt"", │
00:02:12 verbose #3640 > > │ [||], None, None, true, │
00:02:12 verbose #3641 > > │ Some │
00:02:12 verbose #3642 > > │ │
00:02:12 verbose #3643 > > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2154-0025-2512-2004 │
00:02:12 verbose #3644 > > │ 00a10a92") │
00:02:12 verbose #3645 > > │ 00:00:01 verbose #8 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │
00:02:12 verbose #3646 > > │ 00:00:01 debug #9 execute_with_options_async / exit_code: 0 / │
00:02:12 verbose #3647 > > │ output.Length: 22 │
00:02:12 verbose #3648 > > │ assert_eq / actual: 0 / expected: 0 │
00:02:12 verbose #3649 > > │ assert_eq / actual: "╭─[ 你好,世界!こんにちは世界! ]─╮" / expected: "╭─[ │
00:02:12 verbose #3650 > > │ 你好,世界!こんにちは世界! ]─╮" │
00:02:12 verbose #3651 > > │ assert_eq / actual: true / expected: true │
00:02:12 verbose #3652 > > │ │
00:02:12 verbose #3653 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:12 verbose #3654 > >
00:02:12 verbose #3655 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:12 verbose #3656 > > //// test
00:02:12 verbose #3657 > >
00:02:12 verbose #3658 > > file_system.types ()
00:02:12 verbose #3659 > > inl temp_dir, disposable = file_system.create_temp_directory ()
00:02:12 verbose #3660 > > disposable |> use |> ignore
00:02:12 verbose #3661 > > fun () =>
00:02:12 verbose #3662 > > inl path = temp_dir </> "test.txt"
00:02:12 verbose #3663 > > "0" |> file_system.write_all_text_async path |> async.do
00:02:12 verbose #3664 > >
00:02:12 verbose #3665 > > inl cts = threading.new_cancellation_token_source ()
00:02:12 verbose #3666 > > trace Debug (fun () => "1") _locals
00:02:12 verbose #3667 > > inl result =
00:02:12 verbose #3668 > > execution_options fun x => { x with
00:02:12 verbose #3669 > > command = $'\@$"pwsh -c ""Get-Content {!path}"""'
00:02:12 verbose #3670 > > cancellation_token = cts |> threading.cancellation_source_token |>
00:02:12 verbose #3671 > > Some |> optionm'.box
00:02:12 verbose #3672 > > }
00:02:12 verbose #3673 > > |> execute_with_options_async
00:02:12 verbose #3674 > > |> async.start_child
00:02:12 verbose #3675 > > |> async.let'
00:02:12 verbose #3676 > > trace Debug (fun () => "2") _locals
00:02:12 verbose #3677 > > async.sleep 100 |> async.do
00:02:12 verbose #3678 > > trace Debug (fun () => "3") _locals
00:02:12 verbose #3679 > > cts |> threading.cancellation_source_cancel
00:02:12 verbose #3680 > > trace Debug (fun () => "4") _locals
00:02:12 verbose #3681 > > inl exit_code, output = result |> async.let'
00:02:12 verbose #3682 > > trace Debug (fun () => "5") _locals
00:02:12 verbose #3683 > > (exit_code, output) |> return
00:02:12 verbose #3684 > > |> async.new_async_unit
00:02:12 verbose #3685 > > |> async.run_with_timeout 10000
00:02:12 verbose #3686 > > |> function
00:02:12 verbose #3687 > > | Some (exit_code, output) =>
00:02:12 verbose #3688 > > exit_code |> _assert_eq -2147483648i32
00:02:12 verbose #3689 > > output |> _assert_eq (join
00:02:12 verbose #3690 > > "System.Threading.Tasks.TaskCanceledException: A task was canceled.")
00:02:12 verbose #3691 > > true
00:02:12 verbose #3692 > > | _ => false
00:02:12 verbose #3693 > > |> _assert_eq true
00:02:15 verbose #3694 > >
00:02:15 verbose #3695 > > ╭─[ 2.52s - stdout ]───────────────────────────────────────────────────────────╮
00:02:15 verbose #3696 > > │ 00:00:00 debug #1 1 │
00:02:15 verbose #3697 > > │ 00:00:00 debug #2 2 │
00:02:15 verbose #3698 > > │ 00:00:00 debug #3 execute_with_options_async / options: struct (Some │
00:02:15 verbose #3699 > > │ System.Threading.CancellationToken, │
00:02:15 verbose #3700 > > │ "pwsh -c "Get-Content │
00:02:15 verbose #3701 > > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2154-0453-5387-50040 │
00:02:15 verbose #3702 > > │ 0d1e24b\test.txt"", │
00:02:15 verbose #3703 > > │ [||], None, None, true, None) │
00:02:15 verbose #3704 > > │ 00:00:00 debug #4 3 │
00:02:15 verbose #3705 > > │ 00:00:00 debug #5 4 │
00:02:15 verbose #3706 > > │ 00:00:00 warning #6 execute_with_options_async / WaitForExitAsync / ex: │
00:02:15 verbose #3707 > > │ System.Threading.Tasks.TaskCanceledException: A task was canceled. │
00:02:15 verbose #3708 > > │ 00:00:00 debug #7 execute_with_options_async / exit_code: -2147483648 / │
00:02:15 verbose #3709 > > │ output.Length: 66 │
00:02:15 verbose #3710 > > │ 00:00:00 debug #8 5 │
00:02:15 verbose #3711 > > │ assert_eq / actual: -2147483648 / expected: -2147483648 │
00:02:15 verbose #3712 > > │ assert_eq / actual: "System.Threading.Tasks.TaskCanceledException: A task │
00:02:15 verbose #3713 > > │ was canceled." / expected: "System.Threading.Tasks.TaskCanceledException: A │
00:02:15 verbose #3714 > > │ task was canceled." │
00:02:15 verbose #3715 > > │ assert_eq / actual: true / expected: true │
00:02:15 verbose #3716 > > │ │
00:02:15 verbose #3717 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:15 verbose #3718 > >
00:02:15 verbose #3719 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:15 verbose #3720 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:15 verbose #3721 > > │ ## split_args │
00:02:15 verbose #3722 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:15 verbose #3723 > >
00:02:15 verbose #3724 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:15 verbose #3725 > > union args_parse_step =
00:02:15 verbose #3726 > > | Start
00:02:15 verbose #3727 > > | Quoted : char
00:02:15 verbose #3728 > > | Escaped : u8 * char
00:02:15 verbose #3729 > >
00:02:15 verbose #3730 > > let split_args (args : string) : array_base string =
00:02:15 verbose #3731 > > let rec loop (acc, current) (chars : list char) (step, last) =
00:02:15 verbose #3732 > > // trace Verbose (fun () => $'$"split_args / current: %A{!current}
00:02:15 verbose #3733 > > acc: %A{!acc} / step: %A{!step} / last: %A{!last}"') _locals
00:02:15 verbose #3734 > > match step, last, chars with
00:02:15 verbose #3735 > > | Start, _, ('"' :: tail) =>
00:02:15 verbose #3736 > > loop (acc, "") tail (Quoted '"', step)
00:02:15 verbose #3737 > > | Escaped _, _, (('\\' | '\`') & c :: tail) =>
00:02:15 verbose #3738 > > loop (acc, current) tail (Quoted c, step)
00:02:15 verbose #3739 > > | Escaped _, Start, ('"' :: tail) =>
00:02:15 verbose #3740 > > loop (acc, current) tail (step, step)
00:02:15 verbose #3741 > > | Quoted ('"'), Quoted _, ('"' :: tail) =>
00:02:15 verbose #3742 > > loop (acc, current) tail (Start, step)
00:02:15 verbose #3743 > > | Escaped (0, ('\\' | '\`') & c), Quoted ('"'), (c' :: tail) =>
00:02:15 verbose #3744 > > loop (acc, $'$"{!current}{!c}{!c'}"') tail (Quoted '"', step)
00:02:15 verbose #3745 > > | Quoted (('\\' | '\`') as c), _, ('"' :: tail)
00:02:15 verbose #3746 > > when last <>. Escaped (0, '\\') && last <>. Escaped (0, '\`') =>
00:02:15 verbose #3747 > > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step)
00:02:15 verbose #3748 > > | Quoted (('\\' | '\`') as c), Quoted _, ('"' :: tail) =>
00:02:15 verbose #3749 > > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step)
00:02:15 verbose #3750 > > | Quoted ('\\' | '\`'), _, ('"' :: tail) =>
00:02:15 verbose #3751 > > loop (acc, current) tail (Start, step)
00:02:15 verbose #3752 > > | Escaped (n, c), _, ('"' :: tail) =>
00:02:15 verbose #3753 > > loop (acc, $'$"{!current}{!c}\\\""') tail (Escaped (n, c), step)
00:02:15 verbose #3754 > > | Quoted _, Quoted _, (('\\' | '\`') & c :: tail) =>
00:02:15 verbose #3755 > > loop (acc, current) tail (Escaped (0, c), step)
00:02:15 verbose #3756 > > | Quoted _, _, (('\\' | '\`') & c :: tail) =>
00:02:15 verbose #3757 > > loop (acc, current) tail (Escaped (1, c), step)
00:02:15 verbose #3758 > > | Quoted _, Escaped (0, _), ('"' :: tail) =>
00:02:15 verbose #3759 > > loop (acc, $'$"{!current}"') tail (Quoted '"', step)
00:02:15 verbose #3760 > > | Quoted _, _, ('"' :: tail) =>
00:02:15 verbose #3761 > > loop (acc ++ [[ current ]], "") tail (Start, step)
00:02:15 verbose #3762 > > | (Escaped _ | Quoted _), _, (' ' :: tail) =>
00:02:15 verbose #3763 > > loop (acc, $'$"{!current} "') tail (step, step)
00:02:15 verbose #3764 > > | _, _, (('\\' | '\`') & c :: tail) =>
00:02:15 verbose #3765 > > loop (acc, current) tail (Escaped (0, c), step)
00:02:15 verbose #3766 > > | _, _, (' ' :: tail) =>
00:02:15 verbose #3767 > > loop ((if current = "" then acc else acc ++ [[ current ]]), "") tail
00:02:15 verbose #3768 > > (step, step)
00:02:15 verbose #3769 > > | Escaped (1, _), _, (char :: tail) when last <>. step =>
00:02:15 verbose #3770 > > loop (acc, $'$"{!current}\\{!char}"') tail (last, step)
00:02:15 verbose #3771 > > | _, _, (char :: tail) =>
00:02:15 verbose #3772 > > loop (acc, $'$"{!current}{!char}"') tail (step, step)
00:02:15 verbose #3773 > > | _ =>
00:02:15 verbose #3774 > > (if current = "" then acc else acc ++ [[ current ]]), current
00:02:15 verbose #3775 > > loop
00:02:15 verbose #3776 > > ([[]], "")
00:02:15 verbose #3777 > > (
00:02:15 verbose #3778 > > args
00:02:15 verbose #3779 > > |> optionm'.of_obj
00:02:15 verbose #3780 > > |> optionm'.unbox
00:02:15 verbose #3781 > > |> optionm'.default_value ""
00:02:15 verbose #3782 > > |> sm'.to_char_array
00:02:15 verbose #3783 > > |> am'.to_list'
00:02:15 verbose #3784 > > |> listm'.unbox
00:02:15 verbose #3785 > > )
00:02:15 verbose #3786 > > (Start, Start)
00:02:15 verbose #3787 > > |> fst
00:02:15 verbose #3788 > > |> listm'.box
00:02:15 verbose #3789 > > |> listm'.to_array'
00:02:15 verbose #3790 > > |> fun (a x : _ i32 _) => x
00:02:15 verbose #3791 > >
00:02:15 verbose #3792 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:15 verbose #3793 > > //// test
00:02:15 verbose #3794 > >
00:02:15 verbose #3795 > > "a b \"c d\" e"
00:02:15 verbose #3796 > > |> split_args
00:02:15 verbose #3797 > > |> _assert_eq' ;[[ "a"; "b"; "c d"; "e" ]]
00:02:16 verbose #3798 > >
00:02:16 verbose #3799 > > ╭─[ 892.79ms - stdout ]────────────────────────────────────────────────────────╮
00:02:16 verbose #3800 > > │ assert_eq' / actual: [|"a"; "b"; "c d"; "e"|] / expected: [|"a"; "b"; "c d"; │
00:02:16 verbose #3801 > > │ "e"|] │
00:02:16 verbose #3802 > > │ │
00:02:16 verbose #3803 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:16 verbose #3804 > >
00:02:16 verbose #3805 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:16 verbose #3806 > > //// test
00:02:16 verbose #3807 > >
00:02:16 verbose #3808 > > "a b e"
00:02:16 verbose #3809 > > |> split_args
00:02:16 verbose #3810 > > |> _assert_eq' ;[[ "a"; "b"; "e" ]]
00:02:17 verbose #3811 > 00:02:16 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/63abc84cbd6c3f88f311f6c2fd912f01f5aee97f99e9a7aa141bfe59a9b8aba5/main.spi
00:02:19 verbose #3812 > >
00:02:19 verbose #3813 > > ╭─[ 2.91s - stdout ]───────────────────────────────────────────────────────────╮
00:02:19 verbose #3814 > > │ assert_eq' / actual: [|"a"; "b"; "e"|] / expected: [|"a"; "b"; "e"|] │
00:02:19 verbose #3815 > > │ │
00:02:19 verbose #3816 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:19 verbose #3817 > >
00:02:19 verbose #3818 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:19 verbose #3819 > > //// test
00:02:19 verbose #3820 > >
00:02:19 verbose #3821 > > "\"a b\" \"e\" \"f\""
00:02:19 verbose #3822 > > |> split_args
00:02:19 verbose #3823 > > |> _assert_eq' ;[[ "a b"; "e"; "f" ]]
00:02:19 verbose #3824 > 00:02:18 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c57514b2a1b47949e9c0eeec44e677f99c8d1b35963b9baca95e1306197fe8b2/main.spi
00:02:21 verbose #3825 > >
00:02:21 verbose #3826 > > ╭─[ 2.30s - stdout ]───────────────────────────────────────────────────────────╮
00:02:21 verbose #3827 > > │ assert_eq' / actual: [|"a b"; "e"; "f"|] / expected: [|"a b"; "e"; "f"|] │
00:02:21 verbose #3828 > > │ │
00:02:21 verbose #3829 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:21 verbose #3830 > >
00:02:21 verbose #3831 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:21 verbose #3832 > > //// test
00:02:21 verbose #3833 > >
00:02:21 verbose #3834 > > "a -b \"c \\\"d\\\"\""
00:02:21 verbose #3835 > > |> split_args
00:02:21 verbose #3836 > > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\"" ]]
00:02:22 verbose #3837 > 00:02:20 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c3b0bd5788048c280c24975dd198d9a32239004681e0d4a488f4861e88a942f2/main.spi
00:02:23 verbose #3838 > >
00:02:23 verbose #3839 > > ╭─[ 1.64s - stdout ]───────────────────────────────────────────────────────────╮
00:02:23 verbose #3840 > > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\""|] / expected: [|"a"; "-b"; "c │
00:02:23 verbose #3841 > > │ \"d\""|] │
00:02:23 verbose #3842 > > │ │
00:02:23 verbose #3843 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:23 verbose #3844 > >
00:02:23 verbose #3845 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:23 verbose #3846 > > //// test
00:02:23 verbose #3847 > >
00:02:23 verbose #3848 > > "a -b \"c \\\"d\\\" e\""
00:02:23 verbose #3849 > > |> split_args
00:02:23 verbose #3850 > > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\" e" ]]
00:02:23 verbose #3851 > 00:02:22 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c422dd1b49442f224568f35145e7cf899bb4458e63cb7c1ae629652d0296f446/main.spi
00:02:24 verbose #3852 > >
00:02:24 verbose #3853 > > ╭─[ 1.59s - stdout ]───────────────────────────────────────────────────────────╮
00:02:24 verbose #3854 > > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\" e"|] / expected: [|"a"; "-b"; "c │
00:02:24 verbose #3855 > > │ \"d\" e"|] │
00:02:24 verbose #3856 > > │ │
00:02:24 verbose #3857 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:24 verbose #3858 > >
00:02:24 verbose #3859 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:24 verbose #3860 > > //// test
00:02:24 verbose #3861 > >
00:02:24 verbose #3862 > > "a -b \"c \`\"d\`\" e\""
00:02:24 verbose #3863 > > |> split_args
00:02:24 verbose #3864 > > |> _assert_eq' ;[[ "a"; "-b"; "c \`\"d\`\" e" ]]
00:02:25 verbose #3865 > 00:02:24 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e58a0ada6536e264e689e82a8a5f81a9d7913d57da27574875e9adb0f970b629/main.spi
00:02:26 verbose #3866 > >
00:02:26 verbose #3867 > > ╭─[ 1.60s - stdout ]───────────────────────────────────────────────────────────╮
00:02:26 verbose #3868 > > │ assert_eq' / actual: [|"a"; "-b"; "c `"d`" e"|] / expected: [|"a"; "-b"; "c │
00:02:26 verbose #3869 > > │ `"d`" e"|] │
00:02:26 verbose #3870 > > │ │
00:02:26 verbose #3871 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:26 verbose #3872 > >
00:02:26 verbose #3873 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:26 verbose #3874 > > //// test
00:02:26 verbose #3875 > >
00:02:26 verbose #3876 > > $'$"--text \\\\\\"\'\'\' value \'\'\'\\\\\\" "'
00:02:26 verbose #3877 > > |> split_args
00:02:26 verbose #3878 > > |> _assert_eq' ;[[ "--text"; "''' value '''" ]]
00:02:26 verbose #3879 > 00:02:25 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d817137c5747a26c2f2d75dc7c28010aeb2708df9329f24c869ff135aa081a7c/main.spi
00:02:28 verbose #3880 > >
00:02:28 verbose #3881 > > ╭─[ 1.67s - stdout ]───────────────────────────────────────────────────────────╮
00:02:28 verbose #3882 > > │ assert_eq' / actual: [|"--text"; "''' value '''"|] / expected: [|"--text"; │
00:02:28 verbose #3883 > > │ "''' value '''"|] │
00:02:28 verbose #3884 > > │ │
00:02:28 verbose #3885 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:28 verbose #3886 > >
00:02:28 verbose #3887 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:28 verbose #3888 > > //// test
00:02:28 verbose #3889 > >
00:02:28 verbose #3890 > > $'\@$"run ""get c:\\test.txt"""'
00:02:28 verbose #3891 > > |> split_args
00:02:28 verbose #3892 > > |> _assert_eq' ;[[ "run"; "get c:\\test.txt" ]]
00:02:28 verbose #3893 > 00:02:27 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a0c3914254c33144073f22c60d5c7c56ca934b4740d749f7446c4bc595ab30d2/main.spi
00:02:29 verbose #3894 > >
00:02:29 verbose #3895 > > ╭─[ 1.67s - stdout ]───────────────────────────────────────────────────────────╮
00:02:29 verbose #3896 > > │ assert_eq' / actual: [|"run"; "get c:\test.txt"|] / expected: [|"run"; "get │
00:02:29 verbose #3897 > > │ c:\test.txt"|] │
00:02:29 verbose #3898 > > │ │
00:02:29 verbose #3899 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:29 verbose #3900 > >
00:02:29 verbose #3901 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:29 verbose #3902 > > //// test
00:02:29 verbose #3903 > >
00:02:29 verbose #3904 > > "pwsh -c \"$x -replace '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] +
00:02:29 verbose #3905 > > `$counter++ }\""
00:02:29 verbose #3906 > > |> split_args
00:02:29 verbose #3907 > > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace
00:02:29 verbose #3908 > > '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]]
00:02:30 verbose #3909 > 00:02:29 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/af25fa6e945f2307906f9a3164aef9abbabd3f7597b8ee931e56ee413b759dba/main.spi
00:02:31 verbose #3910 > >
00:02:31 verbose #3911 > > ╭─[ 1.82s - stdout ]───────────────────────────────────────────────────────────╮
00:02:31 verbose #3912 > > │ assert_eq' / actual: [|"pwsh"; "-c"; │
00:02:31 verbose #3913 > > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:02:31 verbose #3914 > > │ / expected: [|"pwsh"; "-c"; │
00:02:31 verbose #3915 > > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:02:31 verbose #3916 > > │ │
00:02:31 verbose #3917 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:31 verbose #3918 > >
00:02:31 verbose #3919 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:31 verbose #3920 > > //// test
00:02:31 verbose #3921 > >
00:02:31 verbose #3922 > > $'$"pwsh -c \\\"$x -replace \'(id=\\\\\\"cell-id=)[[a-fA-F0-9]]{{8}}\', {{
00:02:31 verbose #3923 > > \`$_[[1]] + \`$counter++ }}\\\""'
00:02:31 verbose #3924 > > |> split_args
00:02:31 verbose #3925 > > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace
00:02:31 verbose #3926 > > '(id=\\\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]]
00:02:32 verbose #3927 > 00:02:30 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/424cad780bf0dc5962b55e40f8ae6453f21a0b1858411e8094962085afae9e0e/main.spi
00:02:32 verbose #3928 > >
00:02:32 verbose #3929 > > ╭─[ 1.40s - stdout ]───────────────────────────────────────────────────────────╮
00:02:32 verbose #3930 > > │ assert_eq' / actual: [|"pwsh"; "-c"; │
00:02:32 verbose #3931 > > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:02:32 verbose #3932 > > │ / expected: [|"pwsh"; "-c"; │
00:02:32 verbose #3933 > > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:02:32 verbose #3934 > > │ │
00:02:32 verbose #3935 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:32 verbose #3936 > >
00:02:32 verbose #3937 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:32 verbose #3938 > > //// test
00:02:32 verbose #3939 > >
00:02:32 verbose #3940 > > $'$"a --b --c d --e \\\"c:/f f/test.hangul.md\\\" --output \\\"c:/md.pdf\\\"
00:02:32 verbose #3941 > > --set tex.template.add \\\"\\\\usepackage{{cjkutf8-ko}}\\\"
00:02:32 verbose #3942 > > rendering.highlight.theme \\\"Solarized (dark)\\\""'
00:02:32 verbose #3943 > > |> split_args
00:02:32 verbose #3944 > > |> _assert_eq' ;[[ "a"; "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md";
00:02:32 verbose #3945 > > "--output"; "c:/md.pdf"; "--set"; "tex.template.add";
00:02:32 verbose #3946 > > "\\usepackage{cjkutf8-ko}"; "rendering.highlight.theme"; "Solarized (dark)" ]]
00:02:33 verbose #3947 > 00:02:32 debug #15 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/aae60844b3fec8d9c0ce4c51d930f9136bb9c0c0221072302ace446d667b4b52/main.spi
00:02:34 verbose #3948 > >
00:02:34 verbose #3949 > > ╭─[ 1.48s - stdout ]───────────────────────────────────────────────────────────╮
00:02:34 verbose #3950 > > │ assert_eq' / actual: [|"a"; "--b"; "--c"; "d"; "--e"; "c:/f │
00:02:34 verbose #3951 > > │ f/test.hangul.md"; "--output"; │
00:02:34 verbose #3952 > > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │
00:02:34 verbose #3953 > > │ "rendering.highlight.theme"; "Solarized (dark)"|] / expected: [|"a"; │
00:02:34 verbose #3954 > > │ "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md"; "--output"; │
00:02:34 verbose #3955 > > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │
00:02:34 verbose #3956 > > │ "rendering.highlight.theme"; "Solarized (dark)"|] │
00:02:34 verbose #3957 > > │ │
00:02:34 verbose #3958 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #3959 > >
00:02:34 verbose #3960 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:34 verbose #3961 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:34 verbose #3962 > > │ ## stdin_write_all │
00:02:34 verbose #3963 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #3964 > >
00:02:34 verbose #3965 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #3966 > > inl stdin_write_all (stdin : threading.mutex_guard process_child_stdin) (text :
00:02:34 verbose #3967 > > string) : () =
00:02:34 verbose #3968 > > inl stream = text |> sm'.as_bytes
00:02:34 verbose #3969 > > inl stdin = join stdin
00:02:34 verbose #3970 > > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore
00:02:34 verbose #3971 > > (!\\(stdin, $'"true; std::io::Write::write_all(&mut *$0,
00:02:34 verbose #3972 > > !stream).unwrap()"') : bool) |> ignore
00:02:34 verbose #3973 > 00:02:33 debug #16 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dc35a01d5ed55aef00402a5f38a75a7e3b44e7b02589c22597044d93d9319a40/main.spi
00:02:35 verbose #3974 > >
00:02:35 verbose #3975 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:35 verbose #3976 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:35 verbose #3977 > > │ ## stdin_flush │
00:02:35 verbose #3978 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:35 verbose #3979 > >
00:02:35 verbose #3980 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:35 verbose #3981 > > inl stdin_flush (stdin : threading.mutex_guard process_child_stdin) : () =
00:02:35 verbose #3982 > > inl stdin = join stdin
00:02:35 verbose #3983 > > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore
00:02:35 verbose #3984 > > (!\\(stdin, $'"true; std::io::Write::flush(&mut *$0).unwrap()"') : bool) |>
00:02:35 verbose #3985 > > ignore
00:02:35 verbose #3986 > 00:02:34 debug #17 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3d7dc494f2f3857b01d2280d2421d67c3e03b3e5e60183e0048ddac3a02ad5f1/main.spi
00:02:35 verbose #3987 > >
00:02:35 verbose #3988 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:35 verbose #3989 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:35 verbose #3990 > > │ ## new_process_command │
00:02:35 verbose #3991 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:35 verbose #3992 > >
00:02:35 verbose #3993 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:35 verbose #3994 > > inl new_process_command (file_name : string) : process_command =
00:02:35 verbose #3995 > > !\\(file_name, $'"std::process::Command::new(&*$0)"')
00:02:36 verbose #3996 > 00:02:35 debug #18 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c1fbd6b428aaedeb284a82db9837e7c43e4730cbd36cd11d65eae8c2825e897f/main.spi
00:02:36 verbose #3997 > >
00:02:36 verbose #3998 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:36 verbose #3999 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:36 verbose #4000 > > │ ## process_stdio_piped │
00:02:36 verbose #4001 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:36 verbose #4002 > >
00:02:36 verbose #4003 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:36 verbose #4004 > > inl process_stdio_piped () : process_stdio =
00:02:36 verbose #4005 > > !\($'"std::process::Stdio::piped()"')
00:02:37 verbose #4006 > 00:02:36 debug #19 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4aa2ccba1c756441b81a919ab13b9837294cdf0764519e2bc890e2e95144e0d2/main.spi
00:02:37 verbose #4007 > >
00:02:37 verbose #4008 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:37 verbose #4009 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:37 verbose #4010 > > │ ## process_command_args │
00:02:37 verbose #4011 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:37 verbose #4012 > >
00:02:37 verbose #4013 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:37 verbose #4014 > > inl process_command_args (args : am'.vec sm'.std_string) (c : process_command) :
00:02:37 verbose #4015 > > rust.ref' (rust.mut' process_command) =
00:02:37 verbose #4016 > > (!\($'"true; let mut !c = !c"') : bool) |> ignore
00:02:37 verbose #4017 > > !\\((c, args), $'"std::process::Command::args(&mut $0, &*$1)"')
00:02:37 verbose #4018 > 00:02:36 debug #20 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/622aee889293a43b592ef4eb422de91cd0d9d8e25a69be776665e43f6a357864/main.spi
00:02:38 verbose #4019 > >
00:02:38 verbose #4020 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:38 verbose #4021 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:38 verbose #4022 > > │ ## process_command_stdout │
00:02:38 verbose #4023 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:38 verbose #4024 > >
00:02:38 verbose #4025 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:38 verbose #4026 > > inl process_command_stdout (stdio : process_stdio) (c : rust.ref' (rust.mut'
00:02:38 verbose #4027 > > process_command)) : rust.ref' (rust.mut' process_command) =
00:02:38 verbose #4028 > > !\\(c, $'"std::process::Command::stdout($0, std::process::Stdio::piped())"')
00:02:38 verbose #4029 > 00:02:37 debug #21 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6b2b758526d31c9421d5ca9fdd863e13018bc6536542c11a630fa711763dda17/main.spi
00:02:39 verbose #4030 > >
00:02:39 verbose #4031 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:39 verbose #4032 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:39 verbose #4033 > > │ ## process_command_stderr │
00:02:39 verbose #4034 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:39 verbose #4035 > >
00:02:39 verbose #4036 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:39 verbose #4037 > > inl process_command_stderr (stdio : process_stdio) (c : rust.ref' (rust.mut'
00:02:39 verbose #4038 > > process_command)) : rust.ref' (rust.mut' process_command) =
00:02:39 verbose #4039 > > !\\(c, $'"std::process::Command::stderr($0, std::process::Stdio::piped())"')
00:02:39 verbose #4040 > 00:02:38 debug #22 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b6c368132169688160fe566d027bfc4536b81999a99125c77fc958602696c4aa/main.spi
00:02:39 verbose #4041 > >
00:02:39 verbose #4042 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:39 verbose #4043 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:39 verbose #4044 > > │ ## process_command_stdin │
00:02:39 verbose #4045 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:39 verbose #4046 > >
00:02:39 verbose #4047 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:39 verbose #4048 > > inl process_command_stdin (stdio : process_stdio) (c : rust.ref' (rust.mut'
00:02:39 verbose #4049 > > process_command)) : rust.ref' (rust.mut' process_command) =
00:02:39 verbose #4050 > > !\\(c, $'"std::process::Command::stdin($0, std::process::Stdio::piped())"')
00:02:40 verbose #4051 > 00:02:39 debug #23 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6501f63a578b6bef4612bee4015cb46fc8a20d377e221a39804da0c7db01cce2/main.spi
00:02:40 verbose #4052 > >
00:02:40 verbose #4053 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:40 verbose #4054 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:40 verbose #4055 > > │ ## process_command_current_dir │
00:02:40 verbose #4056 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:40 verbose #4057 > >
00:02:40 verbose #4058 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:40 verbose #4059 > > inl process_command_current_dir
00:02:40 verbose #4060 > > (dir : string)
00:02:40 verbose #4061 > > (c : rust.ref' (rust.mut' process_command))
00:02:40 verbose #4062 > > : rust.ref' (rust.mut' process_command)
00:02:40 verbose #4063 > > =
00:02:40 verbose #4064 > > !\\(dir, $'"std::process::Command::current_dir(!c, &*$0)"')
00:02:41 verbose #4065 > 00:02:40 debug #24 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dfd9608c53ae7606133f409bd6883d9375aa985d01e9da44706ff4af94b2c552/main.spi
00:02:41 verbose #4066 > >
00:02:41 verbose #4067 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:41 verbose #4068 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:41 verbose #4069 > > │ ## process_command_env │
00:02:41 verbose #4070 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:41 verbose #4071 > >
00:02:41 verbose #4072 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:41 verbose #4073 > > inl process_command_env
00:02:41 verbose #4074 > > (key : string)
00:02:41 verbose #4075 > > (value : string)
00:02:41 verbose #4076 > > (c : rust.ref' (rust.mut' process_command))
00:02:41 verbose #4077 > > : rust.ref' (rust.mut' process_command)
00:02:41 verbose #4078 > > =
00:02:41 verbose #4079 > > !\\((key, value), $'"std::process::Command::env(!c, &*$0, &*$1)"')
00:02:41 verbose #4080 > 00:02:40 debug #25 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1c40da492139d82f116cd55f43eeaf3deeb908df3c7812f116ad2bd9f9927958/main.spi
00:02:42 verbose #4081 > >
00:02:42 verbose #4082 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:42 verbose #4083 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:42 verbose #4084 > > │ ## process_command_spawn │
00:02:42 verbose #4085 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:42 verbose #4086 > >
00:02:42 verbose #4087 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #4088 > > inl process_command_spawn
00:02:42 verbose #4089 > > (c : rust.ref' (rust.mut' process_command))
00:02:42 verbose #4090 > > : resultm.result' process_child stream.io_error
00:02:42 verbose #4091 > > =
00:02:42 verbose #4092 > > !\\(c, $'"std::process::Command::spawn($0)"')
00:02:42 verbose #4093 > 00:02:41 debug #26 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e340e573b44bcc7de273a81035933991b57712724e31a32db785e41ec6747f74/main.spi
00:02:42 verbose #4094 > >
00:02:42 verbose #4095 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:42 verbose #4096 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:42 verbose #4097 > > │ ## child_wait_with_output │
00:02:42 verbose #4098 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:42 verbose #4099 > >
00:02:42 verbose #4100 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:42 verbose #4101 > > inl child_wait_with_output
00:02:42 verbose #4102 > > (child : process_child)
00:02:42 verbose #4103 > > : resultm.result' process_output stream.io_error
00:02:42 verbose #4104 > > =
00:02:42 verbose #4105 > > !\\(child, $'"$0.wait_with_output()"')
00:02:43 verbose #4106 > 00:02:42 debug #27 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9b6649d17ccbcb62806c12928d6507c276a6f885364c28198764d9c1923d239d/main.spi
00:02:43 verbose #4107 > >
00:02:43 verbose #4108 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:43 verbose #4109 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:43 verbose #4110 > > │ ## stdio_line │
00:02:43 verbose #4111 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:43 verbose #4112 > >
00:02:43 verbose #4113 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:43 verbose #4114 > > inl stdio_line
00:02:43 verbose #4115 > > (stdio : result () ())
00:02:43 verbose #4116 > > (trace' : bool)
00:02:43 verbose #4117 > > (channel_sender : threading.arc (threading.mutex (threading.channel_sender
00:02:43 verbose #4118 > > sm'.std_string)))
00:02:43 verbose #4119 > > (line : resultm.result' sm'.std_string stream.io_error)
00:02:43 verbose #4120 > > : resultm.result' () sm'.std_string
00:02:43 verbose #4121 > > =
00:02:43 verbose #4122 > > inl highlight text =
00:02:43 verbose #4123 > > $'$"\\u001b[[4;7m{!text}\\u001b[[0m"'
00:02:43 verbose #4124 > > inl line =
00:02:43 verbose #4125 > > match
00:02:43 verbose #4126 > > line
00:02:43 verbose #4127 > > |> resultm.map_error' sm'.format'
00:02:43 verbose #4128 > > |> resultm.unbox'
00:02:43 verbose #4129 > > with
00:02:43 verbose #4130 > > | Ok line =>
00:02:43 verbose #4131 > > inl line =
00:02:43 verbose #4132 > > line
00:02:43 verbose #4133 > > |> sm'.from_std_string
00:02:43 verbose #4134 > > // |> sm'.as_bytes
00:02:43 verbose #4135 > > // |> am'.slice_to_vec
00:02:43 verbose #4136 > > |> sm'.encoding_encode' (sm'.encoding_utf8' ())
00:02:43 verbose #4137 > > |> rust.cow_as_ref
00:02:43 verbose #4138 > > |> sm'.str_from_utf8
00:02:43 verbose #4139 > > // |> sm'.utf8_decode
00:02:43 verbose #4140 > > |> resultm.unwrap'
00:02:43 verbose #4141 > > |> sm'.ref_to_std_string
00:02:43 verbose #4142 > > // String::from_utf8_lossy(line.as_bytes()).into()
00:02:43 verbose #4143 > > inl line_log = line |> sm'.from_std_string
00:02:43 verbose #4144 > > inl text =
00:02:43 verbose #4145 > > match stdio with
00:02:43 verbose #4146 > > | Ok () => $'$"> {!line_log}"'
00:02:43 verbose #4147 > > | Error () => $'$"\! {!line_log}"'
00:02:43 verbose #4148 > > if trace'
00:02:43 verbose #4149 > > then trace Verbose (fun () => text) _locals
00:02:43 verbose #4150 > > else text |> console.write_line
00:02:43 verbose #4151 > > match stdio with
00:02:43 verbose #4152 > > | Ok () => line
00:02:43 verbose #4153 > > | Error () => line |> highlight |> sm'.to_std_string
00:02:43 verbose #4154 > > | Error e =>
00:02:43 verbose #4155 > > trace Critical
00:02:43 verbose #4156 > > fun () => $'$"runtime.stdio_line"'
00:02:43 verbose #4157 > > fun () => $'$"e: {!e} / {!_locals ()}"'
00:02:43 verbose #4158 > > e |> highlight |> sm'.to_std_string
00:02:43 verbose #4159 > > channel_sender
00:02:43 verbose #4160 > > |> threading.arc_mutex_lock
00:02:43 verbose #4161 > > |> resultm.unwrap'
00:02:43 verbose #4162 > > |> threading.mutex_guard_ref
00:02:43 verbose #4163 > > |> threading.channel_send line
00:02:43 verbose #4164 > > |> resultm.map_error' sm'.format'
00:02:44 verbose #4165 > 00:02:42 debug #28 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c492a1f411cb3a5beac9d6044fe3f9901a719871aa470ccf3316f593b324f649/main.spi
00:02:44 verbose #4166 > >
00:02:44 verbose #4167 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:44 verbose #4168 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:44 verbose #4169 > > │ ## execute_with_options │
00:02:44 verbose #4170 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:44 verbose #4171 > >
00:02:44 verbose #4172 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:44 verbose #4173 > > let execute_with_options (options : execution_options) : i32 * string =
00:02:44 verbose #4174 > > run_target function
00:02:44 verbose #4175 > > | Fsharp (Native) => fun () =>
00:02:44 verbose #4176 > > options |> execute_with_options_async |> async.run_synchronously
00:02:44 verbose #4177 > > | Rust (Native) => fun () =>
00:02:44 verbose #4178 > > inl command = join options.command
00:02:44 verbose #4179 > > inl file_name, arguments = command |> split_command
00:02:44 verbose #4180 > > inl arguments =
00:02:44 verbose #4181 > > arguments
00:02:44 verbose #4182 > > |> split_args
00:02:44 verbose #4183 > > |> am'.to_vec
00:02:44 verbose #4184 > > |> am'.vec_map sm'.to_std_string
00:02:44 verbose #4185 > >
00:02:44 verbose #4186 > > trace Debug
00:02:44 verbose #4187 > > fun () => $'$"runtime.execute_with_options"'
00:02:44 verbose #4188 > > fun () =>
00:02:44 verbose #4189 > > $'$"file_name: {!file_name} / arguments: %A{!arguments}"'
00:02:44 verbose #4190 > > +. $'$" / options: %A{!options} / {!_locals ()}"'
00:02:44 verbose #4191 > >
00:02:44 verbose #4192 > > fun () =>
00:02:44 verbose #4193 > > fun () =>
00:02:44 verbose #4194 > > file_name
00:02:44 verbose #4195 > > |> new_process_command
00:02:44 verbose #4196 > > |> process_command_args arguments
00:02:44 verbose #4197 > > |> process_command_stdout (process_stdio_piped ())
00:02:44 verbose #4198 > > |> process_command_stderr (process_stdio_piped ())
00:02:44 verbose #4199 > > |> process_command_stdin (process_stdio_piped ())
00:02:44 verbose #4200 > > |> fun command =>
00:02:44 verbose #4201 > > match options.working_directory |> optionm'.unbox with
00:02:44 verbose #4202 > > | Some working_directory =>
00:02:44 verbose #4203 > > command
00:02:44 verbose #4204 > > |> process_command_current_dir working_directory
00:02:44 verbose #4205 > > | None => command
00:02:44 verbose #4206 > > |> fun command =>
00:02:44 verbose #4207 > > match options.environment_variables with
00:02:44 verbose #4208 > > | ;[[]] => command
00:02:44 verbose #4209 > > | vars =>
00:02:44 verbose #4210 > > (command, vars |> am'.to_vec)
00:02:44 verbose #4211 > > ||> am'.vec_fold' fun command (key, value) =>
00:02:44 verbose #4212 > > command |> process_command_env key value
00:02:44 verbose #4213 > > |> process_command_spawn
00:02:44 verbose #4214 > > |> resultm.map_error' sm'.format'
00:02:44 verbose #4215 > > |> resultm.map' (optionm'.some' >> threading.new_arc_mutex)
00:02:44 verbose #4216 > > |> resultm.unbox'
00:02:44 verbose #4217 > > |> function
00:02:44 verbose #4218 > > | Ok child =>
00:02:44 verbose #4219 > > inl stdout =
00:02:44 verbose #4220 > > fun () =>
00:02:44 verbose #4221 > > child
00:02:44 verbose #4222 > > |> threading.arc_mutex_lock
00:02:44 verbose #4223 > > |> resultm.unwrap'
00:02:44 verbose #4224 > > |> threading.mutex_guard_ref_mut
00:02:44 verbose #4225 > > |> optionm'.as_mut
00:02:44 verbose #4226 > > |> optionm'.unwrap
00:02:44 verbose #4227 > > |> process_child_stdout
00:02:44 verbose #4228 > > |> optionm'.take_ref_mut
00:02:44 verbose #4229 > > |> optionm'.unwrap
00:02:44 verbose #4230 > > |> rust.capture
00:02:44 verbose #4231 > >
00:02:44 verbose #4232 > > inl stderr =
00:02:44 verbose #4233 > > fun () =>
00:02:44 verbose #4234 > > child
00:02:44 verbose #4235 > > |> threading.arc_mutex_lock
00:02:44 verbose #4236 > > |> resultm.unwrap'
00:02:44 verbose #4237 > > |> threading.mutex_guard_ref_mut
00:02:44 verbose #4238 > > |> optionm'.as_mut
00:02:44 verbose #4239 > > |> optionm'.unwrap
00:02:44 verbose #4240 > > |> process_child_stderr
00:02:44 verbose #4241 > > |> optionm'.take_ref_mut
00:02:44 verbose #4242 > > |> optionm'.unwrap
00:02:44 verbose #4243 > > |> rust.capture
00:02:44 verbose #4244 > >
00:02:44 verbose #4245 > > inl stdin =
00:02:44 verbose #4246 > > fun () =>
00:02:44 verbose #4247 > > child
00:02:44 verbose #4248 > > |> threading.arc_mutex_lock
00:02:44 verbose #4249 > > |> resultm.unwrap'
00:02:44 verbose #4250 > > |> threading.mutex_guard_ref_mut
00:02:44 verbose #4251 > > |> optionm'.as_mut
00:02:44 verbose #4252 > > |> optionm'.unwrap
00:02:44 verbose #4253 > > |> process_child_stdin
00:02:44 verbose #4254 > > |> optionm'.take_ref_mut
00:02:44 verbose #4255 > > |> optionm'.unwrap
00:02:44 verbose #4256 > > |> optionm'.some'
00:02:44 verbose #4257 > > |> threading.new_arc_mutex
00:02:44 verbose #4258 > > |> rust.capture
00:02:44 verbose #4259 > >
00:02:44 verbose #4260 > > inl channel_sender, channel_receiver =
00:02:44 verbose #4261 > > threading.new_channel ()
00:02:44 verbose #4262 > > inl channel_sender'' = channel_sender |>
00:02:44 verbose #4263 > > threading.new_arc_mutex
00:02:44 verbose #4264 > > inl channel_sender' = channel_sender |>
00:02:44 verbose #4265 > > threading.new_arc_mutex
00:02:44 verbose #4266 > > inl channel_receiver' = channel_receiver |>
00:02:44 verbose #4267 > > threading.new_arc_mutex
00:02:44 verbose #4268 > >
00:02:44 verbose #4269 > > inl stdout_handle =
00:02:44 verbose #4270 > > fun () =>
00:02:44 verbose #4271 > > stdout
00:02:44 verbose #4272 > > |> stream.decode_reader_bytes_build
00:02:44 verbose #4273 > > |> stream.new_buf_reader
00:02:44 verbose #4274 > > |> stream.buf_read_lines
00:02:44 verbose #4275 > > |> iter.try_for_each fun lines =>
00:02:44 verbose #4276 > > inl channel_sender'' = channel_sender''
00:02:44 verbose #4277 > > |> rust.clone
00:02:44 verbose #4278 > > lines
00:02:44 verbose #4279 > > |> stdio_line (Ok ()) options.trace
00:02:44 verbose #4280 > > channel_sender''
00:02:44 verbose #4281 > > |> resultm.to_try
00:02:44 verbose #4282 > > |> threading.spawn (1, 0) 1
00:02:44 verbose #4283 > >
00:02:44 verbose #4284 > > inl stderr_handle =
00:02:44 verbose #4285 > > fun () =>
00:02:44 verbose #4286 > > stderr
00:02:44 verbose #4287 > > |> stream.decode_reader_bytes_build
00:02:44 verbose #4288 > > |> stream.new_buf_reader
00:02:44 verbose #4289 > > |> stream.buf_read_lines
00:02:44 verbose #4290 > > |> iter.try_for_each fun lines =>
00:02:44 verbose #4291 > > inl channel_sender' = channel_sender' |>
00:02:44 verbose #4292 > > rust.clone
00:02:44 verbose #4293 > > lines
00:02:44 verbose #4294 > > |> stdio_line (Error ()) options.trace
00:02:44 verbose #4295 > > channel_sender'
00:02:44 verbose #4296 > > |> resultm.to_try
00:02:44 verbose #4297 > > |> threading.spawn (1, 0) 1
00:02:44 verbose #4298 > >
00:02:44 verbose #4299 > > match options.stdin |> optionm'.unbox with
00:02:44 verbose #4300 > > | Some stdin' =>
00:02:44 verbose #4301 > > stdin
00:02:44 verbose #4302 > > |> threading.arc_mutex_lock
00:02:44 verbose #4303 > > |> resultm.unwrap'
00:02:44 verbose #4304 > > |> threading.mutex_guard_ref_mut
00:02:44 verbose #4305 > > |> optionm'.take_ref_mut
00:02:44 verbose #4306 > > |> optionm'.map' threading.new_arc_mutex
00:02:44 verbose #4307 > > |> optionm'.unbox
00:02:44 verbose #4308 > > |> function
00:02:44 verbose #4309 > > | Some stdin =>
00:02:44 verbose #4310 > > stdin |> stdin'
00:02:44 verbose #4311 > > stdin
00:02:44 verbose #4312 > > |> threading.arc_mutex_lock
00:02:44 verbose #4313 > > |> resultm.unwrap'
00:02:44 verbose #4314 > > |> stdin_flush
00:02:44 verbose #4315 > > | None => ()
00:02:44 verbose #4316 > > | None => ()
00:02:44 verbose #4317 > >
00:02:44 verbose #4318 > > inl output =
00:02:44 verbose #4319 > > child
00:02:44 verbose #4320 > > |> threading.arc_mutex_lock
00:02:44 verbose #4321 > > |> resultm.unwrap'
00:02:44 verbose #4322 > > |> threading.mutex_guard_ref_mut
00:02:44 verbose #4323 > > |> optionm'.take_ref_mut
00:02:44 verbose #4324 > > |> optionm'.unwrap
00:02:44 verbose #4325 > > |> child_wait_with_output
00:02:44 verbose #4326 > > |> resultm.map_error' sm'.format'
00:02:44 verbose #4327 > >
00:02:44 verbose #4328 > > [[ stdout_handle; stderr_handle ]]
00:02:44 verbose #4329 > > |> am'.new_vec
00:02:44 verbose #4330 > > |> am'.vec_for_each' (threading.join' >>
00:02:44 verbose #4331 > > resultm.unwrap' >> resultm.unwrap')
00:02:44 verbose #4332 > >
00:02:44 verbose #4333 > > match output |> resultm.unbox with
00:02:44 verbose #4334 > > | Ok output =>
00:02:44 verbose #4335 > > inl exit_code =
00:02:44 verbose #4336 > > output
00:02:44 verbose #4337 > > |> process_output_status
00:02:44 verbose #4338 > > |> process_exit_status_code
00:02:44 verbose #4339 > > |> optionm'.unwrap
00:02:44 verbose #4340 > > exit_code, None, Some channel_receiver'
00:02:44 verbose #4341 > > | Error error =>
00:02:44 verbose #4342 > > trace Critical
00:02:44 verbose #4343 > > fun () => $'$"runtime.execute_with_options
00:02:44 verbose #4344 > > output error"'
00:02:44 verbose #4345 > > fun () => $'$"error: {!error} / {!_locals
00:02:44 verbose #4346 > > ()}"'
00:02:44 verbose #4347 > > -2i32, error |> Some, None
00:02:44 verbose #4348 > > | Error error =>
00:02:44 verbose #4349 > > trace Critical
00:02:44 verbose #4350 > > fun () => $'$"runtime.execute_with_options
00:02:44 verbose #4351 > > child error"'
00:02:44 verbose #4352 > > fun () => $'$"error: {!error} / {!_locals ()}"'
00:02:44 verbose #4353 > > -1i32, error |> Some, None
00:02:44 verbose #4354 > > |> function
00:02:44 verbose #4355 > > | exit_code, std_trace, channel_receiver =>
00:02:44 verbose #4356 > > inl std_trace =
00:02:44 verbose #4357 > > channel_receiver
00:02:44 verbose #4358 > > |> optionm'.box
00:02:44 verbose #4359 > > |> optionm'.map' fun channel_receiver =>
00:02:44 verbose #4360 > > channel_receiver
00:02:44 verbose #4361 > > |> threading.arc_mutex_lock
00:02:44 verbose #4362 > > |> resultm.unwrap'
00:02:44 verbose #4363 > > |> iter.iter
00:02:44 verbose #4364 > > |> iter_prototypes.iter_collect''
00:02:44 verbose #4365 > > |> am'.vec_map sm'.from_std_string
00:02:44 verbose #4366 > > |> am'.from_vec
00:02:44 verbose #4367 > > |> fun x => x : _ i32 _
00:02:44 verbose #4368 > > |> seq.of_array
00:02:44 verbose #4369 > > |> sm'.concat "\n"
00:02:44 verbose #4370 > > |> optionm'.default_value' (
00:02:44 verbose #4371 > > std_trace
00:02:44 verbose #4372 > > |> optionm.map sm'.from_std_string
00:02:44 verbose #4373 > > |> optionm'.default_value ""
00:02:44 verbose #4374 > > )
00:02:44 verbose #4375 > > trace Verbose
00:02:44 verbose #4376 > > fun () => $'$"runtime.execute_with_options
00:02:44 verbose #4377 > > result"'
00:02:44 verbose #4378 > > fun () =>
00:02:44 verbose #4379 > > $'$"exit_code: {!exit_code}"'
00:02:44 verbose #4380 > > +. $'$" / std_trace.Length:
00:02:44 verbose #4381 > > {!std_trace.Length} / {!_locals ()}"'
00:02:44 verbose #4382 > > new_pair exit_code std_trace
00:02:44 verbose #4383 > > |> capture
00:02:44 verbose #4384 > > |> async.future_init (3, 2) 1
00:02:44 verbose #4385 > > |> async.block_on
00:02:44 verbose #4386 > > |> from_pair
00:02:44 verbose #4387 > > | _ => fun () => null ()
00:02:45 verbose #4388 > 00:02:43 debug #29 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/da57e6bd8d7ad856c7e6791cc6eed22a9706cd7b9fe101f49c728d9eed75dffe/main.spi
00:02:45 verbose #4389 > >
00:02:45 verbose #4390 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:45 verbose #4391 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:45 verbose #4392 > > │ ### execute │
00:02:45 verbose #4393 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:45 verbose #4394 > >
00:02:45 verbose #4395 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:45 verbose #4396 > > inl execute command =
00:02:45 verbose #4397 > > execution_options fun x => { x with
00:02:45 verbose #4398 > > command = command
00:02:45 verbose #4399 > > }
00:02:45 verbose #4400 > > |> execute_with_options
00:02:45 verbose #4401 > 00:02:44 debug #30 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d668d1d64e785f7f976312b68f701ad14f6c70251f91ec0ab9cd7b6903eb225/main.spi
00:02:46 verbose #4402 > >
00:02:46 verbose #4403 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:46 verbose #4404 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:46 verbose #4405 > > │ ### test 1 │
00:02:46 verbose #4406 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:46 verbose #4407 > >
00:02:46 verbose #4408 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:46 verbose #4409 > > //// test
00:02:46 verbose #4410 > > ///! rust -d chrono encoding_rs encoding_rs_io futures futures-lite regex
00:02:46 verbose #4411 > >
00:02:46 verbose #4412 > > types ()
00:02:46 verbose #4413 > > inl temp_folder, disposable = file_system.create_temp_directory ()
00:02:46 verbose #4414 > > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮"
00:02:46 verbose #4415 > > // inl content = "test"
00:02:46 verbose #4416 > > fun () =>
00:02:46 verbose #4417 > > inl file_name = join "test.txt"
00:02:46 verbose #4418 > > inl path = temp_folder </> file_name |> file_system.normalize_path
00:02:46 verbose #4419 > > inl exit_code, result =
00:02:46 verbose #4420 > > execute $'\@$"pwsh -c ""[[IO.File]]::ReadAllText(\'{!path}\')"""'
00:02:46 verbose #4421 > > exit_code |> _assert_eq 1
00:02:46 verbose #4422 > > result |> _assert_string_contains "not find file"
00:02:46 verbose #4423 > >
00:02:46 verbose #4424 > > content |> file_system.write_all_text path
00:02:46 verbose #4425 > >
00:02:46 verbose #4426 > > execution_options fun x => { x with
00:02:46 verbose #4427 > > command = $'\@$"cat ""{!file_name}"""'
00:02:46 verbose #4428 > > working_directory = Some temp_folder |> optionm'.box
00:02:46 verbose #4429 > > }
00:02:46 verbose #4430 > > |> execute_with_options
00:02:46 verbose #4431 > > |> ignore
00:02:46 verbose #4432 > >
00:02:46 verbose #4433 > > execution_options fun x => { x with
00:02:46 verbose #4434 > > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding =
00:02:46 verbose #4435 > > [[System.Text.Encoding]]::UTF8; [[IO.File]]::ReadAllText(\'{!file_name}\')"""'
00:02:46 verbose #4436 > > working_directory = Some temp_folder |> optionm'.box
00:02:46 verbose #4437 > > }
00:02:46 verbose #4438 > > |> execute_with_options
00:02:46 verbose #4439 > > |> fun fn => fn () |> Some
00:02:46 verbose #4440 > > |> function
00:02:46 verbose #4441 > > | Some (exit_code, output) =>
00:02:46 verbose #4442 > > exit_code |> _assert_eq 0i32
00:02:46 verbose #4443 > > output |> _assert_eq content
00:02:46 verbose #4444 > > true
00:02:46 verbose #4445 > > | _ => false
00:02:46 verbose #4446 > > |> _assert_eq true
00:02:46 verbose #4447 > > disposable |> use |> ignore
00:02:46 verbose #4448 > 00:02:45 debug #31 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/31d079a97852ea567482f5ce9b9398fa19ab913ba76eb6b194e3f3f2c9ddb490/main.spi
00:02:56 verbose #4449 > >
00:02:56 verbose #4450 > > ╭─[ 10.48s - return value ]────────────────────────────────────────────────────╮
00:02:56 verbose #4451 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:02:56 verbose #4452 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_4ea0aab5cf29d7fd6cb5de3689 │
00:02:56 verbose #4453 > > │ 98a13c845d152124950bc7865508fc4f2bb1d4\20240520-2154-4457-2342-000000478d36 │
00:02:56 verbose #4454 > > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │
00:02:56 verbose #4455 > > │ arguments: ["-c", "[ │
00:02:56 verbose #4456 > > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_4ea │
00:02:56 verbose #4457 > > │ 0aab5cf29d7fd6cb5de368998a13c845d152124950bc7865508fc4f2bb1d4/20240520-2154- │
00:02:56 verbose #4458 > > │ 4457-2342-000000478d36/test.txt')"] / options: (None, "pwsh -c "[ │
00:02:56 verbose #4459 > > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_4ea │
00:02:56 verbose #4460 > > │ 0aab5cf29d7fd6cb5de368998a13c845d152124950bc7865508fc4f2bb1d4/20240520-2154- │
00:02:56 verbose #4461 > > │ 4457-2342-000000478d36/test.txt')"", Array(MutCell([])), None, None, true, │
00:02:56 verbose #4462 > > │ None) │
00:02:56 verbose #4463 > > │ 00:00:00 verbose #3 ! MethodInvocationException: Exception │
00:02:56 verbose #4464 > > │ calling "ReadAllText" with "1" argument(s): "Could not find file │
00:02:56 verbose #4465 > > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_4ea0aab5cf29d7fd6cb5de368 │
00:02:56 verbose #4466 > > │ 998a13c845d152124950bc7865508fc4f2bb1d4\20240520-2154-4457-2342-000000478d36 │
00:02:56 verbose #4467 > > │ \test.txt'." │
00:02:56 verbose #4468 > > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │
00:02:56 verbose #4469 > > │ 1 / std_trace.Length: 294 │
00:02:56 verbose #4470 > > │ assert_eq / actual: 1 / expected: 1 │
00:02:56 verbose #4471 > > │ assert_string_contains / actual: "not find file" / expected: "[ │
00:02:56 verbose #4472 > > │ 31;1mMethodInvocationException: Exception calling "ReadAllText" with │
00:02:56 verbose #4473 > > │ "1" argument(s): "Could not find file │
00:02:56 verbose #4474 > > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_4ea0aab5cf29d7fd6cb5de368 │
00:02:56 verbose #4475 > > │ 998a13c845d15... │
00:02:56 verbose #4476 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:56 verbose #4477 > >
00:02:56 verbose #4478 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:56 verbose #4479 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:56 verbose #4480 > > │ ## command │
00:02:56 verbose #4481 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:56 verbose #4482 > >
00:02:56 verbose #4483 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:56 verbose #4484 > > nominal command = $'clap_Command'
00:02:57 verbose #4485 > 00:02:55 debug #32 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5a671467dd3c266493e536ee7d8c4e5efbbabbfcaad7e2d7f6e3506869a586c2/main.spi
00:02:57 verbose #4486 > >
00:02:57 verbose #4487 > > ── markdown ────────────────────────────────────────────────────────────────────
00:02:57 verbose #4488 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:57 verbose #4489 > > │ ## new_command │
00:02:57 verbose #4490 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:57 verbose #4491 > >
00:02:57 verbose #4492 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:57 verbose #4493 > > inl new_command (s : rust.static_ref' sm'.str) : command =
00:02:57 verbose #4494 > > !\\(s, $'"clap::Command::new($0)"')
00:02:57 verbose #4495 > 00:02:56 debug #33 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dbc2c62d9b57ffc43fe9f0464fbb3e3bf016726a215cbd972f9e2b22b0f9dd51/main.spi
00:02:58 verbose #4496 > >
00:02:58 verbose #4497 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:58 verbose #4498 > > //// test
00:02:58 verbose #4499 > > ///! rust -d clap
00:02:58 verbose #4500 > >
00:02:58 verbose #4501 > > types ()
00:02:58 verbose #4502 > > ##"command"
00:02:58 verbose #4503 > > |> new_command
00:02:58 verbose #4504 > > |> sm'.format_pretty'
00:02:58 verbose #4505 > > |> sm'.from_std_string
00:02:58 verbose #4506 > > |> _assert_string_contains "command"
00:02:58 verbose #4507 > 00:02:57 debug #34 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4f9fa7b19f5c0e3c76d0f99500e3dc5c15cb15f9b3080c6c77573bbac8008c41/main.spi
00:03:02 verbose #4508 > >
00:03:02 verbose #4509 > > ╭─[ 4.80s - return value ]─────────────────────────────────────────────────────╮
00:03:02 verbose #4510 > > │ assert_string_contains / actual: "command" / expected: "Command { │
00:03:02 verbose #4511 > > │ name: "command", │
00:03:02 verbose #4512 > > │ long_flag: None, │
00:03:02 verbose #4513 > > │ short_flag: None, │
00:03:02 verbose #4514 > > │ display_name: None, │
00:03:02 verbose #4515 > > │ bin_name: None, │
00:03:02 verbose #4516 > > │ author: None, │
00:03:02 verbose #4517 > > │ version: None, │
00:03:02 verbose #4518 > > │ long_version: None, │
00:03:02 verbose #4519 > > │ about: None, │
00:03:02 verbose #4520 > > │ long_about: None, │
00:03:02 verbose #4521 > > │ before_help: None, │
00:03:02 verbose #4522 > > │ before_long_help: None, │
00:03:02 verbose #4523 > > │ after_help: None, │
00:03:02 verbose #4524 > > │ after_long_help: None, │
00:03:02 verbose #4525 > > │ aliases: [], │
00:03:02 verbose #4526 > > │ short_flag_aliases: [], │
00:03:02 verbose #4527 > > │ long_flag_aliases: [], │
00:03:02 verbose #4528 > > │ usage_str: None, │
00:03:02 verbose #4529 > > │ usage_name: None, │
00:03:02 verbose #4530 > > │ help_str: None, │
00:03:02 verbose #4531 > > │ disp_ord: None, │
00:03:02 verbose #4532 > > │ template: None, │
00:03:02 verbose #4533 > > │ settings: AppFlags( │
00:03:02 verbose #4534 > > │ 0, │
00:03:02 verbose #4535 > > │ ), │
00:03:02 verbose #4536 > > │ g_settings: AppFlags( │
00:03:02 verbose #4537 > > │ 0, │
00:03:02 verbose #4538 > > │ ), │
00:03:02 verbose #4539 > > │ args: MKeyMap { │
00:03:02 verbose #4540 > > │ args: [], │
00:03:02 verbose #4541 > > │ keys: [], │
00:03:02 verbose #4542 > > │ }, │
00:03:02 verbose #4543 > > │ subcommands: [], │
00:03:02 verbose #4544 > > │ groups: [], │
00:03:02 verbose #4545 > > │ current_help_heading: None, │
00:03:02 verbose #4546 > > │ current_disp_ord: Some( │
00:03:02 verbose #4547 > > │ 0, │
00:03:02 verbose #4548 > > │ ), │
00:03:02 verbose #4549 > > │ subcommand_value_name: None, │
00:03:02 verbose #4550 > > │ subcommand_heading: None, │
00:03:02 verbose #4551 > > │ external_value_parser: None, │
00:03:02 verbose #4552 > > │ long_help_exists: false, │
00:03:02 verbose #4553 > > │ deferred: None, │
00:03:02 verbose #4554 > > │ app_ext: Extensions { │
00:03:02 verbose #4555 > > │ extensions: FlatMap { │
00:03:02 verbose #4556 > > │ keys: [], │
00:03:02 verbose #4557 > > │ values: [], │
00:03:02 verbose #4558 > > │ }, │
00:03:02 verbose #4559 > > │ }, │
00:03:02 verbose #4560 > > │ }" │
00:03:02 verbose #4561 > > │ │
00:03:02 verbose #4562 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:02 verbose #4563 > >
00:03:02 verbose #4564 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:02 verbose #4565 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:02 verbose #4566 > > │ ## arg │
00:03:02 verbose #4567 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:02 verbose #4568 > >
00:03:02 verbose #4569 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:02 verbose #4570 > > nominal arg = $'clap_Arg'
00:03:03 verbose #4571 > 00:03:02 debug #35 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bda0fd3c70ed7278d299b4cb23df64a0f5941ad1277475cfaf1e45c31706ad0a/main.spi
00:03:03 verbose #4572 > >
00:03:03 verbose #4573 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:03 verbose #4574 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:03 verbose #4575 > > │ ## new_arg │
00:03:03 verbose #4576 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:03 verbose #4577 > >
00:03:03 verbose #4578 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:03 verbose #4579 > > inl new_arg (s : rust.static_ref' sm'.str) : arg =
00:03:03 verbose #4580 > > !\\(s, $'"clap::Arg::new($0)"')
00:03:04 verbose #4581 > 00:03:03 debug #36 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4b4d09e5fd10a75466b4f6dad8a1d59b0057994a86af1be7079eb51fcfd2bf61/main.spi
00:03:04 verbose #4582 > >
00:03:04 verbose #4583 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:04 verbose #4584 > > //// test
00:03:04 verbose #4585 > > ///! rust -d clap
00:03:04 verbose #4586 > >
00:03:04 verbose #4587 > > types ()
00:03:04 verbose #4588 > > ##"arg"
00:03:04 verbose #4589 > > |> new_arg
00:03:04 verbose #4590 > > |> sm'.format_pretty'
00:03:04 verbose #4591 > > |> sm'.from_std_string
00:03:04 verbose #4592 > > |> _assert_string_contains "arg"
00:03:05 verbose #4593 > 00:03:03 debug #37 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6a2303c169151ed2038a895174955602b73f23fad1ba3555c4ee4fb8ec4823cc/main.spi
00:03:08 verbose #4594 > >
00:03:08 verbose #4595 > > ╭─[ 4.15s - return value ]─────────────────────────────────────────────────────╮
00:03:08 verbose #4596 > > │ assert_string_contains / actual: "arg" / expected: "Arg { │
00:03:08 verbose #4597 > > │ id: "arg", │
00:03:08 verbose #4598 > > │ help: None, │
00:03:08 verbose #4599 > > │ long_help: None, │
00:03:08 verbose #4600 > > │ action: None, │
00:03:08 verbose #4601 > > │ value_parser: None, │
00:03:08 verbose #4602 > > │ blacklist: [], │
00:03:08 verbose #4603 > > │ settings: ArgFlags( │
00:03:08 verbose #4604 > > │ 0, │
00:03:08 verbose #4605 > > │ ), │
00:03:08 verbose #4606 > > │ overrides: [], │
00:03:08 verbose #4607 > > │ groups: [], │
00:03:08 verbose #4608 > > │ requires: [], │
00:03:08 verbose #4609 > > │ r_ifs: [], │
00:03:08 verbose #4610 > > │ r_unless: [], │
00:03:08 verbose #4611 > > │ short: None, │
00:03:08 verbose #4612 > > │ long: None, │
00:03:08 verbose #4613 > > │ aliases: [], │
00:03:08 verbose #4614 > > │ short_aliases: [], │
00:03:08 verbose #4615 > > │ disp_ord: None, │
00:03:08 verbose #4616 > > │ val_names: [], │
00:03:08 verbose #4617 > > │ num_vals: None, │
00:03:08 verbose #4618 > > │ val_delim: None, │
00:03:08 verbose #4619 > > │ default_vals: [], │
00:03:08 verbose #4620 > > │ default_vals_ifs: [], │
00:03:08 verbose #4621 > > │ terminator: None, │
00:03:08 verbose #4622 > > │ index: None, │
00:03:08 verbose #4623 > > │ help_heading: None, │
00:03:08 verbose #4624 > > │ value_hint: None, │
00:03:08 verbose #4625 > > │ default_missing_vals: [], │
00:03:08 verbose #4626 > > │ }" │
00:03:08 verbose #4627 > > │ │
00:03:08 verbose #4628 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:08 verbose #4629 > >
00:03:08 verbose #4630 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:08 verbose #4631 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:08 verbose #4632 > > │ ## command_arg │
00:03:08 verbose #4633 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:08 verbose #4634 > >
00:03:08 verbose #4635 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:08 verbose #4636 > > inl command_arg (arg : arg) (command : command) : command =
00:03:08 verbose #4637 > > !\\((command, arg), $'"clap::Command::arg($0, $1)"')
00:03:09 verbose #4638 > 00:03:07 debug #38 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/072250bb49f23b1927005b24855ce298466363ae75596c21d8be992629e174ce/main.spi
00:03:09 verbose #4639 > >
00:03:09 verbose #4640 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:09 verbose #4641 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:09 verbose #4642 > > │ ## arg_required │
00:03:09 verbose #4643 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:09 verbose #4644 > >
00:03:09 verbose #4645 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:09 verbose #4646 > > inl arg_required (value : bool) (arg : arg) : arg =
00:03:09 verbose #4647 > > !\\((arg, value), $'"$0.required($1)"')
00:03:09 verbose #4648 > 00:03:08 debug #39 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8f006b22d0f69c0cde2b7b93d9ee8526ee89603acf3645bdf62db5a5133103eb/main.spi
00:03:10 verbose #4649 > >
00:03:10 verbose #4650 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:10 verbose #4651 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:10 verbose #4652 > > │ ## arg_short │
00:03:10 verbose #4653 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:10 verbose #4654 > >
00:03:10 verbose #4655 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:10 verbose #4656 > > inl arg_short (value : char) (arg : arg) : arg =
00:03:10 verbose #4657 > > !\\((arg, value), $'"$0.short($1)"')
00:03:10 verbose #4658 > 00:03:09 debug #40 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b84f334e2f78ff89e1f69571e95113f4ce600b512d6332a44c4155cd6fd4dd74/main.spi
00:03:10 verbose #4659 > >
00:03:10 verbose #4660 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:10 verbose #4661 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:10 verbose #4662 > > │ ## arg_long │
00:03:10 verbose #4663 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:10 verbose #4664 > >
00:03:10 verbose #4665 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:10 verbose #4666 > > inl arg_long (value : rust.static_ref' sm'.str) (arg : arg) : arg =
00:03:10 verbose #4667 > > !\\((arg, value), $'"$0.long($1)"')
00:03:11 verbose #4668 > 00:03:10 debug #41 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e86f02f6b19c734f5eb8c08c91b77c12d7cd2c48a7c9771603acd7fd87304e16/main.spi
00:03:11 verbose #4669 > >
00:03:11 verbose #4670 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:11 verbose #4671 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:11 verbose #4672 > > │ ## arg_value_names │
00:03:11 verbose #4673 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:11 verbose #4674 > >
00:03:11 verbose #4675 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:11 verbose #4676 > > inl arg_value_names (values : array_base (rust.static_ref' sm'.str)) (arg : arg)
00:03:11 verbose #4677 > > : arg =
00:03:11 verbose #4678 > > inl values = values |> am'.to_vec
00:03:11 verbose #4679 > > !\\((arg, values), $'"$0.value_names($1)"')
00:03:12 verbose #4680 > 00:03:10 debug #42 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/24abc8bde3b5237635a0153d0197bb4d761014eb7c4c65b329ae42b10a5250ec/main.spi
00:03:12 verbose #4681 > >
00:03:12 verbose #4682 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:12 verbose #4683 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:12 verbose #4684 > > │ ## arg_num_args │
00:03:12 verbose #4685 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:12 verbose #4686 > >
00:03:12 verbose #4687 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:12 verbose #4688 > > inl arg_num_args (value : i32) (arg : arg) : arg =
00:03:12 verbose #4689 > > !\\((arg, value), $'"$0.num_args($1)"')
00:03:12 verbose #4690 > 00:03:11 debug #43 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/069504efd729f27b8a02b505d46b7736d3f48c00e20a6885811716ddd2c951a8/main.spi
00:03:13 verbose #4691 > >
00:03:13 verbose #4692 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:13 verbose #4693 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:13 verbose #4694 > > │ ## value_range │
00:03:13 verbose #4695 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:13 verbose #4696 > >
00:03:13 verbose #4697 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:13 verbose #4698 > > nominal value_range = $'clap_builder_ValueRange'
00:03:13 verbose #4699 > 00:03:12 debug #44 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/66e8ff130ffbeb655a308bca48b07220f85a121e4be93eac7ae777315ce3b744/main.spi
00:03:14 verbose #4700 > >
00:03:14 verbose #4701 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:14 verbose #4702 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:14 verbose #4703 > > │ ## new_value_range │
00:03:14 verbose #4704 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:14 verbose #4705 > >
00:03:14 verbose #4706 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:14 verbose #4707 > > inl new_value_range start end : value_range =
00:03:14 verbose #4708 > > inl len = 0i32 |> convert
00:03:14 verbose #4709 > > inl start, end =
00:03:14 verbose #4710 > > open am'
00:03:14 verbose #4711 > > match start, end with
00:03:14 verbose #4712 > > | Start start, End fn =>
00:03:14 verbose #4713 > > start, len |> fn
00:03:14 verbose #4714 > > | End start_fn, End end_fn =>
00:03:14 verbose #4715 > > start_fn len, end_fn len
00:03:14 verbose #4716 > > match start, end with
00:03:14 verbose #4717 > > | start, end when end =. len =>
00:03:14 verbose #4718 > > !\($'"clap::builder::ValueRange::new(!start..)"')
00:03:14 verbose #4719 > > | start, end => !\($'"clap::builder::ValueRange::new(!start..!end)"')
00:03:14 verbose #4720 > 00:03:13 debug #45 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2417d0e40c62defcd0c22b5235a101716125c3bb1dff448e73399f338d54d377/main.spi
00:03:14 verbose #4721 > >
00:03:14 verbose #4722 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:14 verbose #4723 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:14 verbose #4724 > > │ ## arg_num_args_range │
00:03:14 verbose #4725 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:14 verbose #4726 > >
00:03:14 verbose #4727 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:14 verbose #4728 > > inl arg_num_args_range (value : value_range) (arg : arg) : arg =
00:03:14 verbose #4729 > > !\\((arg, value), $'"$0.num_args($1)"')
00:03:15 verbose #4730 > 00:03:14 debug #46 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8f6aff36a4b2da5dd26321cb8e1813aeea2243ccaf5b10d706d38f70dbe8064f/main.spi
00:03:15 verbose #4731 > >
00:03:15 verbose #4732 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:15 verbose #4733 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:15 verbose #4734 > > │ ## arg_value_name │
00:03:15 verbose #4735 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:15 verbose #4736 > >
00:03:15 verbose #4737 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:15 verbose #4738 > > inl arg_value_name (value : string) (arg : arg) : arg =
00:03:15 verbose #4739 > > inl value = value |> sm'.as_str
00:03:15 verbose #4740 > > !\\((arg, value), $'"$0.value_name($1)"')
00:03:16 verbose #4741 > 00:03:14 debug #47 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a4694b954efb65b96a4331ca2b9accd5839c24f319aa9dc90eacc24c2f7688e5/main.spi
00:03:16 verbose #4742 > >
00:03:16 verbose #4743 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:16 verbose #4744 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:16 verbose #4745 > > │ ## value_parser │
00:03:16 verbose #4746 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:16 verbose #4747 > >
00:03:16 verbose #4748 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:16 verbose #4749 > > nominal value_parser = $'clap_builder_ValueParser'
00:03:16 verbose #4750 > 00:03:15 debug #48 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/538e556239cfb0467490fbfc399984cfcc8e889b2b5e76acfea3fd6d96c22ea6/main.spi
00:03:17 verbose #4751 > >
00:03:17 verbose #4752 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:17 verbose #4753 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:17 verbose #4754 > > │ ## possible_value │
00:03:17 verbose #4755 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:17 verbose #4756 > >
00:03:17 verbose #4757 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:17 verbose #4758 > > nominal possible_value = $'clap_builder_PossibleValue'
00:03:17 verbose #4759 > 00:03:16 debug #49 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b729d223733562de889006253c8407cb7003fe1287ded725747cbe3636e43af4/main.spi
00:03:17 verbose #4760 > >
00:03:17 verbose #4761 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:17 verbose #4762 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:17 verbose #4763 > > │ ## new_possible_value │
00:03:17 verbose #4764 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:17 verbose #4765 > >
00:03:17 verbose #4766 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:17 verbose #4767 > > inl new_possible_value forall t. (x : t) : possible_value =
00:03:17 verbose #4768 > > !\\(x, $'"clap::builder::PossibleValue::new(&**$0)"')
00:03:18 verbose #4769 > 00:03:17 debug #50 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5fbb03c309ee0f04f9d37229df7e6fb3453494caf01b36d1a0b9cacbd3fa6bf3/main.spi
00:03:18 verbose #4770 > >
00:03:18 verbose #4771 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:18 verbose #4772 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:18 verbose #4773 > > │ ## value_parser_possible_values │
00:03:18 verbose #4774 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:18 verbose #4775 > >
00:03:18 verbose #4776 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:18 verbose #4777 > > inl value_parser_possible_values (values : array_base string) : value_parser =
00:03:18 verbose #4778 > > inl values =
00:03:18 verbose #4779 > > values
00:03:18 verbose #4780 > > |> am'.to_vec
00:03:18 verbose #4781 > > |> am'.vec_map (sm'.to_std_string >> rust.new_box >> rust.box_leak >>
00:03:18 verbose #4782 > > new_possible_value)
00:03:18 verbose #4783 > > !\\(values, $'"clap::builder::PossibleValuesParser::new($0).into()"')
00:03:19 verbose #4784 > 00:03:17 debug #51 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/79f35da894c175f3faa1f3354618d666b31ebca154e1e7363197c082db13c4a2/main.spi
00:03:19 verbose #4785 > >
00:03:19 verbose #4786 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:19 verbose #4787 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:19 verbose #4788 > > │ ## value_parser_path_buf │
00:03:19 verbose #4789 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:19 verbose #4790 > >
00:03:19 verbose #4791 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:19 verbose #4792 > > inl value_parser_path_buf () : value_parser =
00:03:19 verbose #4793 > > !\($'"clap::value_parser\!(std::path::PathBuf)"')
00:03:20 verbose #4794 > 00:03:18 debug #52 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2447ed85d1286f91cb94500af997118fb7397d1f7d1a5bcc8f137a443312281b/main.spi
00:03:20 verbose #4795 > >
00:03:20 verbose #4796 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:20 verbose #4797 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:20 verbose #4798 > > │ ## value_parser_expr │
00:03:20 verbose #4799 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:20 verbose #4800 > >
00:03:20 verbose #4801 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:20 verbose #4802 > > inl value_parser_expr (expr : string) : value_parser =
00:03:20 verbose #4803 > > !\($'"clap::value_parser\!(" + !expr + ").into()"')
00:03:20 verbose #4804 > 00:03:19 debug #53 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/648f54afa5188ac42941a15e7e24f0f3d5f13977967f4353a3d132fb5c083db2/main.spi
00:03:20 verbose #4805 > >
00:03:20 verbose #4806 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:20 verbose #4807 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:20 verbose #4808 > > │ ## arg_value_parser │
00:03:20 verbose #4809 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:20 verbose #4810 > >
00:03:20 verbose #4811 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:20 verbose #4812 > > inl arg_value_parser (values : value_parser) (arg : arg) : arg =
00:03:20 verbose #4813 > > !\\((arg, values), $'"$0.value_parser($1)"')
00:03:21 verbose #4814 > 00:03:20 debug #54 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ad2d347afdec6ad7328e7d72840fef45bf00f5c2f0237436d477947e63ca3ba3/main.spi
00:03:21 verbose #4815 > >
00:03:21 verbose #4816 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:21 verbose #4817 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:21 verbose #4818 > > │ ## arg_union │
00:03:21 verbose #4819 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:21 verbose #4820 > >
00:03:21 verbose #4821 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:21 verbose #4822 > > inl arg_union forall union_type {to_string}. (fn : union_type -> ()) (arg : arg)
00:03:21 verbose #4823 > > : arg =
00:03:21 verbose #4824 > > arg
00:03:21 verbose #4825 > > |> arg_value_parser (
00:03:21 verbose #4826 > > real get_union_fields_untag `union_type ()
00:03:21 verbose #4827 > > |> fun x => x : list union_type
00:03:21 verbose #4828 > > |> listm.map to_string
00:03:21 verbose #4829 > > |> listm'.box
00:03:21 verbose #4830 > > |> listm'.to_array'
00:03:21 verbose #4831 > > |> fun (a x : _ i32 _) => x
00:03:21 verbose #4832 > > |> value_parser_possible_values
00:03:21 verbose #4833 > > )
00:03:22 verbose #4834 > 00:03:21 debug #55 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dcef037e73e40dde0b31bb77e4bf6b3bc43567ae9edb1954385fc519da83c4f7/main.spi
00:03:22 verbose #4835 > >
00:03:22 verbose #4836 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:22 verbose #4837 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:22 verbose #4838 > > │ ## arg_action │
00:03:22 verbose #4839 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:22 verbose #4840 > >
00:03:22 verbose #4841 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:22 verbose #4842 > > nominal arg_action' = $'clap_ArgAction'
00:03:22 verbose #4843 > >
00:03:22 verbose #4844 > > union arg_action =
00:03:22 verbose #4845 > > | Set
00:03:22 verbose #4846 > > | Append
00:03:22 verbose #4847 > > | SetTrue
00:03:22 verbose #4848 > > | SetFalse
00:03:22 verbose #4849 > > | Count
00:03:22 verbose #4850 > > | Help
00:03:22 verbose #4851 > > | HelpShort
00:03:22 verbose #4852 > > | HelpLong
00:03:22 verbose #4853 > > | Version
00:03:22 verbose #4854 > >
00:03:22 verbose #4855 > > inl arg_action = function
00:03:22 verbose #4856 > > | Set => !\($'"clap::ArgAction::Set"') : arg_action'
00:03:22 verbose #4857 > > | Append => !\($'"clap::ArgAction::Append"') : arg_action'
00:03:22 verbose #4858 > > | SetTrue => !\($'"clap::ArgAction::SetTrue"') : arg_action'
00:03:22 verbose #4859 > > | SetFalse => !\($'"clap::ArgAction::SetFalse"') : arg_action'
00:03:22 verbose #4860 > > | Count => !\($'"clap::ArgAction::Count"') : arg_action'
00:03:22 verbose #4861 > > | Help => !\($'"clap::ArgAction::Help"') : arg_action'
00:03:22 verbose #4862 > > | HelpShort => !\($'"clap::ArgAction::HelpShort"') : arg_action'
00:03:22 verbose #4863 > > | HelpLong => !\($'"clap::ArgAction::HelpLong"') : arg_action'
00:03:22 verbose #4864 > > | Version => !\($'"clap::ArgAction::Version"') : arg_action'
00:03:22 verbose #4865 > >
00:03:22 verbose #4866 > > inl arg_action (value : arg_action) (arg : arg) : arg =
00:03:22 verbose #4867 > > inl value = value |> arg_action
00:03:22 verbose #4868 > > !\\((arg, value), $'"$0.action($1)"')
00:03:23 verbose #4869 > 00:03:21 debug #56 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dc804e3800e2c6f3395630fd49468f23d327d287660f3d01d3df3d9b3f2ad0d4/main.spi
00:03:23 verbose #4870 > >
00:03:23 verbose #4871 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:23 verbose #4872 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:23 verbose #4873 > > │ ## arg_index │
00:03:23 verbose #4874 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:23 verbose #4875 > >
00:03:23 verbose #4876 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:23 verbose #4877 > > inl arg_index (value : i32) (arg : arg) : arg =
00:03:23 verbose #4878 > > !\\((arg, value), $'"$0.index($1)"')
00:03:23 verbose #4879 > 00:03:22 debug #57 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7adc135320f1aac7967be518be28b9118ef593e1fb1c8e812fa71ac184385496/main.spi
00:03:23 verbose #4880 > >
00:03:23 verbose #4881 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:23 verbose #4882 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:23 verbose #4883 > > │ ## arg_matches │
00:03:23 verbose #4884 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:23 verbose #4885 > >
00:03:23 verbose #4886 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:23 verbose #4887 > > nominal arg_matches = $'clap_ArgMatches'
00:03:24 verbose #4888 > 00:03:23 debug #58 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e0ef354e2001f6490f9482b8bb742fdf7ab82e379fcc82943325509e86301e1e/main.spi
00:03:24 verbose #4889 > >
00:03:24 verbose #4890 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:24 verbose #4891 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:24 verbose #4892 > > │ ## command_get_matches │
00:03:24 verbose #4893 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:24 verbose #4894 > >
00:03:24 verbose #4895 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:24 verbose #4896 > > inl command_get_matches (command : command) : arg_matches =
00:03:24 verbose #4897 > > !\\(command, $'"clap::Command::get_matches($0)"')
00:03:25 verbose #4898 > 00:03:24 debug #59 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cefbf477deaa025d5e74303003e8aa96843690a015def1b281a1edfb35c3f404/main.spi
00:03:25 verbose #4899 > >
00:03:25 verbose #4900 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:25 verbose #4901 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:25 verbose #4902 > > │ ## command_get_matches_from │
00:03:25 verbose #4903 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:25 verbose #4904 > >
00:03:25 verbose #4905 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:25 verbose #4906 > > inl command_get_matches_from (args : array_base string) (command : command) :
00:03:25 verbose #4907 > > arg_matches =
00:03:25 verbose #4908 > > inl args = args |> am'.to_vec |> am'.vec_map sm'.to_std_string
00:03:25 verbose #4909 > > !\\(command, $'"clap::Command::get_matches_from($0, !args)"')
00:03:26 verbose #4910 > 00:03:25 debug #60 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7515e25d9ff2a89c032d43a1b7c33a74018ef98dafd0dbdbacd1433c13f47780/main.spi
00:03:26 verbose #4911 > >
00:03:26 verbose #4912 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:26 verbose #4913 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:26 verbose #4914 > > │ ## command_init_arg │
00:03:26 verbose #4915 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:26 verbose #4916 > >
00:03:26 verbose #4917 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:26 verbose #4918 > > inl command_init_arg (long, short) fn command =
00:03:26 verbose #4919 > > command
00:03:26 verbose #4920 > > |> command_arg (
00:03:26 verbose #4921 > > new_arg ##long
00:03:26 verbose #4922 > > |> arg_short short
00:03:26 verbose #4923 > > |> arg_long ##long
00:03:26 verbose #4924 > > |> fn
00:03:26 verbose #4925 > > )
00:03:27 verbose #4926 > 00:03:25 debug #61 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ddef76d81281ddb3fe6ebe552d31306d2511e7e1dc59fb5cb4f3b391907c4d94/main.spi
00:03:27 verbose #4927 > >
00:03:27 verbose #4928 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:27 verbose #4929 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:27 verbose #4930 > > │ ## matches_get_one │
00:03:27 verbose #4931 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:27 verbose #4932 > >
00:03:27 verbose #4933 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:27 verbose #4934 > > inl matches_get_one forall t. (x : string) (matches : arg_matches) :
00:03:27 verbose #4935 > > optionm'.option' t =
00:03:27 verbose #4936 > > inl x = join x
00:03:27 verbose #4937 > > inl x = x |> sm'.as_str
00:03:27 verbose #4938 > > !\\(matches, $'"clap::ArgMatches::get_one(&$0, !x).cloned()"')
00:03:28 verbose #4939 > 00:03:26 debug #62 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/87fa80dcfd410ceba3ea143c3a70b0177e22a6432dd8d437afd8ff2b1258c0d5/main.spi
00:03:28 verbose #4940 > >
00:03:28 verbose #4941 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:28 verbose #4942 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:28 verbose #4943 > > │ ## matches_get_flag │
00:03:28 verbose #4944 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:28 verbose #4945 > >
00:03:28 verbose #4946 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:28 verbose #4947 > > inl matches_get_flag (x : string) (matches : arg_matches) : bool =
00:03:28 verbose #4948 > > inl x = join x
00:03:28 verbose #4949 > > inl x = x |> sm'.as_str
00:03:28 verbose #4950 > > !\($'"clap::ArgMatches::get_flag(&!matches, !x)"')
00:03:28 verbose #4951 > 00:03:27 debug #63 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2fd588080092f80d5bfc9aeef0189802ab57247fdc11e78aa5c147e676c689bb/main.spi
00:03:28 verbose #4952 > >
00:03:28 verbose #4953 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:28 verbose #4954 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:28 verbose #4955 > > │ ## matches_get_many │
00:03:28 verbose #4956 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:28 verbose #4957 > >
00:03:28 verbose #4958 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:28 verbose #4959 > > inl matches_get_many forall t. (x : string) (matches : arg_matches) :
00:03:28 verbose #4960 > > optionm'.option' (am'.vec t) =
00:03:28 verbose #4961 > > inl x = join x
00:03:28 verbose #4962 > > inl x = x |> sm'.as_str
00:03:28 verbose #4963 > > !\\(matches, $'"clap::ArgMatches::get_many(&$0, !x).map(|x|
00:03:28 verbose #4964 > > x.cloned().into_iter().collect())"')
00:03:29 verbose #4965 > 00:03:28 debug #64 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3d51e86df1f74cee9336bafe13db29ac24b20cf5440ea45cdffcc6cb7fa332ec/main.spi
00:03:29 verbose #4966 > >
00:03:29 verbose #4967 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:29 verbose #4968 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:29 verbose #4969 > > │ ## matches_get_occurrences │
00:03:29 verbose #4970 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:29 verbose #4971 > >
00:03:29 verbose #4972 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:29 verbose #4973 > > inl matches_get_occurrences (x : string) (matches : arg_matches) :
00:03:29 verbose #4974 > > optionm'.option' (array_base sm'.std_string) =
00:03:29 verbose #4975 > > inl x = join x
00:03:29 verbose #4976 > > inl x = x |> sm'.as_str
00:03:29 verbose #4977 > > !\($'"clap::ArgMatches::get_occurrences(&!matches, !x).cloned()"')
00:03:30 verbose #4978 > 00:03:29 debug #65 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1396e7d22a405e4d726bb07f81079b4cf03b9db4caa6993deb5a578754a68b73/main.spi
00:03:30 verbose #4979 > >
00:03:30 verbose #4980 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:30 verbose #4981 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:30 verbose #4982 > > │ ## matches_subcommand │
00:03:30 verbose #4983 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:30 verbose #4984 > >
00:03:30 verbose #4985 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:30 verbose #4986 > > inl matches_subcommand (matches : arg_matches) : optionm'.option'
00:03:30 verbose #4987 > > (sm'.std_string * arg_matches) =
00:03:30 verbose #4988 > > !\\((matches, sm'.ref_to_std_string),
00:03:30 verbose #4989 > > $'"clap::ArgMatches::subcommand(Box::leak(Box::new($0))).map(|(a, b)| ($1(a),
00:03:30 verbose #4990 > > b.clone()))"')
00:03:31 verbose #4991 > 00:03:29 debug #66 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/af7988da0143b57ee7560d3209d2b31b04d850b1a83a697251bfd6c17d76b8fd/main.spi
00:03:31 verbose #4992 > >
00:03:31 verbose #4993 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:31 verbose #4994 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:31 verbose #4995 > > │ ## matches_values_of │
00:03:31 verbose #4996 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:31 verbose #4997 > >
00:03:31 verbose #4998 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:31 verbose #4999 > > inl matches_values_of (x : string) (matches : arg_matches) : array_base
00:03:31 verbose #5000 > > sm'.std_string =
00:03:31 verbose #5001 > > !\\((matches, x), $'"clap::ArgMatches::values_of($0, &*$1)"')
00:03:31 verbose #5002 > 00:03:30 debug #67 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dd118f6748977a5524f4e950170e8dd848ada7a125b0d7c65c25e61c64734e64/main.spi
00:03:32 verbose #5003 > >
00:03:32 verbose #5004 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:32 verbose #5005 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:32 verbose #5006 > > │ ## command_debug_assert │
00:03:32 verbose #5007 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:32 verbose #5008 > >
00:03:32 verbose #5009 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:32 verbose #5010 > > inl command_debug_assert (command : command) : () =
00:03:32 verbose #5011 > > !\\(command, $'"clap::Command::debug_assert($0)"')
00:03:32 verbose #5012 > 00:03:31 debug #68 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d93fb1bbb47e6e534cb39ec85123a2d6c2474176bfa5163040f035c01db8ffe0/main.spi
00:03:32 verbose #5013 > >
00:03:32 verbose #5014 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:32 verbose #5015 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:32 verbose #5016 > > │ ## command_subcommand_required │
00:03:32 verbose #5017 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:32 verbose #5018 > >
00:03:32 verbose #5019 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:32 verbose #5020 > > inl command_subcommand_required (value : bool) (command : command) : command =
00:03:32 verbose #5021 > > !\\(command, $'"clap::Command::subcommand_required($0, !value)"')
00:03:33 verbose #5022 > 00:03:32 debug #69 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c3ced344e599bd9938d73809763c8fd67178e1fa2505b3b412c94861c768b1cf/main.spi
00:03:33 verbose #5023 > >
00:03:33 verbose #5024 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:33 verbose #5025 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:33 verbose #5026 > > │ ## command_subcommand │
00:03:33 verbose #5027 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:33 verbose #5028 > >
00:03:33 verbose #5029 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:33 verbose #5030 > > inl command_subcommand (subcommand : command) (command : command) : command =
00:03:33 verbose #5031 > > !\\(command, $'"clap::Command::subcommand($0, !subcommand)"')
00:03:34 verbose #5032 > 00:03:32 debug #70 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1db5568999b8c952a2f2eaeaf1ba80ebfb5137e3875fe12ef232d731ac8eed74/main.spi
00:03:34 verbose #5033 > >
00:03:34 verbose #5034 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:34 verbose #5035 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:34 verbose #5036 > > │ ## main │
00:03:34 verbose #5037 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:34 verbose #5038 > >
00:03:34 verbose #5039 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:34 verbose #5040 > > inl main () =
00:03:34 verbose #5041 > > types ()
00:03:34 verbose #5042 > > init_trace_state None
00:03:34 verbose #5043 > > $'let is_windows () = !is_windows ()' : ()
00:03:34 verbose #5044 > > $'let get_executable_suffix () = !get_executable_suffix ()' : ()
00:03:34 verbose #5045 > > $'let execute_async x = !execute_async x' : ()
00:03:34 verbose #5046 > > $'let execute_with_options_async x = !execute_with_options_async x' : ()
00:03:34 verbose #5047 > > inl execution_options fn =
00:03:34 verbose #5048 > > execution_options fun x =>
00:03:34 verbose #5049 > > x
00:03:34 verbose #5050 > > |> heap
00:03:34 verbose #5051 > > |> fn
00:03:34 verbose #5052 > > |> fun x => !x
00:03:34 verbose #5053 > > $'let execution_options x = !execution_options x' : ()
00:03:34 verbose #5054 > > $'let split_args x = !split_args x' : ()
00:03:34 verbose #5055 > 00:03:33 debug #71 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d2b9b17d9d413577e5faebcb15c79517f3b5d2d7b5fa4a5518457defd3311020/main.spi
00:03:36 verbose #5056 > 00:01:39 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 104996
00:03:36 verbose #5057 > 00:01:39 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:03:38 verbose #5058 > 00:01:41 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb to html
00:03:38 verbose #5059 > 00:01:41 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:03:38 verbose #5060 > 00:01:41 verbose #7 ! validate(nb)
00:03:41 verbose #5061 > 00:01:44 verbose #8 ! [NbConvertApp] Writing 572862 bytes to c:\home\git\polyglot\lib\spiral\runtime.dib.html
00:03:41 verbose #5062 > 00:01:44 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645
00:03:41 verbose #5063 > 00:01:44 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645
00:03:41 verbose #5064 > 00:01:44 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:03:42 verbose #5065 > 00:01:45 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:03:42 verbose #5066 > 00:01:45 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:03:42 verbose #5067 > 00:01:45 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 105700
00:03:42 debug #5068 execute_with_options_async / exit_code: 0 / output.Length: 112102
00:03:42 debug #8 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path runtime.dib --retries 3
00:03:42 debug #5069 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path trace.dib --retries 3",
[||], None, None, true, None)
00:03:43 verbose #5070 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "trace.dib", "--retries", "3"])
00:03:43 verbose #5071 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/trace.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/trace.dib" --output-path "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:03:45 verbose #5072 > >
00:03:45 verbose #5073 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:45 verbose #5074 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:45 verbose #5075 > > │ # trace │
00:03:45 verbose #5076 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:45 verbose #5077 > >
00:03:45 verbose #5078 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:45 verbose #5079 > > //// test
00:03:45 verbose #5080 > >
00:03:45 verbose #5081 > > open testing
00:03:45 verbose #5082 > >
00:03:45 verbose #5083 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:03:45 verbose #5084 > > #r
00:03:45 verbose #5085 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:03:45 verbose #5086 > > otNet.Interactive.Spiral.dll"
00:03:45 verbose #5087 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:03:45 verbose #5088 > > #r
00:03:45 verbose #5089 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:03:45 verbose #5090 > > otNet.Interactive.dll"
00:03:45 verbose #5091 > > open type Microsoft.DotNet.Interactive.Kernel
00:03:49 verbose #5092 > >
00:03:49 verbose #5093 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5094 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5095 > > │ ## types │
00:03:49 verbose #5096 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5097 > >
00:03:49 verbose #5098 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5099 > > inl types () =
00:03:49 verbose #5100 > > rust.types ()
00:03:49 verbose #5101 > > sm'.types ()
00:03:49 verbose #5102 > > env.types ()
00:03:49 verbose #5103 > >
00:03:49 verbose #5104 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5105 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5106 > > │ ## trace_level │
00:03:49 verbose #5107 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5108 > >
00:03:49 verbose #5109 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5110 > > union trace_level =
00:03:49 verbose #5111 > > | Verbose
00:03:49 verbose #5112 > > | Debug
00:03:49 verbose #5113 > > | Info
00:03:49 verbose #5114 > > | Warning
00:03:49 verbose #5115 > > | Critical
00:03:49 verbose #5116 > >
00:03:49 verbose #5117 > > instance to_string trace_level = function
00:03:49 verbose #5118 > > | Verbose => "Verbose"
00:03:49 verbose #5119 > > | Debug => "Debug"
00:03:49 verbose #5120 > > | Info => "Info"
00:03:49 verbose #5121 > > | Warning => "Warning"
00:03:49 verbose #5122 > > | Critical => "Critical"
00:03:49 verbose #5123 > >
00:03:49 verbose #5124 > > instance of_string trace_level = function
00:03:49 verbose #5125 > > | "Verbose" => Verbose
00:03:49 verbose #5126 > > | "Debug" => Debug
00:03:49 verbose #5127 > > | "Info" => Info
00:03:49 verbose #5128 > > | "Warning" => Warning
00:03:49 verbose #5129 > > | "Critical" => Critical
00:03:49 verbose #5130 > > | x => failwith $'$"of_string trace_level / x: {!x}"'
00:03:49 verbose #5131 > >
00:03:49 verbose #5132 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5133 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5134 > > │ ## repl_start │
00:03:49 verbose #5135 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5136 > >
00:03:49 verbose #5137 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5138 > > inl repl_start () : optionm'.option' i64 =
00:03:49 verbose #5139 > > run_target function
00:03:49 verbose #5140 > > | Fsharp (Native) & x
00:03:49 verbose #5141 > > | Rust (Native) & x => fun () =>
00:03:49 verbose #5142 > > inl automation = env.get_environment_variable "AUTOMATION"
00:03:49 verbose #5143 > > // inl target =
00:03:49 verbose #5144 > > // match x with
00:03:49 verbose #5145 > > // | Fsharp (Native) => "Fsharp (Native)"
00:03:49 verbose #5146 > > // | Rust (Native) => "Rust (Native)"
00:03:49 verbose #5147 > > // inl assembly_name = env.get_entry_assembly_name ()
00:03:49 verbose #5148 > > // console.write_line ($'$"repl_start / automation:
00:03:49 verbose #5149 > > \'{!automation}\' / target: {!target} / assembly_name: {!assembly_name}"' :
00:03:49 verbose #5150 > > string)
00:03:49 verbose #5151 > > if automation = "True"
00:03:49 verbose #5152 > > then date_time.now () |> date_time.ticks |> fun (date_time.timestamp
00:03:49 verbose #5153 > > x) => x |> Some
00:03:49 verbose #5154 > > else None
00:03:49 verbose #5155 > > |> optionm'.box
00:03:49 verbose #5156 > > | _ => fun () => optionm'.none' ()
00:03:49 verbose #5157 > >
00:03:49 verbose #5158 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5159 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5160 > > │ ## trace_state │
00:03:49 verbose #5161 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5162 > >
00:03:49 verbose #5163 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5164 > > type trace_state =
00:03:49 verbose #5165 > > {
00:03:49 verbose #5166 > > count : mut i64
00:03:49 verbose #5167 > > trace_file : mut (string -> ())
00:03:49 verbose #5168 > > enabled : mut bool
00:03:49 verbose #5169 > > level : mut trace_level
00:03:49 verbose #5170 > > repl_start : optionm'.option' i64
00:03:49 verbose #5171 > > }
00:03:49 verbose #5172 > >
00:03:49 verbose #5173 > > inl new_trace_state trace_level =
00:03:49 verbose #5174 > > {
00:03:49 verbose #5175 > > enabled = mut true
00:03:49 verbose #5176 > > count = mut 0i64
00:03:49 verbose #5177 > > level = mut trace_level
00:03:49 verbose #5178 > > trace_file = mut ignore
00:03:49 verbose #5179 > > repl_start = repl_start ()
00:03:49 verbose #5180 > > } : trace_state
00:03:49 verbose #5181 > >
00:03:49 verbose #5182 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5183 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5184 > > │ ## init_trace_state │
00:03:49 verbose #5185 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5186 > >
00:03:49 verbose #5187 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5188 > > inl init_trace_state trace_level : () =
00:03:49 verbose #5189 > > inl trace_level =
00:03:49 verbose #5190 > > trace_level
00:03:49 verbose #5191 > > |> optionm'.default_value Verbose
00:03:49 verbose #5192 > > global "module State = let mutable trace_state = None"
00:03:49 verbose #5193 > > $'if State.trace_state.IsNone then State.trace_state <- !new_trace_state
00:03:49 verbose #5194 > > !trace_level |> Some' : ()
00:03:49 verbose #5195 > >
00:03:49 verbose #5196 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5197 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5198 > > │ ## get_trace_state_or_init │
00:03:49 verbose #5199 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5200 > >
00:03:49 verbose #5201 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5202 > > inl get_trace_state_or_init trace_level : trace_state =
00:03:49 verbose #5203 > > init_trace_state trace_level
00:03:49 verbose #5204 > > // $'match State.trace_state with Some x -> x | None -> failwith
00:03:49 verbose #5205 > > "trace.get_trace_state_or_init / State.trace_state=None"'
00:03:49 verbose #5206 > > $'State.trace_state.Value'
00:03:49 verbose #5207 > >
00:03:49 verbose #5208 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5209 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5210 > > │ ## _locals │
00:03:49 verbose #5211 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5212 > >
00:03:49 verbose #5213 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5214 > > inl _locals () = ""
00:03:49 verbose #5215 > >
00:03:49 verbose #5216 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:49 verbose #5217 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:49 verbose #5218 > > │ ## test_trace_level │
00:03:49 verbose #5219 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:49 verbose #5220 > >
00:03:49 verbose #5221 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5222 > > inl test_trace_level level : bool =
00:03:49 verbose #5223 > > inl state = get_trace_state_or_init None
00:03:49 verbose #5224 > > inl level' = *state.level
00:03:49 verbose #5225 > > if *state.enabled |> not
00:03:49 verbose #5226 > > then false
00:03:49 verbose #5227 > > else
00:03:49 verbose #5228 > > inl level : i32 = real real_core.union_tag level
00:03:49 verbose #5229 > > inl level' : i32 = real real_core.union_tag level'
00:03:49 verbose #5230 > > level >= level'
00:03:49 verbose #5231 > >
00:03:49 verbose #5232 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:49 verbose #5233 > > //// test
00:03:49 verbose #5234 > >
00:03:49 verbose #5235 > > test_trace_level Critical |> _assert_eq true
00:03:49 verbose #5236 > > test_trace_level Verbose |> _assert_eq true
00:03:49 verbose #5237 > >
00:03:49 verbose #5238 > > inl level = get_trace_state_or_init None .level
00:03:49 verbose #5239 > > level <- Debug
00:03:49 verbose #5240 > > test_trace_level Verbose |> _assert_eq false
00:03:49 verbose #5241 > > level <- Verbose
00:03:49 verbose #5242 > > test_trace_level Verbose |> _assert_eq true
00:03:51 verbose #5243 > >
00:03:51 verbose #5244 > > ╭─[ 1.47s - stdout ]───────────────────────────────────────────────────────────╮
00:03:51 verbose #5245 > > │ assert_eq / actual: true / expected: true │
00:03:51 verbose #5246 > > │ assert_eq / actual: true / expected: true │
00:03:51 verbose #5247 > > │ assert_eq / actual: false / expected: false │
00:03:51 verbose #5248 > > │ assert_eq / actual: true / expected: true │
00:03:51 verbose #5249 > > │ │
00:03:51 verbose #5250 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:51 verbose #5251 > >
00:03:51 verbose #5252 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:51 verbose #5253 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:51 verbose #5254 > > │ ## trace_raw │
00:03:51 verbose #5255 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:51 verbose #5256 > >
00:03:51 verbose #5257 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:51 verbose #5258 > > let rec trace_raw level fn =
00:03:51 verbose #5259 > > inl trace_state = get_trace_state_or_init None
00:03:51 verbose #5260 > > if level |> test_trace_level then
00:03:51 verbose #5261 > > inl count = trace_state.count
00:03:51 verbose #5262 > > count <- *trace_state.count + 1
00:03:51 verbose #5263 > >
00:03:51 verbose #5264 > > inl text = $'$"%s{!fn ()}"' : string
00:03:51 verbose #5265 > > run_target function
00:03:51 verbose #5266 > > | Rust _ => fun () =>
00:03:51 verbose #5267 > > open rust_operators
00:03:51 verbose #5268 > > !\\(text, $'\@"println\!(""{}"", $0)"')
00:03:51 verbose #5269 > > | _ => fun () =>
00:03:51 verbose #5270 > > $'System.Console.WriteLine !text '
00:03:51 verbose #5271 > >
00:03:51 verbose #5272 > > *trace_state.trace_file text
00:03:51 verbose #5273 > >
00:03:51 verbose #5274 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:51 verbose #5275 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:51 verbose #5276 > > │ ## trace │
00:03:51 verbose #5277 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:51 verbose #5278 > >
00:03:51 verbose #5279 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:51 verbose #5280 > > let trace (level : trace_level) (text_fn : () -> string) (locals : () -> string)
00:03:51 verbose #5281 > > =
00:03:51 verbose #5282 > > fun () =>
00:03:51 verbose #5283 > > inl trace_state = get_trace_state_or_init None
00:03:51 verbose #5284 > > inl time =
00:03:51 verbose #5285 > > run_target fun target =>
00:03:51 verbose #5286 > > match target with
00:03:51 verbose #5287 > > | Fsharp (Native)
00:03:51 verbose #5288 > > | Rust (Native) => fun () =>
00:03:51 verbose #5289 > > match trace_state.repl_start |> optionm'.unbox with
00:03:51 verbose #5290 > > | Some repl_start =>
00:03:51 verbose #5291 > > inl t =
00:03:51 verbose #5292 > > (date_time.now () |> date_time.ticks |> fun
00:03:51 verbose #5293 > > (date_time.timestamp x) => x)
00:03:51 verbose #5294 > > - repl_start |> date_time.time_span
00:03:51 verbose #5295 > > date_time.date_time_milliseconds
00:03:51 verbose #5296 > > 1i32 1i32 1i32
00:03:51 verbose #5297 > > (t |> date_time.hours)
00:03:51 verbose #5298 > > (t |> date_time.minutes)
00:03:51 verbose #5299 > > (t |> date_time.seconds)
00:03:51 verbose #5300 > > (t |> date_time.milliseconds)
00:03:51 verbose #5301 > > | None => date_time.now ()
00:03:51 verbose #5302 > > |> fun date_time =>
00:03:51 verbose #5303 > > inl format =
00:03:51 verbose #5304 > > match target with
00:03:51 verbose #5305 > > | Rust _ => "hh:mm:ss"
00:03:51 verbose #5306 > > | _ => "HH:mm:ss"
00:03:51 verbose #5307 > > $'!date_time.ToString !format '
00:03:51 verbose #5308 > > | _ => fun () => join ""
00:03:51 verbose #5309 > > inl count = *trace_state.count
00:03:51 verbose #5310 > > inl level_str = level |> to_string |> sm'.to_lower |> sm'.pad_left 7 ' '
00:03:51 verbose #5311 > > inl level_str =
00:03:51 verbose #5312 > > run_target function
00:03:51 verbose #5313 > > | Rust _ => fun () =>
00:03:51 verbose #5314 > > open rust_operators
00:03:51 verbose #5315 > > inl color : rust.ref' sm'.str =
00:03:51 verbose #5316 > > match level with
00:03:51 verbose #5317 > > | Verbose =>
00:03:51 verbose #5318 > > !\($'"inline_colorization::color_bright_black"')
00:03:51 verbose #5319 > > | Debug => !\($'"inline_colorization::color_bright_blue"')
00:03:51 verbose #5320 > > | Info => !\($'"inline_colorization::color_bright_green"')
00:03:51 verbose #5321 > > | Warning => !\($'"inline_colorization::color_yellow"')
00:03:51 verbose #5322 > > | Critical => !\($'"inline_colorization::color_bright_red"')
00:03:51 verbose #5323 > > inl level_str = level_str |> sm'.as_str
00:03:51 verbose #5324 > > inl color_reset : rust.ref' sm'.str =
00:03:51 verbose #5325 > > !\($'"inline_colorization::color_reset"')
00:03:51 verbose #5326 > > $'"\\\"{!color}{!level_str}{!color_reset}\\\""'
00:03:51 verbose #5327 > > |> sm'.format''
00:03:51 verbose #5328 > > |> sm'.from_std_string
00:03:51 verbose #5329 > > | _ => fun () => level_str
00:03:51 verbose #5330 > > $'$"{!time} {!level_str} #{!count} %s{!text_fn ()} / %s{!locals ()}"'
00:03:51 verbose #5331 > > |> sm'.trim_start ;[[]]
00:03:51 verbose #5332 > > |> sm'.trim_end ;[[ ' '; '/' ]]
00:03:51 verbose #5333 > > |> trace_raw level
00:03:51 verbose #5334 > >
00:03:51 verbose #5335 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:51 verbose #5336 > > //// test
00:03:51 verbose #5337 > >
00:03:51 verbose #5338 > > trace Debug (fun () => "test") _locals
00:03:51 verbose #5339 > > trace Debug (fun () => "test") _locals
00:03:51 verbose #5340 > > get_trace_state_or_init None .count
00:03:51 verbose #5341 > > |> fun x => *x
00:03:51 verbose #5342 > > |> _assert_eq 2
00:03:51 verbose #5343 > >
00:03:51 verbose #5344 > > ╭─[ 371.32ms - stdout ]────────────────────────────────────────────────────────╮
00:03:51 verbose #5345 > > │ 00:00:00 debug #1 test │
00:03:51 verbose #5346 > > │ 00:00:00 debug #2 test │
00:03:51 verbose #5347 > > │ assert_eq / actual: 2L / expected: 2L │
00:03:51 verbose #5348 > > │ │
00:03:51 verbose #5349 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:51 verbose #5350 > >
00:03:51 verbose #5351 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:51 verbose #5352 > > //// test
00:03:51 verbose #5353 > > ///! rust
00:03:51 verbose #5354 > >
00:03:51 verbose #5355 > > types ()
00:03:51 verbose #5356 > > trace Debug (fun () => "test1") _locals
00:03:51 verbose #5357 > > trace Debug (fun () => "test2") _locals
00:03:51 verbose #5358 > > get_trace_state_or_init None .count
00:03:51 verbose #5359 > > |> fun x => *x
00:03:51 verbose #5360 > > |> _assert_eq 2
00:03:55 verbose #5361 > >
00:03:55 verbose #5362 > > ╭─[ 4.16s - return value ]─────────────────────────────────────────────────────╮
00:03:55 verbose #5363 > > │ 00:00:00 debug #1 test1 │
00:03:55 verbose #5364 > > │ 00:00:00 debug #2 test2 │
00:03:55 verbose #5365 > > │ assert_eq / actual: 2 / expected: 2 │
00:03:55 verbose #5366 > > │ │
00:03:55 verbose #5367 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:55 verbose #5368 > >
00:03:55 verbose #5369 > > ── markdown ────────────────────────────────────────────────────────────────────
00:03:55 verbose #5370 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:03:55 verbose #5371 > > │ ## main │
00:03:55 verbose #5372 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:03:55 verbose #5373 > >
00:03:55 verbose #5374 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:03:55 verbose #5375 > > inl main () =
00:03:55 verbose #5376 > > types ()
00:03:55 verbose #5377 > > init_trace_state None
00:03:55 verbose #5378 > > $'let trace x = !trace x' : ()
00:03:56 verbose #5379 > 00:00:13 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 13482
00:03:56 verbose #5380 > 00:00:13 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:03:58 verbose #5381 > 00:00:15 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/trace.dib.ipynb to html
00:03:58 verbose #5382 > 00:00:15 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:03:58 verbose #5383 > 00:00:15 verbose #7 ! validate(nb)
00:03:59 verbose #5384 > 00:00:16 verbose #8 ! [NbConvertApp] Writing 311779 bytes to c:\home\git\polyglot\lib\spiral\trace.dib.html
00:03:59 verbose #5385 > 00:00:16 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 641
00:03:59 verbose #5386 > 00:00:16 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 641
00:03:59 verbose #5387 > 00:00:16 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:04:00 verbose #5388 > 00:00:17 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:04:00 verbose #5389 > 00:00:17 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:04:01 verbose #5390 > 00:00:18 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 14182
00:04:01 debug #5391 execute_with_options_async / exit_code: 0 / output.Length: 17016
00:04:01 debug #9 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path trace.dib --retries 3
00:04:01 debug #5392 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path am'.dib --retries 3",
[||], None, None, true, None)
00:04:01 verbose #5393 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "am'.dib", "--retries", "3"])
00:04:01 verbose #5394 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/am'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/am'.dib" --output-path "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:04:03 verbose #5395 > >
00:04:03 verbose #5396 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:03 verbose #5397 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:03 verbose #5398 > > │ # am' │
00:04:03 verbose #5399 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:03 verbose #5400 > >
00:04:03 verbose #5401 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:03 verbose #5402 > > //// test
00:04:03 verbose #5403 > >
00:04:03 verbose #5404 > > open testing
00:04:03 verbose #5405 > >
00:04:03 verbose #5406 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:04:03 verbose #5407 > > #r
00:04:03 verbose #5408 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:03 verbose #5409 > > otNet.Interactive.Spiral.dll"
00:04:03 verbose #5410 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:04:03 verbose #5411 > > #r
00:04:03 verbose #5412 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:03 verbose #5413 > > otNet.Interactive.dll"
00:04:03 verbose #5414 > > open type Microsoft.DotNet.Interactive.Kernel
00:04:07 verbose #5415 > >
00:04:07 verbose #5416 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:07 verbose #5417 > > open rust_operators
00:04:07 verbose #5418 > >
00:04:07 verbose #5419 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:07 verbose #5420 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:07 verbose #5421 > > │ ## types () │
00:04:07 verbose #5422 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:07 verbose #5423 > >
00:04:07 verbose #5424 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:07 verbose #5425 > > inl types () =
00:04:07 verbose #5426 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:07 verbose #5427 > > Fable.Core.Emit(\"[[$0]]\")>]]\n#endif\ntype Slice<'T> = class end"
00:04:07 verbose #5428 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:07 verbose #5429 > > Fable.Core.Emit(\"_\")>]]\n#endif\ntype Slice'<'T> = class end"
00:04:07 verbose #5430 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:07 verbose #5431 > > Fable.Core.Emit(\"Vec<$0>\")>]]\n#endif\ntype Vec<'T> = class end"
00:04:07 verbose #5432 > >
00:04:07 verbose #5433 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:07 verbose #5434 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:07 verbose #5435 > > │ ## length │
00:04:07 verbose #5436 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:07 verbose #5437 > >
00:04:07 verbose #5438 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:07 verbose #5439 > > inl length forall dim {int} el. (a : a dim el) : dim =
00:04:07 verbose #5440 > > a |> length
00:04:07 verbose #5441 > >
00:04:07 verbose #5442 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:07 verbose #5443 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:07 verbose #5444 > > │ ## index │
00:04:07 verbose #5445 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:07 verbose #5446 > >
00:04:07 verbose #5447 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:07 verbose #5448 > > inl index forall dim {int} el. (i : dim) (a : a dim el) : el =
00:04:07 verbose #5449 > > index a i
00:04:07 verbose #5450 > >
00:04:07 verbose #5451 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:07 verbose #5452 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:07 verbose #5453 > > │ ## append │
00:04:07 verbose #5454 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:07 verbose #5455 > >
00:04:07 verbose #5456 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:07 verbose #5457 > > instance append a dim {int; number} t =
00:04:07 verbose #5458 > > am.append
00:04:07 verbose #5459 > >
00:04:07 verbose #5460 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:07 verbose #5461 > > //// test
00:04:07 verbose #5462 > >
00:04:07 verbose #5463 > > a ;[[ "a"; "b" ]] ++ a ;[[ "c"; "d" ]]
00:04:07 verbose #5464 > > |> _assert_eq (a ;[[ "a"; "b"; "c"; "d" ]] : _ i32 _)
00:04:08 verbose #5465 > >
00:04:08 verbose #5466 > > ╭─[ 1.01s - stdout ]───────────────────────────────────────────────────────────╮
00:04:08 verbose #5467 > > │ assert_eq / actual: [|"a"; "b"; "c"; "d"|] / expected: [|"a"; "b"; "c"; │
00:04:08 verbose #5468 > > │ "d"|] │
00:04:08 verbose #5469 > > │ │
00:04:08 verbose #5470 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:08 verbose #5471 > >
00:04:08 verbose #5472 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:08 verbose #5473 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:08 verbose #5474 > > │ ## collect │
00:04:08 verbose #5475 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:08 verbose #5476 > >
00:04:08 verbose #5477 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:08 verbose #5478 > > inl collect forall t r. (fn : t -> a i32 r) (items : a i32 t) : a i32 r =
00:04:08 verbose #5479 > > items
00:04:08 verbose #5480 > > |> am.map fn
00:04:08 verbose #5481 > > |> am.fold (++) (a ;[[]])
00:04:08 verbose #5482 > >
00:04:08 verbose #5483 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:08 verbose #5484 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:08 verbose #5485 > > │ ## choose │
00:04:08 verbose #5486 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:08 verbose #5487 > >
00:04:08 verbose #5488 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:08 verbose #5489 > > inl choose f l =
00:04:08 verbose #5490 > > (l, [[]])
00:04:08 verbose #5491 > > ||> am.foldBack fun x acc =>
00:04:08 verbose #5492 > > match f x with
00:04:08 verbose #5493 > > | Some y => y :: acc
00:04:08 verbose #5494 > > | None => acc
00:04:08 verbose #5495 > > |> listm.toArray
00:04:08 verbose #5496 > >
00:04:08 verbose #5497 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:08 verbose #5498 > > //// test
00:04:08 verbose #5499 > >
00:04:08 verbose #5500 > > (am.init 10i32 id : a _ _)
00:04:08 verbose #5501 > > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:04:08 verbose #5502 > > |> _assert_eq (a ;[[ 0; 2; 4; 6; 8 ]] : _ i32 _)
00:04:09 verbose #5503 > >
00:04:09 verbose #5504 > > ╭─[ 396.01ms - stdout ]────────────────────────────────────────────────────────╮
00:04:09 verbose #5505 > > │ assert_eq / actual: [|0; 2; 4; 6; 8|] / expected: [|0; 2; 4; 6; 8|] │
00:04:09 verbose #5506 > > │ │
00:04:09 verbose #5507 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5508 > >
00:04:09 verbose #5509 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5510 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5511 > > │ ## sum │
00:04:09 verbose #5512 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5513 > >
00:04:09 verbose #5514 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5515 > > inl sum (a' : a _ _) =
00:04:09 verbose #5516 > > a' |> am.fold (+) 0
00:04:09 verbose #5517 > >
00:04:09 verbose #5518 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5519 > > //// test
00:04:09 verbose #5520 > >
00:04:09 verbose #5521 > > am.init 10i32 id
00:04:09 verbose #5522 > > |> sum
00:04:09 verbose #5523 > > |> _assert_eq 45
00:04:09 verbose #5524 > >
00:04:09 verbose #5525 > > ╭─[ 85.29ms - stdout ]─────────────────────────────────────────────────────────╮
00:04:09 verbose #5526 > > │ assert_eq / actual: 45 / expected: 45 │
00:04:09 verbose #5527 > > │ │
00:04:09 verbose #5528 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5529 > >
00:04:09 verbose #5530 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5531 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5532 > > │ ## init_series │
00:04:09 verbose #5533 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5534 > >
00:04:09 verbose #5535 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5536 > > inl init_series start end inc =
00:04:09 verbose #5537 > > inl total = conv ((end - start) / inc) + 1
00:04:09 verbose #5538 > > am.init total (conv >> (*) inc >> (+) start) : a i32 _
00:04:09 verbose #5539 > >
00:04:09 verbose #5540 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5541 > > //// test
00:04:09 verbose #5542 > >
00:04:09 verbose #5543 > > init_series 0 1 0.5
00:04:09 verbose #5544 > > |> _assert_eq (a ;[[ 0f64; 0.5; 1 ]])
00:04:09 verbose #5545 > >
00:04:09 verbose #5546 > > ╭─[ 77.75ms - stdout ]─────────────────────────────────────────────────────────╮
00:04:09 verbose #5547 > > │ assert_eq / actual: [|0.0; 0.5; 1.0|] / expected: [|0.0; 0.5; 1.0|] │
00:04:09 verbose #5548 > > │ │
00:04:09 verbose #5549 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5550 > >
00:04:09 verbose #5551 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5552 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5553 > > │ ## head │
00:04:09 verbose #5554 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5555 > >
00:04:09 verbose #5556 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5557 > > inl head (ar : a _ _) =
00:04:09 verbose #5558 > > if var_is ar || length ar > 0
00:04:09 verbose #5559 > > then ar |> index 0
00:04:09 verbose #5560 > > else error_type "The length of the array should be greater than 0."
00:04:09 verbose #5561 > >
00:04:09 verbose #5562 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5563 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5564 > > │ ## last │
00:04:09 verbose #5565 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5566 > >
00:04:09 verbose #5567 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5568 > > inl last (ar : a _ _) =
00:04:09 verbose #5569 > > inl len = length ar
00:04:09 verbose #5570 > > if var_is ar || len > 0
00:04:09 verbose #5571 > > then ar |> index (len - 1)
00:04:09 verbose #5572 > > else error_type "The length of the array should be greater than 0."
00:04:09 verbose #5573 > >
00:04:09 verbose #5574 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5575 > > //// test
00:04:09 verbose #5576 > >
00:04:09 verbose #5577 > > am.init 10i32 id
00:04:09 verbose #5578 > > |> last
00:04:09 verbose #5579 > > |> _assert_eq 9
00:04:09 verbose #5580 > >
00:04:09 verbose #5581 > > ╭─[ 65.52ms - stdout ]─────────────────────────────────────────────────────────╮
00:04:09 verbose #5582 > > │ assert_eq / actual: 9 / expected: 9 │
00:04:09 verbose #5583 > > │ │
00:04:09 verbose #5584 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5585 > >
00:04:09 verbose #5586 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5587 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5588 > > │ ## try_pick │
00:04:09 verbose #5589 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5590 > >
00:04:09 verbose #5591 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5592 > > inl try_pick forall t u. (fn : t -> option u) (array : a _ t) : option u =
00:04:09 verbose #5593 > > (array, None)
00:04:09 verbose #5594 > > ||> am.foldBack fun x acc =>
00:04:09 verbose #5595 > > match acc with
00:04:09 verbose #5596 > > | Some _ => acc
00:04:09 verbose #5597 > > | None => x |> fn
00:04:09 verbose #5598 > >
00:04:09 verbose #5599 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5600 > > //// test
00:04:09 verbose #5601 > >
00:04:09 verbose #5602 > > am.init 10i32 id
00:04:09 verbose #5603 > > |> try_pick (fun x => if x = 5i32 then Some x else None)
00:04:09 verbose #5604 > > |> _assert_eq (Some 5i32)
00:04:09 verbose #5605 > >
00:04:09 verbose #5606 > > ╭─[ 139.57ms - stdout ]────────────────────────────────────────────────────────╮
00:04:09 verbose #5607 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:04:09 verbose #5608 > > │ │
00:04:09 verbose #5609 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5610 > >
00:04:09 verbose #5611 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5612 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5613 > > │ ## indexed' │
00:04:09 verbose #5614 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5615 > >
00:04:09 verbose #5616 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5617 > > inl indexed' forall t dim {int; number} dim' {int; number} u {number}. (ar : a
00:04:09 verbose #5618 > > dim t) : a dim' (u * t) =
00:04:09 verbose #5619 > > ((0, a ;[[]]), ar)
00:04:09 verbose #5620 > > ||> am.fold fun (i, acc) x =>
00:04:09 verbose #5621 > > i + 1, acc ++ a ;[[i, x]]
00:04:09 verbose #5622 > > |> snd
00:04:09 verbose #5623 > >
00:04:09 verbose #5624 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5625 > > //// test
00:04:09 verbose #5626 > >
00:04:09 verbose #5627 > > am.init 3i32 ((*) 2)
00:04:09 verbose #5628 > > |> indexed'
00:04:09 verbose #5629 > > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _)
00:04:09 verbose #5630 > >
00:04:09 verbose #5631 > > ╭─[ 143.11ms - stdout ]────────────────────────────────────────────────────────╮
00:04:09 verbose #5632 > > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │
00:04:09 verbose #5633 > > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │
00:04:09 verbose #5634 > > │ │
00:04:09 verbose #5635 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5636 > >
00:04:09 verbose #5637 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5638 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5639 > > │ ## map_base │
00:04:09 verbose #5640 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5641 > >
00:04:09 verbose #5642 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5643 > > inl map_base forall t u. (fn : t -> u) (x : array_base t) : array_base u =
00:04:09 verbose #5644 > > a x
00:04:09 verbose #5645 > > |> am.map fn
00:04:09 verbose #5646 > > |> fun (a x : _ i64 _) => x
00:04:09 verbose #5647 > >
00:04:09 verbose #5648 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5649 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5650 > > │ ## average │
00:04:09 verbose #5651 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5652 > >
00:04:09 verbose #5653 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5654 > > inl average forall el {number}. (a : a _ el) : el =
00:04:09 verbose #5655 > > a |> $'Array.average'
00:04:09 verbose #5656 > >
00:04:09 verbose #5657 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5658 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5659 > > │ ## distinct │
00:04:09 verbose #5660 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5661 > >
00:04:09 verbose #5662 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5663 > > inl distinct forall dim el. (a : a dim el) : a dim el =
00:04:09 verbose #5664 > > a |> $'Array.distinct'
00:04:09 verbose #5665 > >
00:04:09 verbose #5666 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5667 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5668 > > │ ## to_list' │
00:04:09 verbose #5669 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5670 > >
00:04:09 verbose #5671 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5672 > > inl to_list' forall dim t. (items : a dim t) : listm'.list' t =
00:04:09 verbose #5673 > > items |> $'Array.toList'
00:04:09 verbose #5674 > >
00:04:09 verbose #5675 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5676 > > //// test
00:04:09 verbose #5677 > >
00:04:09 verbose #5678 > > (a ;[[ "a"; "b" ]] : _ i32 _)
00:04:09 verbose #5679 > > |> to_list'
00:04:09 verbose #5680 > > |> listm'.unbox
00:04:09 verbose #5681 > > |> _assert_eq ([[ "a"; "b" ]])
00:04:09 verbose #5682 > >
00:04:09 verbose #5683 > > ╭─[ 124.91ms - stdout ]────────────────────────────────────────────────────────╮
00:04:09 verbose #5684 > > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │
00:04:09 verbose #5685 > > │ UH0_1 ("b", UH0_0)) │
00:04:09 verbose #5686 > > │ │
00:04:09 verbose #5687 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5688 > >
00:04:09 verbose #5689 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5690 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5691 > > │ ## parallel_map │
00:04:09 verbose #5692 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5693 > >
00:04:09 verbose #5694 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5695 > > inl parallel_map forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el'
00:04:09 verbose #5696 > > =
00:04:09 verbose #5697 > > a |> $'Array.Parallel.map' fn
00:04:09 verbose #5698 > >
00:04:09 verbose #5699 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:09 verbose #5700 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:09 verbose #5701 > > │ ## map' │
00:04:09 verbose #5702 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:09 verbose #5703 > >
00:04:09 verbose #5704 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:09 verbose #5705 > > inl map' forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' =
00:04:09 verbose #5706 > > $'!a |> Array.map !fn '
00:04:10 verbose #5707 > >
00:04:10 verbose #5708 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5709 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5710 > > │ ## sort_by │
00:04:10 verbose #5711 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5712 > >
00:04:10 verbose #5713 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5714 > > inl sort_by forall dim el. (fn : el -> _) (a : a dim el) : a dim el =
00:04:10 verbose #5715 > > a |> $'Array.sortBy' fn
00:04:10 verbose #5716 > >
00:04:10 verbose #5717 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5718 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5719 > > │ ## sort │
00:04:10 verbose #5720 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5721 > >
00:04:10 verbose #5722 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5723 > > inl sort forall dim el. (a : a dim el) : a dim el =
00:04:10 verbose #5724 > > a |> $'Array.sort'
00:04:10 verbose #5725 > >
00:04:10 verbose #5726 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5727 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5728 > > │ ## sort_descending │
00:04:10 verbose #5729 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5730 > >
00:04:10 verbose #5731 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5732 > > inl sort_descending forall dim el. (a : a dim el) : a dim el =
00:04:10 verbose #5733 > > a |> $'Array.sortDescending'
00:04:10 verbose #5734 > >
00:04:10 verbose #5735 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5736 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5737 > > │ ## transpose │
00:04:10 verbose #5738 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5739 > >
00:04:10 verbose #5740 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5741 > > inl transpose forall dim el. (a : a dim (a dim el)) : a dim (a dim el) =
00:04:10 verbose #5742 > > a |> $'Array.transpose'
00:04:10 verbose #5743 > >
00:04:10 verbose #5744 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5745 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5746 > > │ ## try_item │
00:04:10 verbose #5747 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5748 > >
00:04:10 verbose #5749 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5750 > > inl try_item forall dim el. (i : i32) (a : a dim el) : option el =
00:04:10 verbose #5751 > > a |> $'Array.tryItem' i |> optionm'.unbox
00:04:10 verbose #5752 > >
00:04:10 verbose #5753 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5754 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5755 > > │ ## indexed │
00:04:10 verbose #5756 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5757 > >
00:04:10 verbose #5758 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5759 > > inl indexed (array : a _ _) =
00:04:10 verbose #5760 > > (([[]], 0), array)
00:04:10 verbose #5761 > > ||> am.fold fun (acc, i) x =>
00:04:10 verbose #5762 > > (i, x) :: acc, i + 1
00:04:10 verbose #5763 > > |> fst
00:04:10 verbose #5764 > > |> listm.rev
00:04:10 verbose #5765 > > |> listm.toArray
00:04:10 verbose #5766 > >
00:04:10 verbose #5767 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5768 > > //// test
00:04:10 verbose #5769 > >
00:04:10 verbose #5770 > > am.init 3i32 ((*) 2)
00:04:10 verbose #5771 > > |> indexed
00:04:10 verbose #5772 > > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _)
00:04:10 verbose #5773 > >
00:04:10 verbose #5774 > > ╭─[ 181.84ms - stdout ]────────────────────────────────────────────────────────╮
00:04:10 verbose #5775 > > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │
00:04:10 verbose #5776 > > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │
00:04:10 verbose #5777 > > │ │
00:04:10 verbose #5778 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5779 > >
00:04:10 verbose #5780 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5781 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5782 > > │ ## vec │
00:04:10 verbose #5783 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5784 > >
00:04:10 verbose #5785 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5786 > > nominal vec t = $'Vec<`t>'
00:04:10 verbose #5787 > >
00:04:10 verbose #5788 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5789 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5790 > > │ ## from_vec │
00:04:10 verbose #5791 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5792 > >
00:04:10 verbose #5793 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5794 > > inl from_vec forall dim el. (vec : vec el) : a dim el =
00:04:10 verbose #5795 > > !\\(vec, $'"fable_library_rust::NativeArray_::array_from($0)"')
00:04:10 verbose #5796 > >
00:04:10 verbose #5797 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5798 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5799 > > │ ## to_vec │
00:04:10 verbose #5800 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5801 > >
00:04:10 verbose #5802 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5803 > > inl to_vec forall t. (ab : array_base t) : vec t =
00:04:10 verbose #5804 > > !\\(ab, $'"$0.to_vec()"')
00:04:10 verbose #5805 > >
00:04:10 verbose #5806 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5807 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5808 > > │ ## vec_push │
00:04:10 verbose #5809 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5810 > >
00:04:10 verbose #5811 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5812 > > inl vec_push forall el. (el : el) (vec : vec el) : vec el =
00:04:10 verbose #5813 > > inl el = join el
00:04:10 verbose #5814 > > inl vec = join vec
00:04:10 verbose #5815 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:04:10 verbose #5816 > > // inl vec = vec |> rust.to_mut
00:04:10 verbose #5817 > > (!\($'"true; !vec.push(!el)"') : bool) |> ignore
00:04:10 verbose #5818 > > !\($'"!vec"')
00:04:10 verbose #5819 > >
00:04:10 verbose #5820 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5821 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5822 > > │ ## vec_reverse │
00:04:10 verbose #5823 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5824 > >
00:04:10 verbose #5825 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5826 > > inl vec_reverse forall el. (vec : vec el) : vec el =
00:04:10 verbose #5827 > > inl vec = join vec
00:04:10 verbose #5828 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:04:10 verbose #5829 > > (!\($'"true; !vec.reverse()"') : bool) |> ignore
00:04:10 verbose #5830 > > !\($'"!vec"')
00:04:10 verbose #5831 > >
00:04:10 verbose #5832 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5833 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5834 > > │ ## vec_retain │
00:04:10 verbose #5835 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5836 > >
00:04:10 verbose #5837 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5838 > > inl vec_retain forall el. (fn : el -> bool) (vec : vec el) : vec el =
00:04:10 verbose #5839 > > inl vec = join vec
00:04:10 verbose #5840 > > inl fn = join fn
00:04:10 verbose #5841 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:04:10 verbose #5842 > > // inl vec = vec |> rust.to_mut
00:04:10 verbose #5843 > > (!\($'"true; !vec.retain(|x| !fn(x.clone()))"') : bool) |> ignore
00:04:10 verbose #5844 > > !\($'"!vec"')
00:04:10 verbose #5845 > >
00:04:10 verbose #5846 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5847 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5848 > > │ ## vec_sort_by_key │
00:04:10 verbose #5849 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5850 > >
00:04:10 verbose #5851 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5852 > > inl vec_sort_by_key forall el t. (fn : el -> t) (vec : vec el) : vec el =
00:04:10 verbose #5853 > > inl vec = join vec
00:04:10 verbose #5854 > > inl fn = join fn
00:04:10 verbose #5855 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:04:10 verbose #5856 > > // inl vec = vec |> rust.to_mut
00:04:10 verbose #5857 > > (!\($'"true; !vec.sort_by_key(|x| !fn(x.clone()))"') : bool) |> ignore
00:04:10 verbose #5858 > > !\($'"!vec"')
00:04:10 verbose #5859 > >
00:04:10 verbose #5860 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5861 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5862 > > │ ## vec_extend │
00:04:10 verbose #5863 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5864 > >
00:04:10 verbose #5865 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5866 > > inl vec_extend forall el. (el : vec el) (vec : vec el) : vec el =
00:04:10 verbose #5867 > > inl el = join el
00:04:10 verbose #5868 > > inl vec = join vec
00:04:10 verbose #5869 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:04:10 verbose #5870 > > // inl vec = vec |> rust.to_mut
00:04:10 verbose #5871 > > (!\($'"true; !vec.extend(!el)"') : bool) |> ignore
00:04:10 verbose #5872 > > !\($'"!vec"')
00:04:10 verbose #5873 > >
00:04:10 verbose #5874 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5875 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5876 > > │ ## vec_collect │
00:04:10 verbose #5877 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5878 > >
00:04:10 verbose #5879 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5880 > > inl vec_collect fn vec =
00:04:10 verbose #5881 > > ((;[[]] |> to_vec), (vec |> from_vec : _ i32 _))
00:04:10 verbose #5882 > > ||> am.fold fun acc x =>
00:04:10 verbose #5883 > > acc |> vec_extend (fn x)
00:04:10 verbose #5884 > >
00:04:10 verbose #5885 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5886 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5887 > > │ ## vec_collect_option │
00:04:10 verbose #5888 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5889 > >
00:04:10 verbose #5890 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5891 > > inl vec_collect_option vec =
00:04:10 verbose #5892 > > ((;[[]] |> to_vec |> Ok), (vec |> from_vec : _ i32 _))
00:04:10 verbose #5893 > > ||> am.fold fun acc x =>
00:04:10 verbose #5894 > > x
00:04:10 verbose #5895 > > |> resultm.unbox
00:04:10 verbose #5896 > > |> fun x =>
00:04:10 verbose #5897 > > match acc, x |> resultm.map optionm'.unbox with
00:04:10 verbose #5898 > > | Ok acc, Ok (Some x) => acc |> vec_extend x |> Ok
00:04:10 verbose #5899 > > | _, Error error => error |> Error
00:04:10 verbose #5900 > > | _ => acc
00:04:10 verbose #5901 > >
00:04:10 verbose #5902 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5903 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5904 > > │ ## vec_collect_into │
00:04:10 verbose #5905 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5906 > >
00:04:10 verbose #5907 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5908 > > inl vec_collect_into forall (c : * -> * -> *) t e.
00:04:10 verbose #5909 > > (x : vec (c t e))
00:04:10 verbose #5910 > > : c (vec t) e
00:04:10 verbose #5911 > > =
00:04:10 verbose #5912 > > !\($'"!x.into_iter().collect()"')
00:04:10 verbose #5913 > >
00:04:10 verbose #5914 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5915 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5916 > > │ ## vec_mapi │
00:04:10 verbose #5917 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5918 > >
00:04:10 verbose #5919 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5920 > > inl vec_mapi forall dim t u. (fn : dim -> t -> u) (ar : vec t) : vec u =
00:04:10 verbose #5921 > > inl fn = join fn
00:04:10 verbose #5922 > > inl ar = join ar
00:04:10 verbose #5923 > > !\($'"!ar.iter().enumerate().map(|(i, x)|
00:04:10 verbose #5924 > > !fn(i.try_into().unwrap())(x.clone())).collect::<Vec<_>>()"')
00:04:10 verbose #5925 > >
00:04:10 verbose #5926 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5927 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5928 > > │ ## vec_map │
00:04:10 verbose #5929 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5930 > >
00:04:10 verbose #5931 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5932 > > inl vec_map forall t u. (fn : t -> u) (ar : vec t) : vec u =
00:04:10 verbose #5933 > > (!\($'"true; let _result = !ar.into_iter().map(|x| { //"') : bool) |> ignore
00:04:10 verbose #5934 > > (!\\(fn !\($'"x"'), $'"true; $0 }).collect::<Vec<_>>()"') : bool) |> ignore
00:04:10 verbose #5935 > > !\($'"_result"')
00:04:10 verbose #5936 > >
00:04:10 verbose #5937 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5938 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5939 > > │ ## vec_map''' │
00:04:10 verbose #5940 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5941 > >
00:04:10 verbose #5942 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5943 > > inl vec_map''' forall t u. (fn : t -> u) (ar : vec t) : vec u =
00:04:10 verbose #5944 > > (!\($'"true; let _result = !ar.into_iter().map(|x| { //"') : bool) |> ignore
00:04:10 verbose #5945 > > (!\\(fn !\($'"x"'), $'"true; $0 }}).collect::<Vec<_>>(); {{ //"') : bool) |>
00:04:10 verbose #5946 > > ignore
00:04:10 verbose #5947 > > !\($'"_result"')
00:04:10 verbose #5948 > >
00:04:10 verbose #5949 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5950 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5951 > > │ ## vec_map' │
00:04:10 verbose #5952 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5953 > >
00:04:10 verbose #5954 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5955 > > inl vec_map' forall t u. (fn : t -> u) (ar : vec t) : vec u =
00:04:10 verbose #5956 > > !\\((ar, fn), $'"$0.into_iter().map(|x|
00:04:10 verbose #5957 > > $1(x.clone())).collect::<Vec<_>>()"')
00:04:10 verbose #5958 > >
00:04:10 verbose #5959 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5960 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5961 > > │ ## vec_fold' │
00:04:10 verbose #5962 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5963 > >
00:04:10 verbose #5964 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5965 > > inl vec_fold' forall t u. (fn : u -> t -> u) (init : u) (ar : vec t) : u =
00:04:10 verbose #5966 > > (!\\(ar, $'"true; let _result = $0.into_iter().fold(!init, |acc, x| { //"')
00:04:10 verbose #5967 > > : bool) |> ignore
00:04:10 verbose #5968 > > (!\\(fn !\($'"acc"') !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:04:10 verbose #5969 > > !\($'"_result"')
00:04:10 verbose #5970 > >
00:04:10 verbose #5971 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5972 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5973 > > │ ## vec_for_each │
00:04:10 verbose #5974 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5975 > >
00:04:10 verbose #5976 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5977 > > inl vec_for_each forall t. (fn : t -> ()) (ar : vec t) : () =
00:04:10 verbose #5978 > > !\\((ar, fn), $'"$0.iter().for_each(|x| { $1(x.clone()); })"')
00:04:10 verbose #5979 > >
00:04:10 verbose #5980 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5981 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5982 > > │ ## vec_for_each' │
00:04:10 verbose #5983 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5984 > >
00:04:10 verbose #5985 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5986 > > inl vec_for_each' forall t. (fn : t -> ()) (ar : vec t) : () =
00:04:10 verbose #5987 > > (!\($'"true; !ar.into_iter().for_each(|x| { //"') : bool) |> ignore
00:04:10 verbose #5988 > > inl x = fn !\($'"x"')
00:04:10 verbose #5989 > > (!\($'"true; !x }}); { //"') : bool) |> ignore
00:04:10 verbose #5990 > >
00:04:10 verbose #5991 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #5992 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #5993 > > │ ## vec_filter │
00:04:10 verbose #5994 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #5995 > >
00:04:10 verbose #5996 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #5997 > > inl vec_filter forall t. (fn : t -> bool) (ar : vec t) : vec t =
00:04:10 verbose #5998 > > inl fn = join fn
00:04:10 verbose #5999 > > inl ar = join ar
00:04:10 verbose #6000 > > !\($'"!ar.into_iter().filter(|x|
00:04:10 verbose #6001 > > !fn(x.clone().clone())).collect::<Vec<_>>()"')
00:04:10 verbose #6002 > >
00:04:10 verbose #6003 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #6004 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #6005 > > │ ## vec_len │
00:04:10 verbose #6006 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #6007 > >
00:04:10 verbose #6008 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #6009 > > inl vec_len forall t. (vec : vec t) : unativeint =
00:04:10 verbose #6010 > > !\\(vec, $'"$0.len()"')
00:04:10 verbose #6011 > >
00:04:10 verbose #6012 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #6013 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #6014 > > │ ## vec_chunks │
00:04:10 verbose #6015 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #6016 > >
00:04:10 verbose #6017 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #6018 > > inl vec_chunks forall t. (n : i32) (vec : vec t) : vec (vec t) =
00:04:10 verbose #6019 > > !\\(vec, $'"$0.chunks(!n).map(|x| x.into_iter().map(|x|
00:04:10 verbose #6020 > > x.clone()).collect::<Vec<_>>()).collect::<Vec<_>>()"')
00:04:10 verbose #6021 > >
00:04:10 verbose #6022 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #6023 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #6024 > > │ ## slice │
00:04:10 verbose #6025 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #6026 > >
00:04:10 verbose #6027 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #6028 > > nominal slice t = $'Slice<`t>'
00:04:10 verbose #6029 > >
00:04:10 verbose #6030 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:10 verbose #6031 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:10 verbose #6032 > > │ ## slice │
00:04:10 verbose #6033 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:10 verbose #6034 > >
00:04:10 verbose #6035 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #6036 > > inl slice forall dim {int; number} el. from nearTo s : a dim el =
00:04:10 verbose #6037 > > am.slice { from nearTo } s
00:04:10 verbose #6038 > >
00:04:10 verbose #6039 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:10 verbose #6040 > > //// test
00:04:10 verbose #6041 > >
00:04:10 verbose #6042 > > inl x : _ i32 _ = a ;[[ 1i32; 2; 3 ]]
00:04:10 verbose #6043 > > x |> slice 0 0 |> _assert_eq (a ;[[]])
00:04:10 verbose #6044 > > x |> slice 0 1 |> _assert_eq (a ;[[ 1 ]])
00:04:10 verbose #6045 > > x |> slice 1 1 |> _assert_eq (a ;[[]])
00:04:10 verbose #6046 > > x |> slice 1 2 |> _assert_eq (a ;[[ 2 ]])
00:04:10 verbose #6047 > > x |> slice 2 2 |> _assert_eq (a ;[[]])
00:04:10 verbose #6048 > > x |> slice 0 2 |> _assert_eq (a ;[[ 1; 2 ]])
00:04:11 verbose #6049 > >
00:04:11 verbose #6050 > > ╭─[ 186.91ms - stdout ]────────────────────────────────────────────────────────╮
00:04:11 verbose #6051 > > │ assert_eq / actual: [||] / expected: [||] │
00:04:11 verbose #6052 > > │ assert_eq / actual: [|1|] / expected: [|1|] │
00:04:11 verbose #6053 > > │ assert_eq / actual: [||] / expected: [||] │
00:04:11 verbose #6054 > > │ assert_eq / actual: [|2|] / expected: [|2|] │
00:04:11 verbose #6055 > > │ assert_eq / actual: [||] / expected: [||] │
00:04:11 verbose #6056 > > │ assert_eq / actual: [|1; 2|] / expected: [|1; 2|] │
00:04:11 verbose #6057 > > │ │
00:04:11 verbose #6058 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6059 > >
00:04:11 verbose #6060 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6061 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6062 > > │ ## range │
00:04:11 verbose #6063 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6064 > >
00:04:11 verbose #6065 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6066 > > union range dim =
00:04:11 verbose #6067 > > | Start : dim
00:04:11 verbose #6068 > > | End : dim -> dim
00:04:11 verbose #6069 > >
00:04:11 verbose #6070 > > inl range start end s =
00:04:11 verbose #6071 > > inl start, end =
00:04:11 verbose #6072 > > match start, end with
00:04:11 verbose #6073 > > | Start start, End fn =>
00:04:11 verbose #6074 > > start, s |> length |> conv |> fn
00:04:11 verbose #6075 > > | End start_fn, End end_fn =>
00:04:11 verbose #6076 > > inl len = s |> length |> conv
00:04:11 verbose #6077 > > start_fn len, end_fn len
00:04:11 verbose #6078 > > s |> slice (start |> unbox) (end |> unbox)
00:04:11 verbose #6079 > >
00:04:11 verbose #6080 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6081 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6082 > > │ ## slice' │
00:04:11 verbose #6083 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6084 > >
00:04:11 verbose #6085 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6086 > > nominal slice' el dim = $'Slice\'<`el>'
00:04:11 verbose #6087 > >
00:04:11 verbose #6088 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6089 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6090 > > │ ## slice_singleton │
00:04:11 verbose #6091 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6092 > >
00:04:11 verbose #6093 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6094 > > inl slice_singleton forall dim el. (x : option el) : slice' el dim =
00:04:11 verbose #6095 > > match x with
00:04:11 verbose #6096 > > | Some x => !\($'"[[!x]]"')
00:04:11 verbose #6097 > > | None =>
00:04:11 verbose #6098 > > !\($'"[[\\\"\\\".to_string()]]"') : slice' el dim
00:04:11 verbose #6099 > > // emit_expr `(()) `(slice' el dim) () ($'"[[@dim]]"' : string) :
00:04:11 verbose #6100 > > slice' el 10
00:04:11 verbose #6101 > > // !\( : string) : slice' el i32 // !\($'"[[]]"')
00:04:11 verbose #6102 > >
00:04:11 verbose #6103 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6104 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6105 > > │ ## slice_length │
00:04:11 verbose #6106 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6107 > >
00:04:11 verbose #6108 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6109 > > inl slice_length forall t dim. (x : slice' t dim) : unativeint =
00:04:11 verbose #6110 > > !\($'"!x.len()"')
00:04:11 verbose #6111 > >
00:04:11 verbose #6112 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6113 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6114 > > │ ## slice_range │
00:04:11 verbose #6115 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6116 > >
00:04:11 verbose #6117 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6118 > > inl slice_range forall t dim. (start : range t) (end : range t) (s : slice' t
00:04:11 verbose #6119 > > dim) : rust.ref' (slice' t dim) =
00:04:11 verbose #6120 > > inl len = s |> slice_length
00:04:11 verbose #6121 > > inl start, (end : unativeint) =
00:04:11 verbose #6122 > > match start, end with
00:04:11 verbose #6123 > > | Start start, End fn => start, len |> convert |> fn |> convert
00:04:11 verbose #6124 > > | End start_fn, End end_fn => len |> convert |> start_fn, len |> convert
00:04:11 verbose #6125 > > |> end_fn |> convert
00:04:11 verbose #6126 > > match start, end with
00:04:11 verbose #6127 > > | start, end when unbox end =. len => !\($'"&!s[[!start..]]"')
00:04:11 verbose #6128 > > | start, end => !\\((start, end), $'"&!s[[$0..$1]]"')
00:04:11 verbose #6129 > >
00:04:11 verbose #6130 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6131 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6132 > > │ ## new_slice │
00:04:11 verbose #6133 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6134 > >
00:04:11 verbose #6135 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6136 > > inl new_slice forall el dim. (el : el) : slice' el dim =
00:04:11 verbose #6137 > > !\\(el, $'"[[$0; @dim]]"')
00:04:11 verbose #6138 > >
00:04:11 verbose #6139 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6140 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6141 > > │ ## as_slice │
00:04:11 verbose #6142 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6143 > >
00:04:11 verbose #6144 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6145 > > inl as_slice forall t. (x : array_base t) : rust.ref' (slice t) =
00:04:11 verbose #6146 > > inl x = x |> to_vec
00:04:11 verbose #6147 > > !\($'"!x.as_slice()"')
00:04:11 verbose #6148 > >
00:04:11 verbose #6149 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6150 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6151 > > │ ## slice_to_vec │
00:04:11 verbose #6152 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6153 > >
00:04:11 verbose #6154 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6155 > > inl slice_to_vec forall t. (slice : rust.ref' (slice t)) : vec t =
00:04:11 verbose #6156 > > !\\(slice, $'"$0.iter().map(|x| *x).collect::<Vec<_>>()"')
00:04:11 verbose #6157 > >
00:04:11 verbose #6158 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6159 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6160 > > │ ## any │
00:04:11 verbose #6161 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6162 > >
00:04:11 verbose #6163 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6164 > > inl any forall t. (fn : t -> bool) (source : array_base t) : bool =
00:04:11 verbose #6165 > > !\($'"!source.any(|x| !fn(x))"')
00:04:11 verbose #6166 > >
00:04:11 verbose #6167 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6168 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6169 > > │ ## iter_collect vec │
00:04:11 verbose #6170 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6171 > >
00:04:11 verbose #6172 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6173 > > open iter_prototypes
00:04:11 verbose #6174 > >
00:04:11 verbose #6175 > > instance iter_collect vec = fun (iter : iter_prototypes.into_iterator u) =>
00:04:11 verbose #6176 > > !\($'"!iter.collect::<Vec<_>>()"')
00:04:11 verbose #6177 > >
00:04:11 verbose #6178 > > instance iter_collect'' vec = fun (iter : iter_prototypes.into_iterator (t (u
00:04:11 verbose #6179 > > v))) =>
00:04:11 verbose #6180 > > !\($'"!iter.collect::<Vec<_>>()"')
00:04:11 verbose #6181 > >
00:04:11 verbose #6182 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:11 verbose #6183 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:11 verbose #6184 > > │ ## new_vec │
00:04:11 verbose #6185 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:11 verbose #6186 > >
00:04:11 verbose #6187 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6188 > > inl new_vec forall t. (items : list t) : vec t =
00:04:11 verbose #6189 > > inl items =
00:04:11 verbose #6190 > > (items, ("", 0i32))
00:04:11 verbose #6191 > > ||> listm.foldBack fun (x : t) (acc, i) =>
00:04:11 verbose #6192 > > inl x = join x
00:04:11 verbose #6193 > > $'"!x"' +. (if i = 0 then "" else ",") +. acc, i + 1
00:04:11 verbose #6194 > > |> fst
00:04:11 verbose #6195 > > !\($'"vec\![[" + !items + "]]"')
00:04:11 verbose #6196 > >
00:04:11 verbose #6197 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:11 verbose #6198 > > //// test
00:04:11 verbose #6199 > > ///! rust
00:04:11 verbose #6200 > >
00:04:11 verbose #6201 > > types ()
00:04:11 verbose #6202 > > sm'.types ()
00:04:11 verbose #6203 > > [[ 0i32; 1 ]]
00:04:11 verbose #6204 > > |> new_vec
00:04:11 verbose #6205 > > |> sm'.format_debug'
00:04:11 verbose #6206 > > |> sm'.from_std_string
00:04:11 verbose #6207 > > |> _assert_eq "[[0, 1]]"
00:04:14 verbose #6208 > >
00:04:14 verbose #6209 > > ╭─[ 3.64s - return value ]─────────────────────────────────────────────────────╮
00:04:14 verbose #6210 > > │ assert_eq / actual: "[0, 1]" / expected: "[0, 1]" │
00:04:14 verbose #6211 > > │ │
00:04:14 verbose #6212 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:15 verbose #6213 > 00:00:13 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 40712
00:04:15 verbose #6214 > 00:00:13 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:04:17 verbose #6215 > 00:00:15 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/am'.dib.ipynb to html
00:04:17 verbose #6216 > 00:00:15 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:04:17 verbose #6217 > 00:00:15 verbose #7 ! validate(nb)
00:04:19 verbose #6218 > 00:00:17 verbose #8 ! [NbConvertApp] Writing 410965 bytes to c:\home\git\polyglot\lib\spiral\am'.dib.html
00:04:19 verbose #6219 > 00:00:18 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637
00:04:19 verbose #6220 > 00:00:18 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637
00:04:19 verbose #6221 > 00:00:18 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:04:20 verbose #6222 > 00:00:18 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:04:20 verbose #6223 > 00:00:18 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:04:20 verbose #6224 > 00:00:19 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 41408
00:04:20 debug #6225 execute_with_options_async / exit_code: 0 / output.Length: 45248
00:04:20 debug #10 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path am'.dib --retries 3
00:04:20 debug #6226 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path crypto.dib --retries 3",
[||], None, None, true, None)
00:04:20 verbose #6227 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "crypto.dib", "--retries", "3"])
00:04:20 verbose #6228 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/crypto.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/crypto.dib" --output-path "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:04:22 verbose #6229 > >
00:04:22 verbose #6230 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:22 verbose #6231 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:22 verbose #6232 > > │ # crypto │
00:04:22 verbose #6233 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:22 verbose #6234 > >
00:04:22 verbose #6235 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:22 verbose #6236 > > open rust_operators
00:04:22 verbose #6237 > >
00:04:22 verbose #6238 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:04:22 verbose #6239 > > #r
00:04:22 verbose #6240 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:22 verbose #6241 > > otNet.Interactive.Spiral.dll"
00:04:22 verbose #6242 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:04:22 verbose #6243 > > #r
00:04:22 verbose #6244 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:22 verbose #6245 > > otNet.Interactive.dll"
00:04:22 verbose #6246 > > open type Microsoft.DotNet.Interactive.Kernel
00:04:27 verbose #6247 > >
00:04:27 verbose #6248 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6249 > > //// test
00:04:27 verbose #6250 > >
00:04:27 verbose #6251 > > open testing
00:04:27 verbose #6252 > > open file_system_operators
00:04:27 verbose #6253 > >
00:04:27 verbose #6254 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:27 verbose #6255 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:27 verbose #6256 > > │ ## types │
00:04:27 verbose #6257 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:27 verbose #6258 > >
00:04:27 verbose #6259 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6260 > > inl types () =
00:04:27 verbose #6261 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:27 verbose #6262 > > Fable.Core.Emit(\"sha2::Sha256\")>]]\n#endif\ntype sha2_Sha256 = class end"
00:04:27 verbose #6263 > >
00:04:27 verbose #6264 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6265 > > inl types () =
00:04:27 verbose #6266 > > sm'.types ()
00:04:27 verbose #6267 > > am'.types ()
00:04:27 verbose #6268 > > threading.types ()
00:04:27 verbose #6269 > > rust.types ()
00:04:27 verbose #6270 > > date_time.types ()
00:04:27 verbose #6271 > > file_system.types ()
00:04:27 verbose #6272 > > stream.types ()
00:04:27 verbose #6273 > > runtime.types ()
00:04:27 verbose #6274 > > types ()
00:04:27 verbose #6275 > >
00:04:27 verbose #6276 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:27 verbose #6277 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:27 verbose #6278 > > │ ## sha256 │
00:04:27 verbose #6279 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:27 verbose #6280 > >
00:04:27 verbose #6281 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6282 > > nominal sha256 = $'System.Security.Cryptography.SHA256'
00:04:27 verbose #6283 > >
00:04:27 verbose #6284 > > inl sha256 () : sha256 =
00:04:27 verbose #6285 > > $'`sha256.Create' ()
00:04:27 verbose #6286 > >
00:04:27 verbose #6287 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:27 verbose #6288 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:27 verbose #6289 > > │ ## sha256_compute_hash │
00:04:27 verbose #6290 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:27 verbose #6291 > >
00:04:27 verbose #6292 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6293 > > inl sha256_compute_hash (x : sha256) (data : a i32 u8) : a i32 u8 =
00:04:27 verbose #6294 > > data |> $'!x.ComputeHash'
00:04:27 verbose #6295 > >
00:04:27 verbose #6296 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:27 verbose #6297 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:27 verbose #6298 > > │ ## create_hash │
00:04:27 verbose #6299 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:27 verbose #6300 > >
00:04:27 verbose #6301 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6302 > > inl create_hash (x : string) : any =
00:04:27 verbose #6303 > > open ts_operators
00:04:27 verbose #6304 > > global "type ICryptoCreateHash = abstract createHash: x: string -> obj"
00:04:27 verbose #6305 > > inl crypto : $'ICryptoCreateHash' = ts.import_all "crypto"
00:04:27 verbose #6306 > > !\\(x, $'"!crypto.createHash($0)"')
00:04:27 verbose #6307 > >
00:04:27 verbose #6308 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:27 verbose #6309 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:27 verbose #6310 > > │ ## hash_update │
00:04:27 verbose #6311 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:27 verbose #6312 > >
00:04:27 verbose #6313 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6314 > > inl hash_update (s : string) (x : any) : any =
00:04:27 verbose #6315 > > open ts_operators
00:04:27 verbose #6316 > > !\\((x, s), $'"$0.update($1, \'utf8\')"')
00:04:27 verbose #6317 > >
00:04:27 verbose #6318 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:27 verbose #6319 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:27 verbose #6320 > > │ ## hash_digest │
00:04:27 verbose #6321 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:27 verbose #6322 > >
00:04:27 verbose #6323 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6324 > > inl hash_digest (s : string) (x : any) : string =
00:04:27 verbose #6325 > > open ts_operators
00:04:27 verbose #6326 > > !\\((x, s), $'"$0.digest($1)"')
00:04:27 verbose #6327 > >
00:04:27 verbose #6328 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:27 verbose #6329 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:27 verbose #6330 > > │ ## hash_text │
00:04:27 verbose #6331 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:27 verbose #6332 > >
00:04:27 verbose #6333 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6334 > > inl hash_text (input : string) =
00:04:27 verbose #6335 > > run_target function
00:04:27 verbose #6336 > > | Fsharp (Native) => fun () =>
00:04:27 verbose #6337 > > inl input = join input
00:04:27 verbose #6338 > > inl sha256 = sha256 () |> use
00:04:27 verbose #6339 > > input
00:04:27 verbose #6340 > > |> sm'.utf8_get_bytes
00:04:27 verbose #6341 > > |> sha256_compute_hash sha256
00:04:27 verbose #6342 > > |> am.map (sm'.byte_to_string "x2")
00:04:27 verbose #6343 > > |> seq.of_array'
00:04:27 verbose #6344 > > |> sm'.concat ""
00:04:27 verbose #6345 > > | TypeScript _ => fun () =>
00:04:27 verbose #6346 > > create_hash "sha256"
00:04:27 verbose #6347 > > |> hash_update input
00:04:27 verbose #6348 > > |> hash_digest "hex"
00:04:27 verbose #6349 > > | _ => fun () => null ()
00:04:27 verbose #6350 > >
00:04:27 verbose #6351 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:27 verbose #6352 > > //// test
00:04:27 verbose #6353 > >
00:04:27 verbose #6354 > > ""
00:04:27 verbose #6355 > > |> hash_text
00:04:27 verbose #6356 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:04:28 verbose #6357 > >
00:04:28 verbose #6358 > > ╭─[ 1.25s - stdout ]───────────────────────────────────────────────────────────╮
00:04:28 verbose #6359 > > │ assert_eq / actual: │
00:04:28 verbose #6360 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:04:28 verbose #6361 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:04:28 verbose #6362 > > │ │
00:04:28 verbose #6363 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:28 verbose #6364 > >
00:04:28 verbose #6365 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:28 verbose #6366 > > //// test
00:04:28 verbose #6367 > >
00:04:28 verbose #6368 > > " "
00:04:28 verbose #6369 > > |> hash_text
00:04:28 verbose #6370 > > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068"
00:04:28 verbose #6371 > >
00:04:28 verbose #6372 > > ╭─[ 97.58ms - stdout ]─────────────────────────────────────────────────────────╮
00:04:28 verbose #6373 > > │ assert_eq / actual: │
00:04:28 verbose #6374 > > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │
00:04:28 verbose #6375 > > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │
00:04:28 verbose #6376 > > │ │
00:04:28 verbose #6377 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:28 verbose #6378 > >
00:04:28 verbose #6379 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:28 verbose #6380 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:28 verbose #6381 > > │ ## get_file_hash' │
00:04:28 verbose #6382 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:28 verbose #6383 > >
00:04:28 verbose #6384 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:28 verbose #6385 > > inl get_file_hash' (path : string) : result string string =
00:04:28 verbose #6386 > > inl path = path |> file_system.normalize_path
00:04:28 verbose #6387 > > inl exit_code, result =
00:04:28 verbose #6388 > > runtime.execution_options fun x => { x with
00:04:28 verbose #6389 > > command = $'$"pwsh -c \\\"(Get-FileHash \'{!path}\' -Algorithm
00:04:28 verbose #6390 > > SHA256).Hash\\\""'
00:04:28 verbose #6391 > > }
00:04:28 verbose #6392 > > |> runtime.execute_with_options
00:04:28 verbose #6393 > > if exit_code = 0
00:04:28 verbose #6394 > > then result |> sm'.to_lower |> Ok
00:04:28 verbose #6395 > > else result |> Error
00:04:28 verbose #6396 > >
00:04:28 verbose #6397 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:28 verbose #6398 > > //// test
00:04:28 verbose #6399 > >
00:04:28 verbose #6400 > > types ()
00:04:28 verbose #6401 > > inl temp_folder, disposable = file_system.create_temp_directory ()
00:04:28 verbose #6402 > > disposable |> use |> ignore
00:04:28 verbose #6403 > > inl file_name = "test.txt"
00:04:28 verbose #6404 > > inl path = temp_folder </> file_name
00:04:28 verbose #6405 > > "" |> file_system.write_all_text_async path |> async.run_synchronously
00:04:28 verbose #6406 > > path
00:04:28 verbose #6407 > > |> get_file_hash'
00:04:28 verbose #6408 > > |> resultm.get
00:04:28 verbose #6409 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:04:32 verbose #6410 > >
00:04:32 verbose #6411 > > ╭─[ 3.60s - stdout ]───────────────────────────────────────────────────────────╮
00:04:32 verbose #6412 > > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │
00:04:32 verbose #6413 > > │ "pwsh -c "(Get-FileHash │
00:04:32 verbose #6414 > > │ 'c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240520-2156-2098-9819-9004 │
00:04:32 verbose #6415 > > │ 005d10ef/test.txt' -Algorithm SHA256).Hash"", │
00:04:32 verbose #6416 > > │ [||], None, None, true, None) │
00:04:32 verbose #6417 > > │ 00:00:00 verbose #2 > │
00:04:32 verbose #6418 > > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │
00:04:32 verbose #6419 > > │ 00:00:00 debug #3 execute_with_options_async / exit_code: 0 / │
00:04:32 verbose #6420 > > │ output.Length: 64 │
00:04:32 verbose #6421 > > │ assert_eq / actual: │
00:04:32 verbose #6422 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:04:32 verbose #6423 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:04:32 verbose #6424 > > │ │
00:04:32 verbose #6425 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:32 verbose #6426 > >
00:04:32 verbose #6427 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:32 verbose #6428 > > //// test
00:04:32 verbose #6429 > > ///! rust -d chrono encoding_rs encoding_rs_io futures futures-lite regex
00:04:32 verbose #6430 > >
00:04:32 verbose #6431 > > types ()
00:04:32 verbose #6432 > > inl temp_folder, disposable = file_system.create_temp_directory ()
00:04:32 verbose #6433 > > inl file_name = "test.txt"
00:04:32 verbose #6434 > > inl path = temp_folder </> file_name
00:04:32 verbose #6435 > > "" |> file_system.write_all_text path
00:04:32 verbose #6436 > > path
00:04:32 verbose #6437 > > |> get_file_hash'
00:04:32 verbose #6438 > > |> resultm.get
00:04:32 verbose #6439 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:04:32 verbose #6440 > > disposable |> use |> ignore
00:04:38 verbose #6441 > >
00:04:38 verbose #6442 > > ╭─[ 6.53s - return value ]─────────────────────────────────────────────────────╮
00:04:38 verbose #6443 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:04:38 verbose #6444 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_3304b5133e0369735335adef32 │
00:04:38 verbose #6445 > > │ 845d18619b035b504e4ffc49ee5bc8cd8f12db\20240520-2156-2740-8491-00000000ced0 │
00:04:38 verbose #6446 > > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │
00:04:38 verbose #6447 > > │ arguments: ["-c", "(Get-FileHash │
00:04:38 verbose #6448 > > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_3304b5133e0369735335adef3 │
00:04:38 verbose #6449 > > │ 2845d18619b035b504e4ffc49ee5bc8cd8f12db/20240520-2156-2740-8491-00000000ced0 │
00:04:38 verbose #6450 > > │ /test.txt' -Algorithm SHA256).Hash"] / options: (None, "pwsh -c │
00:04:38 verbose #6451 > > │ "(Get-FileHash │
00:04:38 verbose #6452 > > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_3304b5133e0369735335adef3 │
00:04:38 verbose #6453 > > │ 2845d18619b035b504e4ffc49ee5bc8cd8f12db/20240520-2156-2740-8491-00000000ced0 │
00:04:38 verbose #6454 > > │ /test.txt' -Algorithm SHA256).Hash"", Array(MutCell([])), None, None, true, │
00:04:38 verbose #6455 > > │ None) │
00:04:38 verbose #6456 > > │ 00:00:00 verbose #3 > │
00:04:38 verbose #6457 > > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │
00:04:38 verbose #6458 > > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │
00:04:38 verbose #6459 > > │ 0 / std_trace.Length: 64 │
00:04:38 verbose #6460 > > │ assert_eq / actual: │
00:04:38 verbose #6461 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:04:38 verbose #6462 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:04:38 verbose #6463 > > │ │
00:04:38 verbose #6464 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:38 verbose #6465 > >
00:04:38 verbose #6466 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:38 verbose #6467 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:38 verbose #6468 > > │ ## sha256' │
00:04:38 verbose #6469 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:38 verbose #6470 > >
00:04:38 verbose #6471 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:38 verbose #6472 > > nominal sha256' = $'sha2_Sha256'
00:04:38 verbose #6473 > >
00:04:38 verbose #6474 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:38 verbose #6475 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:38 verbose #6476 > > │ ## new_sha256 │
00:04:38 verbose #6477 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:38 verbose #6478 > >
00:04:38 verbose #6479 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:38 verbose #6480 > > inl new_sha256 () : sha256' =
00:04:38 verbose #6481 > > !\($'"sha2::Digest::new()"')
00:04:38 verbose #6482 > >
00:04:38 verbose #6483 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:38 verbose #6484 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:38 verbose #6485 > > │ ## hasher_update │
00:04:38 verbose #6486 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:38 verbose #6487 > >
00:04:38 verbose #6488 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:38 verbose #6489 > > inl hasher_update forall el dim. (slice : rust.ref' (am'.slice' el dim)) (hasher
00:04:38 verbose #6490 > > : sha256') : () =
00:04:38 verbose #6491 > > !\($'"sha2::Digest::update(&mut !hasher, !slice)"')
00:04:38 verbose #6492 > >
00:04:38 verbose #6493 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:38 verbose #6494 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:38 verbose #6495 > > │ ## hasher_finalize │
00:04:38 verbose #6496 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:38 verbose #6497 > >
00:04:38 verbose #6498 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:38 verbose #6499 > > inl hasher_finalize (hasher : sha256') : rust.ref' (am'.slice u8) =
00:04:38 verbose #6500 > > !\($'"&sha2::Digest::finalize(!hasher)"')
00:04:38 verbose #6501 > >
00:04:38 verbose #6502 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:38 verbose #6503 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:38 verbose #6504 > > │ ## get_file_hash │
00:04:38 verbose #6505 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:38 verbose #6506 > >
00:04:38 verbose #6507 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:38 verbose #6508 > > inl get_file_hash (path : string) : result string string =
00:04:38 verbose #6509 > > inl path = path |> file_system.normalize_path
00:04:38 verbose #6510 > > inl file = path |> file_system.file_open |> resultm.unwrap'
00:04:38 verbose #6511 > > inl reader = file |> stream.new_buf_reader
00:04:38 verbose #6512 > > (!\($'"true; let mut !reader = !reader"') : bool) |> ignore
00:04:38 verbose #6513 > > inl hasher = new_sha256 ()
00:04:38 verbose #6514 > > (!\($'"true; let mut !hasher = !hasher"') : bool) |> ignore
00:04:38 verbose #6515 > >
00:04:38 verbose #6516 > > real
00:04:38 verbose #6517 > > inl size = 1024
00:04:38 verbose #6518 > > inl zero = convert `i32 `unativeint 0
00:04:38 verbose #6519 > > inl buffer = am'.new_slice `u8 `@size 0u8
00:04:38 verbose #6520 > >
00:04:38 verbose #6521 > > rust.loop 2 fun () =>
00:04:38 verbose #6522 > > inl count = stream.buf_reader_read `u8 `@size buffer reader
00:04:38 verbose #6523 > > inl count = resultm.unwrap' `unativeint `(stream.io_error) count
00:04:38 verbose #6524 > >
00:04:38 verbose #6525 > > if (=.) `unativeint count zero then rust.break ()
00:04:38 verbose #6526 > >
00:04:38 verbose #6527 > > hasher_update `u8 `@size
00:04:38 verbose #6528 > > (
00:04:38 verbose #6529 > > am'.slice_range `u8 `@size
00:04:38 verbose #6530 > > (am'.Start `unativeint zero)
00:04:38 verbose #6531 > > (am'.End `unativeint ((fun _ => count) : unativeint ->
00:04:38 verbose #6532 > > unativeint))
00:04:38 verbose #6533 > > buffer
00:04:38 verbose #6534 > > )
00:04:38 verbose #6535 > > hasher
00:04:38 verbose #6536 > >
00:04:38 verbose #6537 > > hasher
00:04:38 verbose #6538 > > |> hasher_finalize
00:04:38 verbose #6539 > > |> am'.slice_to_vec
00:04:38 verbose #6540 > > |> am'.vec_map' (sm'.format_custom' "{:02x}" >> sm'.from_std_string)
00:04:38 verbose #6541 > > |> am'.from_vec
00:04:38 verbose #6542 > > |> fun x => x : _ i32 _
00:04:38 verbose #6543 > > |> seq.of_array'
00:04:38 verbose #6544 > > |> sm'.concat ""
00:04:38 verbose #6545 > > |> Ok
00:04:39 verbose #6546 > >
00:04:39 verbose #6547 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #6548 > > //// test
00:04:39 verbose #6549 > > ///! rust -d chrono regex sha2
00:04:39 verbose #6550 > >
00:04:39 verbose #6551 > > types ()
00:04:39 verbose #6552 > > inl temp_folder, disposable = file_system.create_temp_directory ()
00:04:39 verbose #6553 > >
00:04:39 verbose #6554 > > inl file_name = join "test.txt"
00:04:39 verbose #6555 > > inl path = temp_folder </> file_name
00:04:39 verbose #6556 > > "" |> file_system.write_all_text path
00:04:39 verbose #6557 > > path
00:04:39 verbose #6558 > > |> get_file_hash
00:04:39 verbose #6559 > > |> resultm.get
00:04:39 verbose #6560 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:04:39 verbose #6561 > > disposable |> use |> ignore
00:04:44 verbose #6562 > >
00:04:44 verbose #6563 > > ╭─[ 5.12s - return value ]─────────────────────────────────────────────────────╮
00:04:44 verbose #6564 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:04:44 verbose #6565 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_a02cc45d6418f5805fdad39246 │
00:04:44 verbose #6566 > > │ c4240ea0caf0e79b2afe6020b16a0d61535451\20240520-2156-3326-4846-0000002195cc │
00:04:44 verbose #6567 > > │ assert_eq / actual: │
00:04:44 verbose #6568 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:04:44 verbose #6569 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:04:44 verbose #6570 > > │ │
00:04:44 verbose #6571 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:44 verbose #6572 > >
00:04:44 verbose #6573 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:44 verbose #6574 > > //// test
00:04:44 verbose #6575 > > ///! rust -d chrono regex sha2
00:04:44 verbose #6576 > >
00:04:44 verbose #6577 > > types ()
00:04:44 verbose #6578 > > inl temp_folder, disposable = file_system.create_temp_directory ()
00:04:44 verbose #6579 > >
00:04:44 verbose #6580 > > inl file_name = join "test.txt"
00:04:44 verbose #6581 > > inl path = temp_folder </> file_name
00:04:44 verbose #6582 > > " " |> file_system.write_all_text path
00:04:44 verbose #6583 > > path
00:04:44 verbose #6584 > > |> get_file_hash
00:04:44 verbose #6585 > > |> resultm.get
00:04:44 verbose #6586 > > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068"
00:04:44 verbose #6587 > > disposable |> use |> ignore
00:04:48 verbose #6588 > >
00:04:48 verbose #6589 > > ╭─[ 4.67s - return value ]─────────────────────────────────────────────────────╮
00:04:48 verbose #6590 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:04:48 verbose #6591 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_14b1b3ffdd730972abefc463f1 │
00:04:48 verbose #6592 > > │ 75c19bff67da562a5994356a168250ee095076\20240520-2156-3780-9616-000000a2b049 │
00:04:48 verbose #6593 > > │ assert_eq / actual: │
00:04:48 verbose #6594 > > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │
00:04:48 verbose #6595 > > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │
00:04:48 verbose #6596 > > │ │
00:04:48 verbose #6597 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:48 verbose #6598 > >
00:04:48 verbose #6599 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:48 verbose #6600 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:48 verbose #6601 > > │ ## main │
00:04:48 verbose #6602 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:48 verbose #6603 > >
00:04:48 verbose #6604 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:48 verbose #6605 > > inl main () =
00:04:48 verbose #6606 > > types ()
00:04:48 verbose #6607 > > $'let hash_text x = !hash_text x' : ()
00:04:49 verbose #6608 > 00:00:28 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 18229
00:04:49 verbose #6609 > 00:00:28 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:04:51 verbose #6610 > 00:00:30 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb to html
00:04:51 verbose #6611 > 00:00:30 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:04:51 verbose #6612 > 00:00:30 verbose #7 ! validate(nb)
00:04:52 verbose #6613 > 00:00:32 verbose #8 ! [NbConvertApp] Writing 319040 bytes to c:\home\git\polyglot\lib\spiral\crypto.dib.html
00:04:52 verbose #6614 > 00:00:32 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643
00:04:52 verbose #6615 > 00:00:32 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643
00:04:52 verbose #6616 > 00:00:32 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:04:53 verbose #6617 > 00:00:33 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:04:53 verbose #6618 > 00:00:33 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:04:54 verbose #6619 > 00:00:33 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18931
00:04:54 debug #6620 execute_with_options_async / exit_code: 0 / output.Length: 21918
00:04:54 debug #11 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path crypto.dib --retries 3
00:04:54 debug #6621 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path common.dib --retries 3",
[||], None, None, true, None)
00:04:54 verbose #6622 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "common.dib", "--retries", "3"])
00:04:54 verbose #6623 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/common.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/common.dib" --output-path "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:04:56 verbose #6624 > >
00:04:56 verbose #6625 > > ── markdown ────────────────────────────────────────────────────────────────────
00:04:56 verbose #6626 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:56 verbose #6627 > > │ # common │
00:04:56 verbose #6628 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:56 verbose #6629 > >
00:04:56 verbose #6630 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:56 verbose #6631 > > //// test
00:04:56 verbose #6632 > >
00:04:56 verbose #6633 > > open testing
00:04:56 verbose #6634 > >
00:04:56 verbose #6635 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:04:56 verbose #6636 > > #r
00:04:56 verbose #6637 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:56 verbose #6638 > > otNet.Interactive.Spiral.dll"
00:04:56 verbose #6639 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:04:56 verbose #6640 > > #r
00:04:56 verbose #6641 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:56 verbose #6642 > > otNet.Interactive.dll"
00:04:56 verbose #6643 > > open type Microsoft.DotNet.Interactive.Kernel
00:05:00 verbose #6644 > >
00:05:00 verbose #6645 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:00 verbose #6646 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:00 verbose #6647 > > │ ## types │
00:05:00 verbose #6648 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:00 verbose #6649 > >
00:05:00 verbose #6650 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:00 verbose #6651 > > inl types () =
00:05:00 verbose #6652 > > env.types ()
00:05:00 verbose #6653 > > rust.types ()
00:05:00 verbose #6654 > > sm'.types ()
00:05:00 verbose #6655 > >
00:05:00 verbose #6656 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:00 verbose #6657 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:00 verbose #6658 > > │ ## prototype │
00:05:00 verbose #6659 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:00 verbose #6660 > >
00:05:00 verbose #6661 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:00 verbose #6662 > > prototype (~:>) r : forall t. t -> r
00:05:00 verbose #6663 > >
00:05:00 verbose #6664 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:00 verbose #6665 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:00 verbose #6666 > > │ ## run_target │
00:05:00 verbose #6667 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:00 verbose #6668 > >
00:05:00 verbose #6669 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:00 verbose #6670 > > //// test
00:05:00 verbose #6671 > >
00:05:00 verbose #6672 > > run_target function
00:05:00 verbose #6673 > > | Fsharp (Native) => fun () => $'1uy'
00:05:00 verbose #6674 > > | _ => fun () => $'2uy'
00:05:00 verbose #6675 > > |> _assert_eq 1u8
00:05:01 verbose #6676 > >
00:05:01 verbose #6677 > > ╭─[ 793.87ms - stdout ]────────────────────────────────────────────────────────╮
00:05:01 verbose #6678 > > │ assert_eq / actual: 1uy / expected: 1uy │
00:05:01 verbose #6679 > > │ │
00:05:01 verbose #6680 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:01 verbose #6681 > >
00:05:01 verbose #6682 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:01 verbose #6683 > > //// test
00:05:01 verbose #6684 > > ///! rust
00:05:01 verbose #6685 > >
00:05:01 verbose #6686 > > run_target function
00:05:01 verbose #6687 > > | Rust (Native) => fun () => $'1uy'
00:05:01 verbose #6688 > > | _ => fun () => $'2uy'
00:05:01 verbose #6689 > > |> _assert_eq 1u8
00:05:05 verbose #6690 > >
00:05:05 verbose #6691 > > ╭─[ 3.50s - return value ]─────────────────────────────────────────────────────╮
00:05:05 verbose #6692 > > │ assert_eq / actual: 1 / expected: 1 │
00:05:05 verbose #6693 > > │ │
00:05:05 verbose #6694 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6695 > >
00:05:05 verbose #6696 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:05 verbose #6697 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:05 verbose #6698 > > │ ## upcast │
00:05:05 verbose #6699 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6700 > >
00:05:05 verbose #6701 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6702 > > inl upcast forall t u. (x : t) : u =
00:05:05 verbose #6703 > > $'!x :> `u '
00:05:05 verbose #6704 > >
00:05:05 verbose #6705 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:05 verbose #6706 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:05 verbose #6707 > > │ ## downcast │
00:05:05 verbose #6708 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6709 > >
00:05:05 verbose #6710 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6711 > > inl downcast forall t u. (x : t) : u =
00:05:05 verbose #6712 > > $'!x :?> `u '
00:05:05 verbose #6713 > >
00:05:05 verbose #6714 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:05 verbose #6715 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:05 verbose #6716 > > │ ## to_any │
00:05:05 verbose #6717 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6718 > >
00:05:05 verbose #6719 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6720 > > inl to_any forall t. (obj : t) : any =
00:05:05 verbose #6721 > > $'!obj '
00:05:05 verbose #6722 > >
00:05:05 verbose #6723 > > instance (~:>) any = to_any
00:05:05 verbose #6724 > >
00:05:05 verbose #6725 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:05 verbose #6726 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:05 verbose #6727 > > │ ## (||>) │
00:05:05 verbose #6728 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6729 > >
00:05:05 verbose #6730 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6731 > > //// test
00:05:05 verbose #6732 > >
00:05:05 verbose #6733 > > (3i32, 2i32)
00:05:05 verbose #6734 > > ||> fun a b => a - b
00:05:05 verbose #6735 > > |> _assert_eq 1
00:05:05 verbose #6736 > >
00:05:05 verbose #6737 > > ╭─[ 45.70ms - stdout ]─────────────────────────────────────────────────────────╮
00:05:05 verbose #6738 > > │ assert_eq / actual: 1 / expected: 1 │
00:05:05 verbose #6739 > > │ │
00:05:05 verbose #6740 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6741 > >
00:05:05 verbose #6742 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:05 verbose #6743 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:05 verbose #6744 > > │ ## flip │
00:05:05 verbose #6745 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6746 > >
00:05:05 verbose #6747 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6748 > > inl flip fn a b =
00:05:05 verbose #6749 > > fn b a
00:05:05 verbose #6750 > >
00:05:05 verbose #6751 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6752 > > //// test
00:05:05 verbose #6753 > >
00:05:05 verbose #6754 > > (1i32, 2i32)
00:05:05 verbose #6755 > > ||> flip pair
00:05:05 verbose #6756 > > |> _assert_eq (2, 1)
00:05:05 verbose #6757 > >
00:05:05 verbose #6758 > > ╭─[ 56.82ms - stdout ]─────────────────────────────────────────────────────────╮
00:05:05 verbose #6759 > > │ assert_eq / actual: struct (2, 1) / expected: struct (2, 1) │
00:05:05 verbose #6760 > > │ │
00:05:05 verbose #6761 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6762 > >
00:05:05 verbose #6763 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:05 verbose #6764 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:05 verbose #6765 > > │ ## join_body │
00:05:05 verbose #6766 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6767 > >
00:05:05 verbose #6768 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6769 > > inl join_body body acc x =
00:05:05 verbose #6770 > > if var_is x |> not
00:05:05 verbose #6771 > > then body acc x
00:05:05 verbose #6772 > > else
00:05:05 verbose #6773 > > inl acc = dyn acc
00:05:05 verbose #6774 > > join body acc x
00:05:05 verbose #6775 > >
00:05:05 verbose #6776 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6777 > > //// test
00:05:05 verbose #6778 > >
00:05:05 verbose #6779 > > inl rec fold_list f s = function
00:05:05 verbose #6780 > > | Cons (x, x') => fold_list f (f s x) x'
00:05:05 verbose #6781 > > | Nil => s
00:05:05 verbose #6782 > >
00:05:05 verbose #6783 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6784 > > //// test
00:05:05 verbose #6785 > >
00:05:05 verbose #6786 > > [[ 5i32; 4; join 3; 2; 1 ]]
00:05:05 verbose #6787 > > |> fold_list (+) 0
00:05:05 verbose #6788 > > |> _assert_eq 15
00:05:05 verbose #6789 > >
00:05:05 verbose #6790 > > ╭─[ 123.34ms - stdout ]────────────────────────────────────────────────────────╮
00:05:05 verbose #6791 > > │ assert_eq / actual: 15 / expected: 15 │
00:05:05 verbose #6792 > > │ │
00:05:05 verbose #6793 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6794 > >
00:05:05 verbose #6795 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6796 > > //// test
00:05:05 verbose #6797 > >
00:05:05 verbose #6798 > > [[ 5i32; 4; join 3; 2; 1 ]]
00:05:05 verbose #6799 > > |> fold_list (join_body (+)) 0
00:05:05 verbose #6800 > > |> _assert_eq 15
00:05:05 verbose #6801 > >
00:05:05 verbose #6802 > > ╭─[ 56.26ms - stdout ]─────────────────────────────────────────────────────────╮
00:05:05 verbose #6803 > > │ assert_eq / actual: 15 / expected: 15 │
00:05:05 verbose #6804 > > │ │
00:05:05 verbose #6805 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6806 > >
00:05:05 verbose #6807 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:05 verbose #6808 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:05 verbose #6809 > > │ ## join_body_unit │
00:05:05 verbose #6810 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:05 verbose #6811 > >
00:05:05 verbose #6812 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:05 verbose #6813 > > inl join_body_unit body d x =
00:05:05 verbose #6814 > > if var_is d |> not
00:05:05 verbose #6815 > > then body x
00:05:05 verbose #6816 > > else
00:05:05 verbose #6817 > > inl x = dyn x
00:05:05 verbose #6818 > > join body x
00:05:06 verbose #6819 > 00:05:05 debug #72 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/824cf2456333e3355ba2fc27a1dfade4effc425ac8ff6e5e86dd439cde67797d/main.spi
00:05:06 verbose #6820 > >
00:05:06 verbose #6821 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #6822 > > //// test
00:05:06 verbose #6823 > >
00:05:06 verbose #6824 > > [[ 5i32; 4; join 3; 2; 1 ]]
00:05:06 verbose #6825 > > |> fold_list (fun acc n => join_body_unit ((+) acc) n n) 0
00:05:06 verbose #6826 > > |> _assert_eq 15
00:05:07 verbose #6827 > 00:05:05 debug #73 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/09030a579a5b7a430ce23482ff398d697035bc719503c2142df37f38fe99d035/main.spi
00:05:07 verbose #6828 > >
00:05:07 verbose #6829 > > ╭─[ 670.85ms - stdout ]────────────────────────────────────────────────────────╮
00:05:07 verbose #6830 > > │ assert_eq / actual: 15 / expected: 15 │
00:05:07 verbose #6831 > > │ │
00:05:07 verbose #6832 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:07 verbose #6833 > >
00:05:07 verbose #6834 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:07 verbose #6835 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:07 verbose #6836 > > │ ## nameof │
00:05:07 verbose #6837 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:07 verbose #6838 > >
00:05:07 verbose #6839 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:07 verbose #6840 > > inl nameof x : string =
00:05:07 verbose #6841 > > $'nameof !x '
00:05:07 verbose #6842 > 00:05:06 debug #74 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/34f27f02e94f89ff1a5912aa282604af246971c888a4cc4fd030a99930983e05/main.spi
00:05:07 verbose #6843 > >
00:05:07 verbose #6844 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:07 verbose #6845 > > //// test
00:05:07 verbose #6846 > >
00:05:07 verbose #6847 > > fun () => failwith "test"
00:05:07 verbose #6848 > > |> _throws
00:05:07 verbose #6849 > > |> optionm.map sm'.format_exception
00:05:07 verbose #6850 > > |> _assert_eq (Some "System.Exception: test")
00:05:08 verbose #6851 > 00:05:07 debug #75 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/39260234b0804223e1fa3472eab8c1dfc920771d9229f928306dfe87cfbe25a1/main.spi
00:05:09 verbose #6852 > >
00:05:09 verbose #6853 > > ╭─[ 1.19s - stdout ]───────────────────────────────────────────────────────────╮
00:05:09 verbose #6854 > > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │
00:05:09 verbose #6855 > > │ "System.Exception: test" │
00:05:09 verbose #6856 > > │ │
00:05:09 verbose #6857 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:09 verbose #6858 > >
00:05:09 verbose #6859 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:09 verbose #6860 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:09 verbose #6861 > > │ ## disposable │
00:05:09 verbose #6862 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:09 verbose #6863 > >
00:05:09 verbose #6864 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:09 verbose #6865 > > nominal disposable t = $'System.IDisposable'
00:05:09 verbose #6866 > 00:05:08 debug #76 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ab7fc97623078ba0561a1f9c78be2519abeef8dc99555a46d173335275728578/main.spi
00:05:09 verbose #6867 > >
00:05:09 verbose #6868 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:09 verbose #6869 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:09 verbose #6870 > > │ ## dispose │
00:05:09 verbose #6871 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:09 verbose #6872 > >
00:05:09 verbose #6873 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:09 verbose #6874 > > inl dispose (disposable : disposable _) : () =
00:05:09 verbose #6875 > > disposable |> $'_.Dispose()'
00:05:10 verbose #6876 > 00:05:09 debug #77 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/99c32c7ab7c91dea741636aa40575ba06c66b2057c1465db34fd201e6f53b278/main.spi
00:05:10 verbose #6877 > >
00:05:10 verbose #6878 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:10 verbose #6879 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:10 verbose #6880 > > │ ## new_disposable │
00:05:10 verbose #6881 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:10 verbose #6882 > >
00:05:10 verbose #6883 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:10 verbose #6884 > > inl new_disposable (fn : () -> ()) : disposable _ =
00:05:10 verbose #6885 > > run_target function
00:05:10 verbose #6886 > > | Rust _ => fun () =>
00:05:10 verbose #6887 > > global "type Disposable (f : unit -> unit) = interface
00:05:10 verbose #6888 > > System.IDisposable with member _.Dispose () = f ()"
00:05:10 verbose #6889 > > $'new Disposable (fun () -> Fable.Core.RustInterop.emitRustExpr !fn
00:05:10 verbose #6890 > > "$0()" )'
00:05:10 verbose #6891 > > | Fsharp _ => fun () =>
00:05:10 verbose #6892 > > inl fn = join fn
00:05:10 verbose #6893 > > $'{ new System.IDisposable with member _.Dispose () = !fn () }'
00:05:10 verbose #6894 > > | _ => fun () => null ()
00:05:10 verbose #6895 > 00:05:09 debug #78 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a26d00a0d366ae1347a7bb2ce5a6278a1c2b3b91b415e9ca334097d77034b6f8/main.spi
00:05:11 verbose #6896 > >
00:05:11 verbose #6897 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:11 verbose #6898 > > //// test
00:05:11 verbose #6899 > >
00:05:11 verbose #6900 > > inl new_disposable_test = mut 0i32
00:05:11 verbose #6901 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:05:11 verbose #6902 > > |> fun x => x : disposable ()
00:05:11 verbose #6903 > > |> dispose
00:05:11 verbose #6904 > > *new_disposable_test |> _assert_eq 1
00:05:11 verbose #6905 > 00:05:10 debug #79 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2fb6eca86a0e6d6524e2ceb750eb7208f23b3e4384d78b01e7961e22e9088270/main.spi
00:05:11 verbose #6906 > >
00:05:11 verbose #6907 > > ╭─[ 867.72ms - stdout ]────────────────────────────────────────────────────────╮
00:05:11 verbose #6908 > > │ assert_eq / actual: 1 / expected: 1 │
00:05:11 verbose #6909 > > │ │
00:05:11 verbose #6910 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:11 verbose #6911 > >
00:05:11 verbose #6912 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:11 verbose #6913 > > //// test
00:05:11 verbose #6914 > > ///! rust
00:05:11 verbose #6915 > >
00:05:11 verbose #6916 > > inl new_disposable_test = mut 0i32
00:05:11 verbose #6917 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:05:11 verbose #6918 > > |> fun x => x : disposable ()
00:05:11 verbose #6919 > > |> dispose
00:05:11 verbose #6920 > > *new_disposable_test |> _assert_eq 1
00:05:12 verbose #6921 > 00:05:11 debug #80 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c469d8419549700cfa21a090fe3208d654728bf2cd0bfea92857efb204808cb4/main.spi
00:05:16 verbose #6922 > >
00:05:16 verbose #6923 > > ╭─[ 4.34s - return value ]─────────────────────────────────────────────────────╮
00:05:16 verbose #6924 > > │ assert_eq / actual: 1 / expected: 1 │
00:05:16 verbose #6925 > > │ │
00:05:16 verbose #6926 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:16 verbose #6927 > >
00:05:16 verbose #6928 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:16 verbose #6929 > > //// test
00:05:16 verbose #6930 > >
00:05:16 verbose #6931 > > inl new_disposable_test = mut 0i32
00:05:16 verbose #6932 > > fun () =>
00:05:16 verbose #6933 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:05:16 verbose #6934 > > |> fun x => x : disposable ()
00:05:16 verbose #6935 > > |> use
00:05:16 verbose #6936 > > |> ignore
00:05:16 verbose #6937 > > |> return
00:05:16 verbose #6938 > > |> async.new_task
00:05:16 verbose #6939 > > |> async.await_task
00:05:16 verbose #6940 > > |> async.run_synchronously
00:05:16 verbose #6941 > > *new_disposable_test |> _assert_eq 1
00:05:16 verbose #6942 > 00:05:15 debug #81 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9f93ac913e94944f6c621aba735f89f8928b96545a42769a49ff756829979f1b/main.spi
00:05:17 verbose #6943 > >
00:05:17 verbose #6944 > > ╭─[ 844.97ms - stdout ]────────────────────────────────────────────────────────╮
00:05:17 verbose #6945 > > │ assert_eq / actual: 1 / expected: 1 │
00:05:17 verbose #6946 > > │ │
00:05:17 verbose #6947 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:17 verbose #6948 > >
00:05:17 verbose #6949 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:17 verbose #6950 > > //// test
00:05:17 verbose #6951 > >
00:05:17 verbose #6952 > > inl new_disposable_test = mut 0i32
00:05:17 verbose #6953 > > fun () =>
00:05:17 verbose #6954 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:05:17 verbose #6955 > > |> fun x => x : disposable ()
00:05:17 verbose #6956 > > |> use
00:05:17 verbose #6957 > > |> ignore
00:05:17 verbose #6958 > > |> return
00:05:17 verbose #6959 > > |> async.new_async
00:05:17 verbose #6960 > > |> async.run_synchronously
00:05:17 verbose #6961 > > *new_disposable_test |> _assert_eq 1
00:05:17 verbose #6962 > 00:05:16 debug #82 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9571ebd4c1660df073005029bb8cddcccf7d9ac9758c629cea2da905116fe02e/main.spi
00:05:17 verbose #6963 > >
00:05:17 verbose #6964 > > ╭─[ 746.07ms - stdout ]────────────────────────────────────────────────────────╮
00:05:17 verbose #6965 > > │ assert_eq / actual: 1 / expected: 1 │
00:05:17 verbose #6966 > > │ │
00:05:17 verbose #6967 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:17 verbose #6968 > >
00:05:17 verbose #6969 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:17 verbose #6970 > > //// test
00:05:17 verbose #6971 > >
00:05:17 verbose #6972 > > inl new_disposable_test = mut 0i32
00:05:17 verbose #6973 > > fun () =>
00:05:17 verbose #6974 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:05:17 verbose #6975 > > |> fun x => x : disposable ()
00:05:17 verbose #6976 > > |> ignore
00:05:17 verbose #6977 > > |> return
00:05:17 verbose #6978 > > |> async.new_async
00:05:17 verbose #6979 > > |> async.run_synchronously
00:05:17 verbose #6980 > > *new_disposable_test |> _assert_eq 0
00:05:18 verbose #6981 > 00:05:17 debug #83 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e7c10089ec1778b192e62d94e07a64651ec7e5184647bd6c63f5f6009bffdbc3/main.spi
00:05:18 verbose #6982 > >
00:05:18 verbose #6983 > > ╭─[ 736.54ms - stdout ]────────────────────────────────────────────────────────╮
00:05:18 verbose #6984 > > │ assert_eq / actual: 0 / expected: 0 │
00:05:18 verbose #6985 > > │ │
00:05:18 verbose #6986 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:18 verbose #6987 > >
00:05:18 verbose #6988 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:18 verbose #6989 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:18 verbose #6990 > > │ ## return │
00:05:18 verbose #6991 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:18 verbose #6992 > >
00:05:18 verbose #6993 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:18 verbose #6994 > > inl return forall t. (x : t) : () =
00:05:18 verbose #6995 > > $'return !x '
00:05:18 verbose #6996 > >
00:05:18 verbose #6997 > > inl return' forall t. (x : t) : t =
00:05:18 verbose #6998 > > $'return !x '
00:05:19 verbose #6999 > 00:05:17 debug #84 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b5d0acdb7ff0f527a5cb233c265f00c8ee11c443429afb2c59df7d4ceff629a6/main.spi
00:05:19 verbose #7000 > >
00:05:19 verbose #7001 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:19 verbose #7002 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:19 verbose #7003 > > │ ## sleep │
00:05:19 verbose #7004 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:19 verbose #7005 > >
00:05:19 verbose #7006 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:19 verbose #7007 > > inl sleep (n : i32) : () =
00:05:19 verbose #7008 > > run_target function
00:05:19 verbose #7009 > > | Fsharp (Native) => fun () => $'System.Threading.Thread.Sleep' n
00:05:19 verbose #7010 > > | _ => fun () => ()
00:05:19 verbose #7011 > 00:05:18 debug #85 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8e459739925faf36b491d69a3e4fd06e991803ae8b3899a25f618310dfc8b235/main.spi
00:05:20 verbose #7012 > >
00:05:20 verbose #7013 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:20 verbose #7014 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:20 verbose #7015 > > │ ## retry_fn │
00:05:20 verbose #7016 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:20 verbose #7017 > >
00:05:20 verbose #7018 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:20 verbose #7019 > > inl retry_fn forall t. retries (fn : () -> t) : option t =
00:05:20 verbose #7020 > > let rec loop retry =
00:05:20 verbose #7021 > > try
00:05:20 verbose #7022 > > fun () =>
00:05:20 verbose #7023 > > if retry < retries
00:05:20 verbose #7024 > > then fn () |> Some
00:05:20 verbose #7025 > > else None
00:05:20 verbose #7026 > > fun ex =>
00:05:20 verbose #7027 > > trace Warning
00:05:20 verbose #7028 > > fun () => "retry_fn"
00:05:20 verbose #7029 > > fun () => $'$"retry: {!retry} / ex: %A{!ex} / {!_locals
00:05:20 verbose #7030 > > ()}"'
00:05:20 verbose #7031 > > sleep 1
00:05:20 verbose #7032 > > None
00:05:20 verbose #7033 > > |> function
00:05:20 verbose #7034 > > | Some x => x
00:05:20 verbose #7035 > > | None => loop (retry + 1)
00:05:20 verbose #7036 > > loop 0
00:05:20 verbose #7037 > 00:05:19 debug #86 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2e2c64f741ecea63825c4e6e4cbcdfbbc0b7293d601c39dc7c6c655db2b3c334/main.spi
00:05:20 verbose #7038 > >
00:05:20 verbose #7039 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:20 verbose #7040 > > //// test
00:05:20 verbose #7041 > >
00:05:20 verbose #7042 > > inl retry_fn_test = mut 0i32
00:05:20 verbose #7043 > > fun () =>
00:05:20 verbose #7044 > > retry_fn_test <- *retry_fn_test + 1
00:05:20 verbose #7045 > > *retry_fn_test
00:05:20 verbose #7046 > > |> retry_fn 3i32
00:05:20 verbose #7047 > > |> _assert_eq (Some 1i32)
00:05:21 verbose #7048 > 00:05:20 debug #87 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6cbc3ae5a98e04f3b594d0969ae0bc2f93f820463ec1790338653207f7fb2a2a/main.spi
00:05:21 verbose #7049 > >
00:05:21 verbose #7050 > > ╭─[ 952.95ms - stdout ]────────────────────────────────────────────────────────╮
00:05:21 verbose #7051 > > │ assert_eq / actual: US0_0 1 / expected: US0_0 1 │
00:05:21 verbose #7052 > > │ │
00:05:21 verbose #7053 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:21 verbose #7054 > >
00:05:21 verbose #7055 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:21 verbose #7056 > > //// test
00:05:21 verbose #7057 > > ///! rust
00:05:21 verbose #7058 > >
00:05:21 verbose #7059 > > types ()
00:05:21 verbose #7060 > > inl retry_fn_test = mut 0i32
00:05:21 verbose #7061 > > fun () =>
00:05:21 verbose #7062 > > retry_fn_test <- *retry_fn_test + 1
00:05:21 verbose #7063 > > *retry_fn_test
00:05:21 verbose #7064 > > |> retry_fn 3i32
00:05:21 verbose #7065 > > |> _assert_eq' (Some 1i32)
00:05:22 verbose #7066 > 00:05:21 debug #88 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/873162f9ff6d6bf6e77b9b16f3b5f631d6038430e29c7da78424cfb4cc49459e/main.spi
00:05:26 verbose #7067 > >
00:05:26 verbose #7068 > > ╭─[ 4.45s - return value ]─────────────────────────────────────────────────────╮
00:05:26 verbose #7069 > > │ assert_eq' / actual: US0_0(1) / expected: US0_0(1) │
00:05:26 verbose #7070 > > │ │
00:05:26 verbose #7071 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:26 verbose #7072 > >
00:05:26 verbose #7073 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:26 verbose #7074 > > //// test
00:05:26 verbose #7075 > >
00:05:26 verbose #7076 > > inl retry_fn_test = mut 0i32
00:05:26 verbose #7077 > > fun () =>
00:05:26 verbose #7078 > > if *retry_fn_test >= 2
00:05:26 verbose #7079 > > then *retry_fn_test
00:05:26 verbose #7080 > > else
00:05:26 verbose #7081 > > retry_fn_test <- *retry_fn_test + 1
00:05:26 verbose #7082 > > failwith "test"
00:05:26 verbose #7083 > > |> retry_fn 3i32
00:05:26 verbose #7084 > > |> _assert_eq (Some 2i32)
00:05:26 verbose #7085 > 00:05:25 debug #89 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/60f72242a7cbc88329d3396e7b967f2842eb7d7f2da7a113f1b48b20a405ba60/main.spi
00:05:27 verbose #7086 > >
00:05:27 verbose #7087 > > ╭─[ 888.82ms - stdout ]────────────────────────────────────────────────────────╮
00:05:27 verbose #7088 > > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: System.Exception: test │
00:05:27 verbose #7089 > > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │
00:05:27 verbose #7090 > > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │
00:05:27 verbose #7091 > > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: System.Exception: test │
00:05:27 verbose #7092 > > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │
00:05:27 verbose #7093 > > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │
00:05:27 verbose #7094 > > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │
00:05:27 verbose #7095 > > │ │
00:05:27 verbose #7096 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:27 verbose #7097 > >
00:05:27 verbose #7098 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:27 verbose #7099 > > //// test
00:05:27 verbose #7100 > > ///! rust
00:05:27 verbose #7101 > >
00:05:27 verbose #7102 > > types ()
00:05:27 verbose #7103 > > inl retry_fn_test = mut 0i32
00:05:27 verbose #7104 > > fun () =>
00:05:27 verbose #7105 > > if *retry_fn_test >= 2
00:05:27 verbose #7106 > > then *retry_fn_test
00:05:27 verbose #7107 > > else
00:05:27 verbose #7108 > > retry_fn_test <- *retry_fn_test + 1
00:05:27 verbose #7109 > > failwith "test"
00:05:27 verbose #7110 > > |> retry_fn 3i32
00:05:27 verbose #7111 > > |> _assert_eq' (Some 2i32)
00:05:27 verbose #7112 > 00:05:26 debug #90 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2f3cf6218122e3e4c788a0405333527d475e5cac75f38709b6de82abd528c6e6/main.spi
00:05:31 verbose #7113 > >
00:05:31 verbose #7114 > > ╭─[ 4.53s - return value ]─────────────────────────────────────────────────────╮
00:05:31 verbose #7115 > > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: Exception { message: │
00:05:31 verbose #7116 > > │ "test" } │
00:05:31 verbose #7117 > > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: Exception { message: │
00:05:31 verbose #7118 > > │ "test" } │
00:05:31 verbose #7119 > > │ assert_eq' / actual: US0_0(2) / expected: US0_0(2) │
00:05:31 verbose #7120 > > │ │
00:05:31 verbose #7121 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:31 verbose #7122 > >
00:05:31 verbose #7123 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:31 verbose #7124 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:31 verbose #7125 > > │ ## main │
00:05:31 verbose #7126 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:31 verbose #7127 > >
00:05:31 verbose #7128 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:31 verbose #7129 > > inl main () =
00:05:31 verbose #7130 > > types ()
00:05:31 verbose #7131 > > init_trace_state None
00:05:31 verbose #7132 > > inl new_disposable x : _ () = new_disposable x
00:05:31 verbose #7133 > > $'let new_disposable x = !new_disposable x' : ()
00:05:31 verbose #7134 > >
00:05:31 verbose #7135 > > inl retry_fn (r : i32) (x : () -> _) : optionm'.option' () = retry_fn r x |>
00:05:31 verbose #7136 > > optionm'.box
00:05:31 verbose #7137 > > $'let retry_fn x = !retry_fn x' : ()
00:05:31 verbose #7138 > > inl memoize (fn : () -> ()) : () -> () = memoize fn
00:05:31 verbose #7139 > > $'let memoize x = !memoize x' : ()
00:05:32 verbose #7140 > 00:05:30 debug #91 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/52374904670c6410c28fcbcbafd298ee4aa95641a5814c72b03fa93a6909565f/main.spi
00:05:32 verbose #7141 > 00:00:38 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 21255
00:05:32 verbose #7142 > 00:00:38 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/common.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:05:34 verbose #7143 > 00:00:40 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/common.dib.ipynb to html
00:05:34 verbose #7144 > 00:00:40 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:05:34 verbose #7145 > 00:00:40 verbose #7 ! validate(nb)
00:05:36 verbose #7146 > 00:00:41 verbose #8 ! [NbConvertApp] Writing 334613 bytes to c:\home\git\polyglot\lib\spiral\common.dib.html
00:05:36 verbose #7147 > 00:00:42 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643
00:05:36 verbose #7148 > 00:00:42 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643
00:05:36 verbose #7149 > 00:00:42 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:05:37 verbose #7150 > 00:00:42 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:05:37 verbose #7151 > 00:00:42 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:05:37 verbose #7152 > 00:00:43 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 21957
00:05:37 debug #7153 execute_with_options_async / exit_code: 0 / output.Length: 25180
00:05:37 debug #12 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path common.dib --retries 3
00:05:37 debug #7154 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path resultm.dib --retries 3",
[||], None, None, true, None)
00:05:37 verbose #7155 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "resultm.dib", "--retries", "3"])
00:05:37 verbose #7156 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/resultm.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/resultm.dib" --output-path "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:05:39 verbose #7157 > >
00:05:39 verbose #7158 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:39 verbose #7159 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:39 verbose #7160 > > │ # resultm │
00:05:39 verbose #7161 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:39 verbose #7162 > >
00:05:39 verbose #7163 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:39 verbose #7164 > > open rust_operators
00:05:39 verbose #7165 > >
00:05:39 verbose #7166 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:05:39 verbose #7167 > > #r
00:05:39 verbose #7168 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:39 verbose #7169 > > otNet.Interactive.Spiral.dll"
00:05:39 verbose #7170 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:05:39 verbose #7171 > > #r
00:05:39 verbose #7172 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:39 verbose #7173 > > otNet.Interactive.dll"
00:05:39 verbose #7174 > > open type Microsoft.DotNet.Interactive.Kernel
00:05:44 verbose #7175 > >
00:05:44 verbose #7176 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7177 > > //// test
00:05:44 verbose #7178 > >
00:05:44 verbose #7179 > > open testing
00:05:44 verbose #7180 > >
00:05:44 verbose #7181 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7182 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7183 > > │ ## result' │
00:05:44 verbose #7184 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7185 > >
00:05:44 verbose #7186 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7187 > > nominal result' t u = $'Result<`t, `u>'
00:05:44 verbose #7188 > >
00:05:44 verbose #7189 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7190 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7191 > > │ ## from_option_error │
00:05:44 verbose #7192 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7193 > >
00:05:44 verbose #7194 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7195 > > inl from_option_error error opt =
00:05:44 verbose #7196 > > match opt with
00:05:44 verbose #7197 > > | Some x => Ok x
00:05:44 verbose #7198 > > | None => Error error
00:05:44 verbose #7199 > >
00:05:44 verbose #7200 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7201 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7202 > > │ ## from_option │
00:05:44 verbose #7203 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7204 > >
00:05:44 verbose #7205 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7206 > > inl from_option opt =
00:05:44 verbose #7207 > > opt |> from_option_error "resultm.from_option / Option does not have a
00:05:44 verbose #7208 > > value."
00:05:44 verbose #7209 > >
00:05:44 verbose #7210 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7211 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7212 > > │ ## flatten_option │
00:05:44 verbose #7213 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7214 > >
00:05:44 verbose #7215 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7216 > > inl flatten_option forall t u. (x : option (result (option t) u)) : result
00:05:44 verbose #7217 > > (option t) u =
00:05:44 verbose #7218 > > match x with
00:05:44 verbose #7219 > > | Some (Error x) => Error x
00:05:44 verbose #7220 > > | Some (Ok (Some x)) => Ok (Some x)
00:05:44 verbose #7221 > > | _ => Ok None
00:05:44 verbose #7222 > >
00:05:44 verbose #7223 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7224 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7225 > > │ ## flatten │
00:05:44 verbose #7226 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7227 > >
00:05:44 verbose #7228 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7229 > > inl flatten forall t u. (x : result (result t u) u) : result t u =
00:05:44 verbose #7230 > > match x with
00:05:44 verbose #7231 > > | Ok x => x
00:05:44 verbose #7232 > > | Error x => Error x
00:05:44 verbose #7233 > >
00:05:44 verbose #7234 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7235 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7236 > > │ ## try' │
00:05:44 verbose #7237 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7238 > >
00:05:44 verbose #7239 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7240 > > inl try' forall t u. (x : result' t u) : t =
00:05:44 verbose #7241 > > !\\(x, $'"$0?"')
00:05:44 verbose #7242 > >
00:05:44 verbose #7243 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7244 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7245 > > │ ## to_try │
00:05:44 verbose #7246 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7247 > >
00:05:44 verbose #7248 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7249 > > inl to_try forall t u. (x : result' t u) : rust.try t =
00:05:44 verbose #7250 > > !\\(x, $'"$0"')
00:05:44 verbose #7251 > >
00:05:44 verbose #7252 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7253 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7254 > > │ ## unwrap' │
00:05:44 verbose #7255 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7256 > >
00:05:44 verbose #7257 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7258 > > inl unwrap' forall t u. (x : result' t u) : t =
00:05:44 verbose #7259 > > !\\(x, $'"$0.unwrap()"')
00:05:44 verbose #7260 > >
00:05:44 verbose #7261 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7262 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7263 > > │ ## get │
00:05:44 verbose #7264 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7265 > >
00:05:44 verbose #7266 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7267 > > inl get forall t e. (source : result t e) : t =
00:05:44 verbose #7268 > > match source with
00:05:44 verbose #7269 > > | Ok x => x
00:05:44 verbose #7270 > > | Error x => failwith $'$"resultm.get / Result value was Error: {!x}"'
00:05:44 verbose #7271 > >
00:05:44 verbose #7272 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7273 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7274 > > │ ## unbox │
00:05:44 verbose #7275 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7276 > >
00:05:44 verbose #7277 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7278 > > inl unbox forall t u. (x : result' t u) : result t u =
00:05:44 verbose #7279 > > inl ok x : result t u = Ok x
00:05:44 verbose #7280 > > inl error x : result t u = Error x
00:05:44 verbose #7281 > > real
00:05:44 verbose #7282 > > typecase t with
00:05:44 verbose #7283 > > | () => $'match !x with Ok () -> !ok () | Error x -> !error x' : result
00:05:44 verbose #7284 > > t u
00:05:44 verbose #7285 > > | _ => $'match !x with Ok x -> !ok x | Error x -> !error x' : result t u
00:05:44 verbose #7286 > >
00:05:44 verbose #7287 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7288 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7289 > > │ ## unbox' │
00:05:44 verbose #7290 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7291 > >
00:05:44 verbose #7292 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7293 > > inl unbox' forall t u. (x : result' t u) : result t u =
00:05:44 verbose #7294 > > inl ok x : result t u = Ok x
00:05:44 verbose #7295 > > inl ok = join ok
00:05:44 verbose #7296 > > inl error x : result t u = Error x
00:05:44 verbose #7297 > > inl error = join error
00:05:44 verbose #7298 > > real
00:05:44 verbose #7299 > > typecase t with
00:05:44 verbose #7300 > > | () =>
00:05:44 verbose #7301 > > (~!\\)
00:05:44 verbose #7302 > > `((result' t u -> result t u) * (result' t u -> result t u))
00:05:44 verbose #7303 > > `(result t u)
00:05:44 verbose #7304 > > ((ok, error), ($'"match !x { Ok(()) => $0(()), Err(e) => $1(e)
00:05:44 verbose #7305 > > }"' : string))
00:05:44 verbose #7306 > > | _ =>
00:05:44 verbose #7307 > > (~!\\)
00:05:44 verbose #7308 > > `((result' t u -> result t u) * (result' t u -> result t u))
00:05:44 verbose #7309 > > `(result t u)
00:05:44 verbose #7310 > > ((ok, error), ($'"match !x { Ok(x) => $0(x), Err(e) => $1(e) }"'
00:05:44 verbose #7311 > > : string))
00:05:44 verbose #7312 > >
00:05:44 verbose #7313 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7314 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7315 > > │ ## box │
00:05:44 verbose #7316 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7317 > >
00:05:44 verbose #7318 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7319 > > inl box forall t u. (x : result t u) : result' t u =
00:05:44 verbose #7320 > > match x with
00:05:44 verbose #7321 > > | Ok x => $'Ok !x '
00:05:44 verbose #7322 > > | Error err => $'Error !err '
00:05:44 verbose #7323 > >
00:05:44 verbose #7324 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7325 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7326 > > │ ## map │
00:05:44 verbose #7327 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7328 > >
00:05:44 verbose #7329 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7330 > > inl map forall t e u. (fn : t -> u) (source : result t e) : result u e =
00:05:44 verbose #7331 > > match source with
00:05:44 verbose #7332 > > | Ok x => x |> fn |> Ok
00:05:44 verbose #7333 > > | Error x => Error x
00:05:44 verbose #7334 > >
00:05:44 verbose #7335 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7336 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7337 > > │ ## map_error │
00:05:44 verbose #7338 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7339 > >
00:05:44 verbose #7340 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7341 > > inl map_error forall t e u. (fn : e -> u) (source : result t e) : result t u =
00:05:44 verbose #7342 > > match source with
00:05:44 verbose #7343 > > | Ok x => Ok x
00:05:44 verbose #7344 > > | Error x => x |> fn |> Error
00:05:44 verbose #7345 > >
00:05:44 verbose #7346 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7347 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7348 > > │ ## map' │
00:05:44 verbose #7349 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7350 > >
00:05:44 verbose #7351 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7352 > > inl map' forall t e u. (fn : t -> u) (source : result' t e) : result' u e =
00:05:44 verbose #7353 > > (!\\(source, $'"true; let _result = $0.map(|x| { //"') : bool) |> ignore
00:05:44 verbose #7354 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:05:44 verbose #7355 > > !\($'"_result"')
00:05:44 verbose #7356 > >
00:05:44 verbose #7357 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7358 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7359 > > │ ## map'' │
00:05:44 verbose #7360 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7361 > >
00:05:44 verbose #7362 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7363 > > inl map'' forall t e u. (fn : t -> u) (source : result' t e) : result' u e =
00:05:44 verbose #7364 > > inl fn = join fn
00:05:44 verbose #7365 > > inl source = join source
00:05:44 verbose #7366 > > !\($'"!source.map(|x| !fn(x))"')
00:05:44 verbose #7367 > >
00:05:44 verbose #7368 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7369 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7370 > > │ ## map_error' │
00:05:44 verbose #7371 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7372 > >
00:05:44 verbose #7373 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7374 > > inl map_error' forall t e u. (fn : e -> u) (source : result' t e) : result' t u
00:05:44 verbose #7375 > > =
00:05:44 verbose #7376 > > inl fn = join fn
00:05:44 verbose #7377 > > !\\((source, fn), $'"$0.map_err(|x| $1(x))"')
00:05:44 verbose #7378 > >
00:05:44 verbose #7379 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7380 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7381 > > │ ## map_error'' │
00:05:44 verbose #7382 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7383 > >
00:05:44 verbose #7384 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7385 > > inl map_error'' forall t e u. (fn : e -> u) (source : result' t e) : result' t u
00:05:44 verbose #7386 > > =
00:05:44 verbose #7387 > > (!\\(source, $'"true; let _result = $0.map_err(|x| { //"') : bool) |> ignore
00:05:44 verbose #7388 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:05:44 verbose #7389 > > !\($'"_result"')
00:05:44 verbose #7390 > >
00:05:44 verbose #7391 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7392 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7393 > > │ ## option_ok_or │
00:05:44 verbose #7394 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7395 > >
00:05:44 verbose #7396 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7397 > > inl option_ok_or forall t e. (e : e) (source : optionm'.option' t) : result' t e
00:05:44 verbose #7398 > > =
00:05:44 verbose #7399 > > !\\(source, $'"$0.ok_or(!e)"')
00:05:44 verbose #7400 > >
00:05:44 verbose #7401 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7402 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7403 > > │ ## as_ref │
00:05:44 verbose #7404 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7405 > >
00:05:44 verbose #7406 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7407 > > inl as_ref forall t e. (source : result' t e) : result' (rust.ref' t) (rust.ref'
00:05:44 verbose #7408 > > e) =
00:05:44 verbose #7409 > > !\($'"!source.as_ref()"')
00:05:44 verbose #7410 > >
00:05:44 verbose #7411 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7412 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7413 > > │ ## as_ref' │
00:05:44 verbose #7414 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7415 > >
00:05:44 verbose #7416 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7417 > > inl as_ref' forall t e. (source : rust.ref' (result' t e)) : result' (rust.ref'
00:05:44 verbose #7418 > > t) (rust.ref' e) =
00:05:44 verbose #7419 > > !\($'"!source.as_ref()"')
00:05:44 verbose #7420 > >
00:05:44 verbose #7421 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7422 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7423 > > │ ## unwrap_or' │
00:05:44 verbose #7424 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7425 > >
00:05:44 verbose #7426 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7427 > > inl unwrap_or' forall t u. (default : t) (x : result' t u) : t =
00:05:44 verbose #7428 > > !\\((x, default), $'"$0.unwrap_or($1)"')
00:05:44 verbose #7429 > >
00:05:44 verbose #7430 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7431 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7432 > > │ ## expect │
00:05:44 verbose #7433 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7434 > >
00:05:44 verbose #7435 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7436 > > inl expect forall t u. (error : rust.ref' string) (x : result' t u) : t =
00:05:44 verbose #7437 > > !\($'"!x.expect(&!error)"')
00:05:44 verbose #7438 > >
00:05:44 verbose #7439 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7440 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7441 > > │ ## ok' │
00:05:44 verbose #7442 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7443 > >
00:05:44 verbose #7444 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7445 > > inl ok' forall t. (x : result' t _) : optionm'.option' t =
00:05:44 verbose #7446 > > !\($'"!x.ok()"')
00:05:44 verbose #7447 > >
00:05:44 verbose #7448 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7449 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7450 > > │ ## ok │
00:05:44 verbose #7451 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7452 > >
00:05:44 verbose #7453 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7454 > > inl ok forall t. (x : result t _) : option t =
00:05:44 verbose #7455 > > match x with
00:05:44 verbose #7456 > > | Ok x => Some x
00:05:44 verbose #7457 > > | Error _ => None
00:05:44 verbose #7458 > >
00:05:44 verbose #7459 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7460 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7461 > > │ ## transpose │
00:05:44 verbose #7462 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7463 > >
00:05:44 verbose #7464 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7465 > > inl transpose forall t u. (x : optionm'.option' (result' t u)) : result'
00:05:44 verbose #7466 > > (optionm'.option' t) u =
00:05:44 verbose #7467 > > !\\(x, $'"$0.transpose()"')
00:05:44 verbose #7468 > >
00:05:44 verbose #7469 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:44 verbose #7470 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:44 verbose #7471 > > │ ## rc_try_unwrap │
00:05:44 verbose #7472 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:44 verbose #7473 > >
00:05:44 verbose #7474 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7475 > > inl rc_try_unwrap forall t. (x : rust.rc t) : result' t (rust.rc t) =
00:05:44 verbose #7476 > > !\\(x, $'"std::rc::Rc::try_unwrap($0)"')
00:05:44 verbose #7477 > >
00:05:44 verbose #7478 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:44 verbose #7479 > > //// test
00:05:44 verbose #7480 > > ///! rust
00:05:44 verbose #7481 > >
00:05:44 verbose #7482 > > types ()
00:05:44 verbose #7483 > > rust.new_rc true
00:05:44 verbose #7484 > > |> rc_try_unwrap
00:05:44 verbose #7485 > > |> unbox
00:05:44 verbose #7486 > > |> _assert_eq (Ok true)
00:05:48 verbose #7487 > >
00:05:48 verbose #7488 > > ╭─[ 3.72s - return value ]─────────────────────────────────────────────────────╮
00:05:48 verbose #7489 > > │ assert_eq / actual: US0_0(true) / expected: US0_0(true) │
00:05:48 verbose #7490 > > │ │
00:05:48 verbose #7491 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:48 verbose #7492 > 00:00:11 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 16632
00:05:48 verbose #7493 > 00:00:11 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:05:50 verbose #7494 > 00:00:13 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb to html
00:05:50 verbose #7495 > 00:00:13 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:05:50 verbose #7496 > 00:00:13 verbose #7 ! validate(nb)
00:05:52 verbose #7497 > 00:00:14 verbose #8 ! [NbConvertApp] Writing 325696 bytes to c:\home\git\polyglot\lib\spiral\resultm.dib.html
00:05:52 verbose #7498 > 00:00:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645
00:05:52 verbose #7499 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645
00:05:52 verbose #7500 > 00:00:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:05:53 verbose #7501 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:05:53 verbose #7502 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:05:53 verbose #7503 > 00:00:16 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 17336
00:05:53 debug #7504 execute_with_options_async / exit_code: 0 / output.Length: 20244
00:05:53 debug #13 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path resultm.dib --retries 3
00:05:53 debug #7505 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path console.dib --retries 3",
[||], None, None, true, None)
00:05:53 verbose #7506 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "console.dib", "--retries", "3"])
00:05:53 verbose #7507 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/console.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/console.dib" --output-path "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:05:55 verbose #7508 > >
00:05:55 verbose #7509 > > ── markdown ────────────────────────────────────────────────────────────────────
00:05:55 verbose #7510 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:55 verbose #7511 > > │ # console │
00:05:55 verbose #7512 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:55 verbose #7513 > >
00:05:55 verbose #7514 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:55 verbose #7515 > > //// test
00:05:55 verbose #7516 > >
00:05:55 verbose #7517 > > open testing
00:05:55 verbose #7518 > >
00:05:55 verbose #7519 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:05:55 verbose #7520 > > #r
00:05:55 verbose #7521 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:55 verbose #7522 > > otNet.Interactive.Spiral.dll"
00:05:55 verbose #7523 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:05:55 verbose #7524 > > #r
00:05:55 verbose #7525 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:55 verbose #7526 > > otNet.Interactive.dll"
00:05:55 verbose #7527 > > open type Microsoft.DotNet.Interactive.Kernel
00:06:00 verbose #7528 > >
00:06:00 verbose #7529 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:00 verbose #7530 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:00 verbose #7531 > > │ ## write_line │
00:06:00 verbose #7532 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:00 verbose #7533 > >
00:06:00 verbose #7534 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:00 verbose #7535 > > inl write_line obj : () =
00:06:00 verbose #7536 > > obj |> $'System.Console.WriteLine'
00:06:00 verbose #7537 > >
00:06:00 verbose #7538 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:00 verbose #7539 > > inl write_line_ ~obj : () =
00:06:00 verbose #7540 > > obj |> $'System.Console.WriteLine'
00:06:00 verbose #7541 > >
00:06:00 verbose #7542 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:00 verbose #7543 > > nominal console_color = $'System.ConsoleColor'
00:06:00 verbose #7544 > >
00:06:00 verbose #7545 > > inl reset_color () : () =
00:06:00 verbose #7546 > > run_target function
00:06:00 verbose #7547 > > | Fsharp => fun () => $'System.Console.ResetColor' ()
00:06:00 verbose #7548 > > | _ => fun () => ()
00:06:00 verbose #7549 > >
00:06:00 verbose #7550 > > inl set_foreground_color (color : console_color) : () =
00:06:00 verbose #7551 > > run_target function
00:06:00 verbose #7552 > > | Fsharp => fun () => $'System.Console.ForegroundColor <- !color '
00:06:00 verbose #7553 > > | _ => fun () => ()
00:06:00 verbose #7554 > 00:00:06 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 1917
00:06:00 verbose #7555 > 00:00:06 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/console.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:06:02 verbose #7556 > 00:00:08 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/console.dib.ipynb to html
00:06:02 verbose #7557 > 00:00:08 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:06:02 verbose #7558 > 00:00:08 verbose #7 ! validate(nb)
00:06:03 verbose #7559 > 00:00:09 verbose #8 ! [NbConvertApp] Writing 275551 bytes to c:\home\git\polyglot\lib\spiral\console.dib.html
00:06:03 verbose #7560 > 00:00:09 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645
00:06:03 verbose #7561 > 00:00:09 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645
00:06:03 verbose #7562 > 00:00:09 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:06:04 verbose #7563 > 00:00:10 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:06:04 verbose #7564 > 00:00:10 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:06:05 verbose #7565 > 00:00:11 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 2621
00:06:05 debug #7566 execute_with_options_async / exit_code: 0 / output.Length: 4949
00:06:05 debug #14 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path console.dib --retries 3
00:06:05 debug #7567 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path date_time.dib --retries 3",
[||], None, None, true, None)
00:06:05 verbose #7568 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "date_time.dib", "--retries", "3"])
00:06:05 verbose #7569 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/date_time.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/date_time.dib" --output-path "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:06:07 verbose #7570 > >
00:06:07 verbose #7571 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:07 verbose #7572 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:07 verbose #7573 > > │ # date_time │
00:06:07 verbose #7574 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:07 verbose #7575 > >
00:06:07 verbose #7576 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:07 verbose #7577 > > open rust_operators
00:06:07 verbose #7578 > > open sm'_operators
00:06:07 verbose #7579 > >
00:06:07 verbose #7580 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:06:07 verbose #7581 > > #r
00:06:07 verbose #7582 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:06:07 verbose #7583 > > otNet.Interactive.Spiral.dll"
00:06:07 verbose #7584 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:06:07 verbose #7585 > > #r
00:06:07 verbose #7586 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:06:07 verbose #7587 > > otNet.Interactive.dll"
00:06:07 verbose #7588 > > open type Microsoft.DotNet.Interactive.Kernel
00:06:11 verbose #7589 > >
00:06:11 verbose #7590 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7591 > > //// test
00:06:11 verbose #7592 > >
00:06:11 verbose #7593 > > open testing
00:06:11 verbose #7594 > >
00:06:11 verbose #7595 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7596 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7597 > > │ ## types │
00:06:11 verbose #7598 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7599 > >
00:06:11 verbose #7600 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7601 > > inl types () =
00:06:11 verbose #7602 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:06:11 verbose #7603 > > Fable.Core.Emit(\"chrono::DateTime<$0>\")>]]\n#endif\ntype chrono_DateTime<'T> =
00:06:11 verbose #7604 > > class end"
00:06:11 verbose #7605 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:06:11 verbose #7606 > > Fable.Core.Emit(\"chrono::Local\")>]]\n#endif\ntype chrono_Local = class end"
00:06:11 verbose #7607 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:06:11 verbose #7608 > > Fable.Core.Emit(\"chrono::NaiveDateTime\")>]]\n#endif\ntype chrono_NaiveDateTime
00:06:11 verbose #7609 > > = class end"
00:06:11 verbose #7610 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:06:11 verbose #7611 > > Fable.Core.Emit(\"chrono::Utc\")>]]\n#endif\ntype chrono_Utc = class end"
00:06:11 verbose #7612 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:06:11 verbose #7613 > > Fable.Core.Emit(\"std::time::Duration\")>]]\n#endif\ntype std_time_Duration =
00:06:11 verbose #7614 > > class end"
00:06:11 verbose #7615 > >
00:06:11 verbose #7616 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7617 > > inl types () =
00:06:11 verbose #7618 > > sm'.types ()
00:06:11 verbose #7619 > > types ()
00:06:11 verbose #7620 > >
00:06:11 verbose #7621 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7622 > > nominal timestamp = i64
00:06:11 verbose #7623 > > nominal duration = $'std_time_Duration'
00:06:11 verbose #7624 > > nominal date_time = $'System.DateTime'
00:06:11 verbose #7625 > > nominal date_time' t = $'chrono_DateTime<`t>'
00:06:11 verbose #7626 > > nominal local = $'chrono_Local'
00:06:11 verbose #7627 > > nominal naive_date_time = $'chrono_NaiveDateTime'
00:06:11 verbose #7628 > > nominal utc = $'chrono_Utc'
00:06:11 verbose #7629 > >
00:06:11 verbose #7630 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7631 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7632 > > │ ## date_time_milliseconds │
00:06:11 verbose #7633 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7634 > >
00:06:11 verbose #7635 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7636 > > inl date_time_milliseconds
00:06:11 verbose #7637 > > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second :
00:06:11 verbose #7638 > > int) (millisecond : int)
00:06:11 verbose #7639 > > : date_time
00:06:11 verbose #7640 > > =
00:06:11 verbose #7641 > > $'System.DateTime (!year, !month, !day, !hour, !minute, !second,
00:06:11 verbose #7642 > > !millisecond)'
00:06:11 verbose #7643 > >
00:06:11 verbose #7644 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7645 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7646 > > │ ## date_time_utc │
00:06:11 verbose #7647 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7648 > >
00:06:11 verbose #7649 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7650 > > inl date_time_utc
00:06:11 verbose #7651 > > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second :
00:06:11 verbose #7652 > > int)
00:06:11 verbose #7653 > > : date_time
00:06:11 verbose #7654 > > =
00:06:11 verbose #7655 > > $'System.DateTime (!year, !month, !day, !hour, !minute, !second,
00:06:11 verbose #7656 > > System.DateTimeKind.Utc)'
00:06:11 verbose #7657 > >
00:06:11 verbose #7658 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7659 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7660 > > │ ## naive_utc │
00:06:11 verbose #7661 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7662 > >
00:06:11 verbose #7663 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7664 > > inl naive_utc (date_time : date_time' utc) : naive_date_time =
00:06:11 verbose #7665 > > inl date_time = join date_time
00:06:11 verbose #7666 > > !\($'"!date_time.naive_utc()"')
00:06:11 verbose #7667 > >
00:06:11 verbose #7668 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7669 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7670 > > │ ## to_local │
00:06:11 verbose #7671 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7672 > >
00:06:11 verbose #7673 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7674 > > inl to_local (date_time : date_time' utc) : date_time' local =
00:06:11 verbose #7675 > > inl naive_date_time = date_time |> naive_utc
00:06:11 verbose #7676 > > !\($'"chrono::offset::TimeZone::from_utc_datetime(&chrono::Local,
00:06:11 verbose #7677 > > &!naive_date_time)"')
00:06:11 verbose #7678 > >
00:06:11 verbose #7679 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7680 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7681 > > │ ## from_timestamp_micros │
00:06:11 verbose #7682 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7683 > >
00:06:11 verbose #7684 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7685 > > inl from_timestamp_micros forall t {number; int}. (timestamp : t) : option
00:06:11 verbose #7686 > > (date_time' utc) =
00:06:11 verbose #7687 > > inl result : optionm'.option' (date_time' utc) =
00:06:11 verbose #7688 > > !\\(timestamp, $'"chrono::DateTime::from_timestamp_micros($0)"')
00:06:11 verbose #7689 > > result |> optionm'.unbox
00:06:11 verbose #7690 > >
00:06:11 verbose #7691 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7692 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7693 > > │ ## ticks │
00:06:11 verbose #7694 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7695 > >
00:06:11 verbose #7696 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7697 > > inl ticks (date_time : date_time) : timestamp =
00:06:11 verbose #7698 > > date_time |> $'_.Ticks'
00:06:11 verbose #7699 > >
00:06:11 verbose #7700 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7701 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7702 > > │ ## format │
00:06:11 verbose #7703 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7704 > >
00:06:11 verbose #7705 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7706 > > inl format (format : string) (date_time : date_time) : string =
00:06:11 verbose #7707 > > $'!date_time.ToString' format
00:06:11 verbose #7708 > >
00:06:11 verbose #7709 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7710 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7711 > > │ ## format_iso8601 │
00:06:11 verbose #7712 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7713 > >
00:06:11 verbose #7714 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7715 > > inl format_iso8601 (date_time : date_time) =
00:06:11 verbose #7716 > > date_time |> format "yyyy-MM-ddTHH-mm-ss.fff"
00:06:11 verbose #7717 > >
00:06:11 verbose #7718 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7719 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7720 > > │ ## format' │
00:06:11 verbose #7721 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7722 > >
00:06:11 verbose #7723 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7724 > > inl format' (format : string) (date_time : date_time' utc) : sm'.std_string =
00:06:11 verbose #7725 > > inl format = #format
00:06:11 verbose #7726 > > inl date_time = join date_time
00:06:11 verbose #7727 > > !\($'"!date_time.format(!format).to_string()"')
00:06:11 verbose #7728 > >
00:06:11 verbose #7729 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7730 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7731 > > │ ## format'' │
00:06:11 verbose #7732 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7733 > >
00:06:11 verbose #7734 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7735 > > inl format'' (format : string) (date_time : date_time' _) : sm'.std_string =
00:06:11 verbose #7736 > > inl format = #format
00:06:11 verbose #7737 > > inl date_time = join date_time
00:06:11 verbose #7738 > > !\($'"!date_time.format(!format).to_string()"')
00:06:11 verbose #7739 > >
00:06:11 verbose #7740 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7741 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7742 > > │ ## format_timestamp │
00:06:11 verbose #7743 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7744 > >
00:06:11 verbose #7745 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7746 > > inl format_timestamp forall t {number; int}. (timestamp : t) =
00:06:11 verbose #7747 > > inl timestamp = join timestamp
00:06:11 verbose #7748 > > (timestamp / 1000)
00:06:11 verbose #7749 > > |> from_timestamp_micros
00:06:11 verbose #7750 > > |> optionm.map fun x =>
00:06:11 verbose #7751 > > x
00:06:11 verbose #7752 > > |> to_local
00:06:11 verbose #7753 > > |> format'' "%Y-%m-%d %H:%M:%S"
00:06:11 verbose #7754 > > |> sm'.from_std_string
00:06:11 verbose #7755 > > |> resultm.from_option
00:06:11 verbose #7756 > >
00:06:11 verbose #7757 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:11 verbose #7758 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:11 verbose #7759 > > │ ## duration_from_millis │
00:06:11 verbose #7760 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:11 verbose #7761 > >
00:06:11 verbose #7762 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:11 verbose #7763 > > inl duration_from_millis (ms : u64) : duration =
00:06:11 verbose #7764 > > inl ms = join ms
00:06:11 verbose #7765 > > !\($'"std::time::Duration::from_millis(!ms)"')
00:06:12 verbose #7766 > 00:06:11 debug #92 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d0e1b515d5017c7d0cf2d224ea9eb52cbc32c3c48f5081338f6780cdc07bf58/main.spi
00:06:12 verbose #7767 > >
00:06:12 verbose #7768 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:12 verbose #7769 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:12 verbose #7770 > > │ ## min_value │
00:06:12 verbose #7771 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:12 verbose #7772 > >
00:06:12 verbose #7773 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:12 verbose #7774 > > inl min_value () : date_time =
00:06:12 verbose #7775 > > $'System.DateTime.MinValue'
00:06:13 verbose #7776 > 00:06:12 debug #93 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f1e21fd8d671c56c1eb5956c8daa965ed3ceef10cdbe57b8592bc4d269bd2230/main.spi
00:06:13 verbose #7777 > >
00:06:13 verbose #7778 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:13 verbose #7779 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:13 verbose #7780 > > │ ## max_value │
00:06:13 verbose #7781 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:13 verbose #7782 > >
00:06:13 verbose #7783 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:13 verbose #7784 > > inl max_value () : date_time =
00:06:13 verbose #7785 > > $'System.DateTime.MaxValue'
00:06:13 verbose #7786 > 00:06:12 debug #94 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/63c13c3a5b18675cb75e176b2fbeb2a820d2ffc064b336e8ff747d6aa661e74a/main.spi
00:06:14 verbose #7787 > >
00:06:14 verbose #7788 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:14 verbose #7789 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:14 verbose #7790 > > │ ## unix_epoch │
00:06:14 verbose #7791 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:14 verbose #7792 > >
00:06:14 verbose #7793 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:14 verbose #7794 > > inl unix_epoch () : date_time =
00:06:14 verbose #7795 > > $'System.DateTime.UnixEpoch'
00:06:14 verbose #7796 > 00:06:13 debug #95 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/78940413545f0dfeb4f360200532cf77c3012def3a771749c772237dc8b3efcb/main.spi
00:06:14 verbose #7797 > >
00:06:14 verbose #7798 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:14 verbose #7799 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:14 verbose #7800 > > │ ## to_universal_time │
00:06:14 verbose #7801 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:14 verbose #7802 > >
00:06:14 verbose #7803 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:14 verbose #7804 > > inl to_universal_time (date_time : date_time) : date_time =
00:06:14 verbose #7805 > > date_time |> $'_.ToUniversalTime()'
00:06:15 verbose #7806 > 00:06:14 debug #96 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/45ab7803260e41e0023c9b73745bbbf8cf0a6c2c6b2897ce52a4306fcfc166ca/main.spi
00:06:15 verbose #7807 > >
00:06:15 verbose #7808 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:15 verbose #7809 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:15 verbose #7810 > > │ ## date_time_kind │
00:06:15 verbose #7811 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:15 verbose #7812 > >
00:06:15 verbose #7813 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:15 verbose #7814 > > union date_time_kind =
00:06:15 verbose #7815 > > | Unspecified
00:06:15 verbose #7816 > > | Utc
00:06:15 verbose #7817 > > | Local
00:06:15 verbose #7818 > 00:06:14 debug #97 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0386da20289edbc7dfca5523d36068f277dfb5429a3e63f99ea860e9ebebd2e7/main.spi
00:06:16 verbose #7819 > >
00:06:16 verbose #7820 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:16 verbose #7821 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:16 verbose #7822 > > │ ## specify_date_kind │
00:06:16 verbose #7823 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:16 verbose #7824 > >
00:06:16 verbose #7825 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:16 verbose #7826 > > inl specify_date_kind (kind : date_time_kind) (date_time : date_time) :
00:06:16 verbose #7827 > > date_time =
00:06:16 verbose #7828 > > inl kind : $'System.DateTimeKind' =
00:06:16 verbose #7829 > > match kind with
00:06:16 verbose #7830 > > | Unspecified => $'System.DateTimeKind.Unspecified'
00:06:16 verbose #7831 > > | Utc => $'System.DateTimeKind.Utc'
00:06:16 verbose #7832 > > | Local => $'System.DateTimeKind.Local'
00:06:16 verbose #7833 > > $'System.DateTime.SpecifyKind (!date_time, !kind)'
00:06:16 verbose #7834 > 00:06:15 debug #98 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/398d5aec7196cfe18bf0986409ef928a1b682b3dd19cde03fdff16e7629a8bae/main.spi
00:06:16 verbose #7835 > >
00:06:16 verbose #7836 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:16 verbose #7837 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:16 verbose #7838 > > │ ## time_span │
00:06:16 verbose #7839 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:16 verbose #7840 > >
00:06:16 verbose #7841 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:16 verbose #7842 > > nominal time_span = $'System.TimeSpan'
00:06:16 verbose #7843 > >
00:06:16 verbose #7844 > > inl time_span x : time_span =
00:06:16 verbose #7845 > > $'`time_span !x '
00:06:17 verbose #7846 > 00:06:16 debug #99 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8048bcad8c290f153b5302b555ca50a912ff4a4d13fc74a0c536e28249848a2d/main.spi
00:06:17 verbose #7847 > >
00:06:17 verbose #7848 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:17 verbose #7849 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:17 verbose #7850 > > │ ## new_time_span │
00:06:17 verbose #7851 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:17 verbose #7852 > >
00:06:17 verbose #7853 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:17 verbose #7854 > > inl new_time_span (a : date_time) (b : date_time) : time_span =
00:06:17 verbose #7855 > > $'!b - !a '
00:06:17 verbose #7856 > 00:06:16 debug #100 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d5b73c0f243c8bdb6330e2c73410a327973fd55cd993b7d194f96f1f04e8200c/main.spi
00:06:18 verbose #7857 > >
00:06:18 verbose #7858 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:18 verbose #7859 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:18 verbose #7860 > > │ ## time_span_format │
00:06:18 verbose #7861 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:18 verbose #7862 > >
00:06:18 verbose #7863 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:18 verbose #7864 > > inl time_span_format (format : string) (time_span : time_span) : string =
00:06:18 verbose #7865 > > $'!time_span.ToString' format
00:06:18 verbose #7866 > 00:06:17 debug #101 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b79ef87987073ff6011e7bbcf93f712c991bfe9e095e608d5018fb2c61e12868/main.spi
00:06:18 verbose #7867 > >
00:06:18 verbose #7868 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:18 verbose #7869 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:18 verbose #7870 > > │ ## hours │
00:06:18 verbose #7871 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:18 verbose #7872 > >
00:06:18 verbose #7873 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:18 verbose #7874 > > inl hours (time_span : time_span) : i32 =
00:06:18 verbose #7875 > > time_span |> $'_.Hours'
00:06:19 verbose #7876 > 00:06:18 debug #102 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ce8b4b4b4425bc4dc9689a4e1191283c4016f77d7d65065ff08eae0f18fdbfaa/main.spi
00:06:19 verbose #7877 > >
00:06:19 verbose #7878 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:19 verbose #7879 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:19 verbose #7880 > > │ ## milliseconds │
00:06:19 verbose #7881 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:19 verbose #7882 > >
00:06:19 verbose #7883 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:19 verbose #7884 > > inl milliseconds (time_span : time_span) : i32 =
00:06:19 verbose #7885 > > time_span |> $'_.Milliseconds'
00:06:19 verbose #7886 > 00:06:18 debug #103 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b6f4f41c05f8e5369f4d1b6b872f922246786848a1f93779499538040af991ed/main.spi
00:06:20 verbose #7887 > >
00:06:20 verbose #7888 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:20 verbose #7889 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:20 verbose #7890 > > │ ## minutes │
00:06:20 verbose #7891 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:20 verbose #7892 > >
00:06:20 verbose #7893 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:20 verbose #7894 > > inl minutes (time_span : time_span) : i32 =
00:06:20 verbose #7895 > > time_span |> $'_.Minutes'
00:06:20 verbose #7896 > 00:06:19 debug #104 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b2b39f308c6a00376992d335635f05ff8f04f5d0b47a8f2703044c0886708879/main.spi
00:06:20 verbose #7897 > >
00:06:20 verbose #7898 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:20 verbose #7899 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:20 verbose #7900 > > │ ## seconds │
00:06:20 verbose #7901 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:20 verbose #7902 > >
00:06:20 verbose #7903 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:20 verbose #7904 > > inl seconds (time_span : time_span) : i32 =
00:06:20 verbose #7905 > > time_span |> $'_.Seconds'
00:06:21 verbose #7906 > 00:06:20 debug #105 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b5c1f1429ad3e1e651e73cc6efaf43dfbfa3c5cfaf387ea2d22c4c093896558a/main.spi
00:06:21 verbose #7907 > >
00:06:21 verbose #7908 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:21 verbose #7909 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:21 verbose #7910 > > │ ## total_seconds │
00:06:21 verbose #7911 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:21 verbose #7912 > >
00:06:21 verbose #7913 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:21 verbose #7914 > > inl total_seconds (time_span : time_span) : f64 =
00:06:21 verbose #7915 > > time_span |> $'_.TotalSeconds'
00:06:21 verbose #7916 > 00:06:20 debug #106 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5541c7b195a79879c239f9b307a0cec5cfdc7d880d8042bfbc40fb0146c7de5b/main.spi
00:06:22 verbose #7917 > >
00:06:22 verbose #7918 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:22 verbose #7919 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:22 verbose #7920 > > │ ## time_zone_info │
00:06:22 verbose #7921 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:22 verbose #7922 > >
00:06:22 verbose #7923 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:22 verbose #7924 > > nominal time_zone_info = $'System.TimeZoneInfo'
00:06:22 verbose #7925 > 00:06:21 debug #107 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1ea3e4ecc9db2b87e3fb1e9d3c9e647c0c318a27793a3c6f0fd0ea28195ffa56/main.spi
00:06:22 verbose #7926 > >
00:06:22 verbose #7927 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:22 verbose #7928 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:22 verbose #7929 > > │ ## time_zone_local │
00:06:22 verbose #7930 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:22 verbose #7931 > >
00:06:22 verbose #7932 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:22 verbose #7933 > > inl time_zone_local () : time_zone_info =
00:06:22 verbose #7934 > > run_target function
00:06:22 verbose #7935 > > | Fsharp (Native) => fun () =>
00:06:22 verbose #7936 > > $'System.TimeZoneInfo.Local'
00:06:22 verbose #7937 > > | Rust (Native) => fun () =>
00:06:22 verbose #7938 > > open rust_operators
00:06:22 verbose #7939 > > !\($'"0i64.into()"')
00:06:22 verbose #7940 > > | _ => fun () => null ()
00:06:23 verbose #7941 > 00:06:22 debug #108 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f54365afbf753c04b91074b6f322c1df91df8d5eb4635e3c09e132927d429213/main.spi
00:06:23 verbose #7942 > >
00:06:23 verbose #7943 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:23 verbose #7944 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:23 verbose #7945 > > │ ## get_utc_offset │
00:06:23 verbose #7946 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:23 verbose #7947 > >
00:06:23 verbose #7948 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:23 verbose #7949 > > inl get_utc_offset (time_zone_info : time_zone_info) (date_time : date_time) :
00:06:23 verbose #7950 > > time_span =
00:06:23 verbose #7951 > > run_target function
00:06:23 verbose #7952 > > | Fsharp (Native) => fun () =>
00:06:23 verbose #7953 > > date_time |> $'_.GetUtcOffset' (time_zone_local ())
00:06:23 verbose #7954 > > | _ => fun () =>
00:06:23 verbose #7955 > > time_span ()
00:06:24 verbose #7956 > 00:06:22 debug #109 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/66fafabbe15a7d38786fc7af7ea3215d575d0af62dd871a33ab32dda467163b4/main.spi
00:06:24 verbose #7957 > >
00:06:24 verbose #7958 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:24 verbose #7959 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:24 verbose #7960 > > │ ## add_days │
00:06:24 verbose #7961 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:24 verbose #7962 > >
00:06:24 verbose #7963 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:24 verbose #7964 > > inl add_days (days : i32) (date_time : date_time) : date_time =
00:06:24 verbose #7965 > > $'!date_time.AddDays' days
00:06:24 verbose #7966 > 00:06:23 debug #110 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bed8a8567928585d4380aa55488ddacfd00b745e7b81c5def15220d587005fc8/main.spi
00:06:24 verbose #7967 > >
00:06:24 verbose #7968 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:24 verbose #7969 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:24 verbose #7970 > > │ ## now │
00:06:24 verbose #7971 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:24 verbose #7972 > >
00:06:24 verbose #7973 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:24 verbose #7974 > > inl now () : date_time =
00:06:24 verbose #7975 > > $'System.DateTime.Now'
00:06:25 verbose #7976 > 00:06:24 debug #111 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cbd1e6687ad96948ef3a5d3c132d616ba96c1bb4efb5468735641f2efa09635a/main.spi
00:06:25 verbose #7977 > >
00:06:25 verbose #7978 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:25 verbose #7979 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:25 verbose #7980 > > │ ## utc_now │
00:06:25 verbose #7981 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:25 verbose #7982 > >
00:06:25 verbose #7983 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:25 verbose #7984 > > inl utc_now () : date_time =
00:06:25 verbose #7985 > > $'System.DateTime.UtcNow'
00:06:25 verbose #7986 > 00:06:24 debug #112 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/397c89db2e30aacc852625ec87c43f51adb4ce4227e2a1c51887d3b8643c81ba/main.spi
00:06:26 verbose #7987 > >
00:06:26 verbose #7988 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:26 verbose #7989 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:26 verbose #7990 > > │ ## timestamp_guid │
00:06:26 verbose #7991 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:26 verbose #7992 > >
00:06:26 verbose #7993 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:26 verbose #7994 > > type timestamp_guid = guid.guid
00:06:26 verbose #7995 > 00:06:25 debug #113 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9d79026518d8a69b2e4f2ca4e37adb5214264b3e808abbfd1bcdb23a5c1eb2dc/main.spi
00:06:26 verbose #7996 > >
00:06:26 verbose #7997 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:26 verbose #7998 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:26 verbose #7999 > > │ ## date_time_guid │
00:06:26 verbose #8000 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:26 verbose #8001 > >
00:06:26 verbose #8002 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:26 verbose #8003 > > type date_time_guid = guid.guid
00:06:27 verbose #8004 > 00:06:26 debug #114 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/61f7403adc4d08fa29c98eeeb0ff6f2f3a0b1551f4f48b8da6518dbee38a8508/main.spi
00:06:27 verbose #8005 > >
00:06:27 verbose #8006 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:27 verbose #8007 > > //// test
00:06:27 verbose #8008 > >
00:06:27 verbose #8009 > > inl test_guid () =
00:06:27 verbose #8010 > > guid.new_guid "FEDCBA98-7654-3210-FEDC-BA9876543210"
00:06:27 verbose #8011 > 00:06:26 debug #115 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2224736dbf7603bc798b1d95231c25fa163b5a416a18ab9753c0972d290cb626/main.spi
00:06:28 verbose #8012 > >
00:06:28 verbose #8013 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:28 verbose #8014 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:28 verbose #8015 > > │ ## date_time_guid_from_date_time │
00:06:28 verbose #8016 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:28 verbose #8017 > >
00:06:28 verbose #8018 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:28 verbose #8019 > > let date_time_guid_from_date_time (guid : guid.guid) (date_time : date_time) =
00:06:28 verbose #8020 > > inl parse prefix time_zone : date_time_guid =
00:06:28 verbose #8021 > > inl guid = guid |> sm'.obj_to_string
00:06:28 verbose #8022 > > $'`date_time_guid $"{!prefix}{!time_zone}{!guid.[[!prefix.Length +
00:06:28 verbose #8023 > > !time_zone.Length..]]}"'
00:06:28 verbose #8024 > > run_target function
00:06:28 verbose #8025 > > | Fsharp (Native) => fun () =>
00:06:28 verbose #8026 > > inl prefix = date_time |> format (join "yyyyMMdd-HHmm-ssff-ffff-f")
00:06:28 verbose #8027 > > inl time_zone = date_time |> get_utc_offset (time_zone_local ())
00:06:28 verbose #8028 > > inl time_zone_signal = (hours time_zone > 0) |> convert_i32
00:06:28 verbose #8029 > > inl time_zone_value = time_zone |> time_span_format (join "hhmm")
00:06:28 verbose #8030 > > inl time_zone = $'$"{!time_zone_signal}{!time_zone_value}"' : string
00:06:28 verbose #8031 > > parse prefix time_zone
00:06:28 verbose #8032 > > | Rust (Native) => fun () =>
00:06:28 verbose #8033 > > inl epoch =
00:06:28 verbose #8034 > > date_time_utc 1970 1 1 0 0 0
00:06:28 verbose #8035 > > |> to_universal_time
00:06:28 verbose #8036 > > inl date_time =
00:06:28 verbose #8037 > > date_time
00:06:28 verbose #8038 > > |> specify_date_kind Local
00:06:28 verbose #8039 > > |> to_universal_time
00:06:28 verbose #8040 > > inl unixticks =
00:06:28 verbose #8041 > > match date_time |> ticks, epoch |> ticks with
00:06:28 verbose #8042 > > | timestamp date_time, timestamp epoch => date_time - epoch
00:06:28 verbose #8043 > > inl prefix =
00:06:28 verbose #8044 > > unixticks / 10
00:06:28 verbose #8045 > > |> from_timestamp_micros
00:06:28 verbose #8046 > > |> optionm.map (
00:06:28 verbose #8047 > > to_local
00:06:28 verbose #8048 > > >> format'' "%Y%m%d-%H%M-%S%f"
00:06:28 verbose #8049 > > >> sm'.from_std_string
00:06:28 verbose #8050 > > >> fun s => $'$"{!s.[[0..17]]}-{!s.[[18..21]]}-{!s.[[22]]}"'
00:06:28 verbose #8051 > > )
00:06:28 verbose #8052 > > |> optionm'.default_value ""
00:06:28 verbose #8053 > > inl time_zone = date_time |> get_utc_offset (time_zone_local ())
00:06:28 verbose #8054 > > inl time_zone_signal = if hours time_zone > 0 then 1u8 else 0
00:06:28 verbose #8055 > > inl time_zone_value = time_zone |> time_span_format "hh:mm"
00:06:28 verbose #8056 > > inl time_zone =
00:06:28 verbose #8057 > > $'$"{!time_zone_signal}{!time_zone_value.[[0..1]]}{!time_zone_value.[[3..4]]}"'
00:06:28 verbose #8058 > > : string
00:06:28 verbose #8059 > > parse prefix time_zone
00:06:28 verbose #8060 > > | _ => fun () => null ()
00:06:28 verbose #8061 > 00:06:27 debug #116 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/190bc8fa9d48e21953f1129ba8c8bc56a02e0da87434f74d24cea957b95f89e3/main.spi
00:06:28 verbose #8062 > >
00:06:28 verbose #8063 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:28 verbose #8064 > > //// test
00:06:28 verbose #8065 > >
00:06:28 verbose #8066 > > types ()
00:06:28 verbose #8067 > > now () |> to_universal_time |> date_time_guid_from_date_time (test_guid ()) |>
00:06:28 verbose #8068 > > sm'.obj_to_string
00:06:28 verbose #8069 > > |> console.write_line
00:06:29 verbose #8070 > 00:06:28 debug #117 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b9321c2b55de912f105849a4e7b3cd338b8339fbafd8bbbf5f59ad324b490b6f/main.spi
00:06:30 verbose #8071 > >
00:06:30 verbose #8072 > > ╭─[ 2.25s - stdout ]───────────────────────────────────────────────────────────╮
00:06:30 verbose #8073 > > │ 20240521-0158-2024-2415-200400543210 │
00:06:30 verbose #8074 > > │ │
00:06:30 verbose #8075 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:30 verbose #8076 > >
00:06:30 verbose #8077 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:30 verbose #8078 > > //// test
00:06:30 verbose #8079 > > ///! rust -d chrono
00:06:30 verbose #8080 > >
00:06:30 verbose #8081 > > types ()
00:06:30 verbose #8082 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:06:30 verbose #8083 > > - 6i32) (am'.End id)
00:06:30 verbose #8084 > > now ()
00:06:30 verbose #8085 > > |> to_universal_time
00:06:30 verbose #8086 > > |> date_time_guid_from_date_time (test_guid ())
00:06:31 verbose #8087 > > |> sm'.obj_to_string
00:06:31 verbose #8088 > > |> fun s => s |> _assert_eq' $'$"{!s.[[0..29]]}{!suffix}"'
00:06:31 verbose #8089 > 00:06:30 debug #118 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e2cd323f578ef07bda19902d97451fd2c733713a4e52ba5cecc9bb93fb937bd5/main.spi
00:06:36 verbose #8090 > >
00:06:36 verbose #8091 > > ╭─[ 5.07s - return value ]─────────────────────────────────────────────────────╮
00:06:36 verbose #8092 > > │ assert_eq' / actual: "20240521-0158-2510-2219-000000543210" / expected: │
00:06:36 verbose #8093 > > │ "20240521-0158-2510-2219-000000543210" │
00:06:36 verbose #8094 > > │ │
00:06:36 verbose #8095 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:36 verbose #8096 > >
00:06:36 verbose #8097 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:36 verbose #8098 > > //// test
00:06:36 verbose #8099 > >
00:06:36 verbose #8100 > > types ()
00:06:36 verbose #8101 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:06:36 verbose #8102 > > - 6i32) (am'.End id)
00:06:36 verbose #8103 > > min_value ()
00:06:36 verbose #8104 > > |> specify_date_kind Local
00:06:36 verbose #8105 > > |> date_time_guid_from_date_time (test_guid ())
00:06:36 verbose #8106 > > |> sm'.obj_to_string
00:06:36 verbose #8107 > > |> fun s => s |> _assert_eq'
00:06:36 verbose #8108 > > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:06:36 verbose #8109 > 00:06:35 debug #119 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d4547d14bf4e0358c201c68ea36391426fe736d04bc185e41805bd9a47263663/main.spi
00:06:36 verbose #8110 > >
00:06:36 verbose #8111 > > ╭─[ 856.49ms - stdout ]────────────────────────────────────────────────────────╮
00:06:36 verbose #8112 > > │ assert_eq' / actual: "00010101-0000-0000-0000-000400543210" / expected: │
00:06:36 verbose #8113 > > │ "00010101-0000-0000-0000-000400543210" │
00:06:36 verbose #8114 > > │ │
00:06:36 verbose #8115 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:36 verbose #8116 > >
00:06:36 verbose #8117 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:36 verbose #8118 > > //// test
00:06:36 verbose #8119 > > ///! rust -d chrono
00:06:36 verbose #8120 > >
00:06:36 verbose #8121 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:06:36 verbose #8122 > > - 6i32) (am'.End id)
00:06:36 verbose #8123 > > types ()
00:06:36 verbose #8124 > > min_value ()
00:06:36 verbose #8125 > > |> specify_date_kind Local
00:06:36 verbose #8126 > > |> date_time_guid_from_date_time (test_guid ())
00:06:36 verbose #8127 > > |> sm'.obj_to_string
00:06:36 verbose #8128 > > |> fun s => s |> _assert_eq'
00:06:36 verbose #8129 > > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:06:37 verbose #8130 > 00:06:36 debug #120 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5b5daf7a265898f3fed10e1f5034d59e80b2bfdc01914339c892c3133c0803b0/main.spi
00:06:41 verbose #8131 > >
00:06:41 verbose #8132 > > ╭─[ 4.85s - return value ]─────────────────────────────────────────────────────╮
00:06:41 verbose #8133 > > │ assert_eq' / actual: "00010101-0000-0000-0000-000000543210" / expected: │
00:06:41 verbose #8134 > > │ "00010101-0000-0000-0000-000000543210" │
00:06:41 verbose #8135 > > │ │
00:06:41 verbose #8136 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:41 verbose #8137 > >
00:06:41 verbose #8138 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:41 verbose #8139 > > //// test
00:06:41 verbose #8140 > >
00:06:41 verbose #8141 > > types ()
00:06:41 verbose #8142 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:06:41 verbose #8143 > > - 6i32) (am'.End id)
00:06:41 verbose #8144 > > max_value ()
00:06:41 verbose #8145 > > |> specify_date_kind Utc
00:06:41 verbose #8146 > > |> add_days -1
00:06:41 verbose #8147 > > |> date_time_guid_from_date_time (test_guid ())
00:06:41 verbose #8148 > > |> sm'.obj_to_string
00:06:41 verbose #8149 > > |> fun s => s |> _assert_eq
00:06:41 verbose #8150 > > $'$"99991230-2359-5999-9999-9{!s.[[25..29]]}{!suffix}"'
00:06:42 verbose #8151 > 00:06:41 debug #121 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/515bc5c75be7bedb7526bf82152e199e1db53187947f5a876627e9d333e28497/main.spi
00:06:42 verbose #8152 > >
00:06:42 verbose #8153 > > ╭─[ 815.91ms - stdout ]────────────────────────────────────────────────────────╮
00:06:42 verbose #8154 > > │ assert_eq / actual: "99991230-2359-5999-9999-900400543210" / expected: │
00:06:42 verbose #8155 > > │ "99991230-2359-5999-9999-900400543210" │
00:06:42 verbose #8156 > > │ │
00:06:42 verbose #8157 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:42 verbose #8158 > >
00:06:42 verbose #8159 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:42 verbose #8160 > > //// test
00:06:42 verbose #8161 > > ///! rust -d chrono
00:06:42 verbose #8162 > >
00:06:42 verbose #8163 > > types ()
00:06:42 verbose #8164 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:06:42 verbose #8165 > > - 6i32) (am'.End id)
00:06:42 verbose #8166 > > max_value ()
00:06:42 verbose #8167 > > |> specify_date_kind Utc
00:06:42 verbose #8168 > > |> add_days -1
00:06:42 verbose #8169 > > |> date_time_guid_from_date_time (test_guid ())
00:06:42 verbose #8170 > > |> sm'.obj_to_string
00:06:42 verbose #8171 > > |> fun s => s |> _assert_eq
00:06:42 verbose #8172 > > $'$"99991230-2359-5999-9999-0{!s.[[25..29]]}{!suffix}"'
00:06:43 verbose #8173 > 00:06:41 debug #122 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5ba87184a17aec8316ef9d31269305214d6c2f747efc79ad6be9ec245b04e4dc/main.spi
00:06:47 verbose #8174 > >
00:06:47 verbose #8175 > > ╭─[ 5.14s - return value ]─────────────────────────────────────────────────────╮
00:06:47 verbose #8176 > > │ assert_eq / actual: "99991230-2359-5999-9999-000000543210" / expected: │
00:06:47 verbose #8177 > > │ "99991230-2359-5999-9999-000000543210" │
00:06:47 verbose #8178 > > │ │
00:06:47 verbose #8179 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:47 verbose #8180 > >
00:06:47 verbose #8181 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:47 verbose #8182 > > //// test
00:06:47 verbose #8183 > >
00:06:47 verbose #8184 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:06:47 verbose #8185 > > - 6i32) (am'.End id)
00:06:47 verbose #8186 > > unix_epoch ()
00:06:47 verbose #8187 > > |> specify_date_kind Utc
00:06:47 verbose #8188 > > |> add_days 1
00:06:47 verbose #8189 > > |> date_time_guid_from_date_time (test_guid ())
00:06:47 verbose #8190 > > |> sm'.obj_to_string
00:06:47 verbose #8191 > > |> fun s => s |> _assert_eq
00:06:47 verbose #8192 > > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:06:48 verbose #8193 > 00:06:47 debug #123 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2ebb7add00aaa6e65a7fe6180a327b95230ba6c97efbff53047b0e9ee5d5fa1/main.spi
00:06:48 verbose #8194 > >
00:06:48 verbose #8195 > > ╭─[ 859.27ms - stdout ]────────────────────────────────────────────────────────╮
00:06:48 verbose #8196 > > │ assert_eq / actual: "19700102-0000-0000-0000-000400543210" / expected: │
00:06:48 verbose #8197 > > │ "19700102-0000-0000-0000-000400543210" │
00:06:48 verbose #8198 > > │ │
00:06:48 verbose #8199 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:48 verbose #8200 > >
00:06:48 verbose #8201 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:48 verbose #8202 > > //// test
00:06:48 verbose #8203 > > ///! rust -d chrono
00:06:48 verbose #8204 > >
00:06:48 verbose #8205 > > types ()
00:06:48 verbose #8206 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:06:48 verbose #8207 > > - 6i32) (am'.End id)
00:06:48 verbose #8208 > > unix_epoch ()
00:06:48 verbose #8209 > > |> specify_date_kind Utc
00:06:48 verbose #8210 > > |> add_days 1
00:06:48 verbose #8211 > > |> date_time_guid_from_date_time (test_guid ())
00:06:48 verbose #8212 > > |> sm'.obj_to_string
00:06:48 verbose #8213 > > |> fun s => s |> _assert_eq
00:06:48 verbose #8214 > > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:06:49 verbose #8215 > 00:06:47 debug #124 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/437ff75d205adcb508b149832418a3164259f1faf70a5959c0f723a704ecc5c1/main.spi
00:06:53 verbose #8216 > >
00:06:53 verbose #8217 > > ╭─[ 4.81s - return value ]─────────────────────────────────────────────────────╮
00:06:53 verbose #8218 > > │ assert_eq / actual: "19700102-0000-0000-0000-000000543210" / expected: │
00:06:53 verbose #8219 > > │ "19700102-0000-0000-0000-000000543210" │
00:06:53 verbose #8220 > > │ │
00:06:53 verbose #8221 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:53 verbose #8222 > >
00:06:53 verbose #8223 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:53 verbose #8224 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:53 verbose #8225 > > │ ## date_time_from_guid │
00:06:53 verbose #8226 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:53 verbose #8227 > >
00:06:53 verbose #8228 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:53 verbose #8229 > > inl date_time_from_guid (date_time_guid : date_time_guid) =
00:06:53 verbose #8230 > > inl date_time_guid = date_time_guid |> sm'.obj_to_string
00:06:53 verbose #8231 > > inl sm'_replace = join sm'.replace
00:06:53 verbose #8232 > > run_target function
00:06:53 verbose #8233 > > | Rust _ => fun () =>
00:06:53 verbose #8234 > > $'System.DateTime.Parse (!date_time_guid.[[..24]] |> !sm'_replace
00:06:53 verbose #8235 > > "-" "")' : date_time
00:06:53 verbose #8236 > > | _ => fun () => $'System.DateTime.ParseExact (!date_time_guid.[[..24]]
00:06:53 verbose #8237 > > |> !sm'_replace "-" "", "yyyyMMddHHmmssfffffff", null)' : date_time
00:06:53 verbose #8238 > 00:06:52 debug #125 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c819ec7ad84a06ac233e7533c94abb91ffe0f05e7bee41205dbd2f5a96948e60/main.spi
00:06:54 verbose #8239 > >
00:06:54 verbose #8240 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:54 verbose #8241 > > //// test
00:06:54 verbose #8242 > >
00:06:54 verbose #8243 > > date_time_from_guid (guid.new_guid "00010101-0000-0000-0000-0a9876543210")
00:06:54 verbose #8244 > > |> _assert_eq' (min_value ())
00:06:54 verbose #8245 > 00:06:53 debug #126 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/aeabb2c11ace36d2ca83663c341d0296766f493099a1532d59f66a69ee715bf4/main.spi
00:06:54 verbose #8246 > >
00:06:54 verbose #8247 > > ╭─[ 739.42ms - stdout ]────────────────────────────────────────────────────────╮
00:06:54 verbose #8248 > > │ assert_eq' / actual: 0001-01-01 12:00:00 AM / expected: 0001-01-01 12:00:00 │
00:06:54 verbose #8249 > > │ AM │
00:06:54 verbose #8250 > > │ │
00:06:54 verbose #8251 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:54 verbose #8252 > >
00:06:54 verbose #8253 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:54 verbose #8254 > > //// test
00:06:54 verbose #8255 > >
00:06:54 verbose #8256 > > date_time_from_guid (guid.new_guid $'$"99991231-2359-5999-9999-9{(!test_guid ()
00:06:54 verbose #8257 > > |> string).[[^10..]]}"')
00:06:54 verbose #8258 > > |> _assert_eq' (max_value ())
00:06:55 verbose #8259 > 00:06:54 debug #127 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3553e0ab0d7bbcae126346251aa3ad9c746ccaeefb81742e708178f765316889/main.spi
00:06:55 verbose #8260 > >
00:06:55 verbose #8261 > > ╭─[ 762.35ms - stdout ]────────────────────────────────────────────────────────╮
00:06:55 verbose #8262 > > │ assert_eq' / actual: 9999-12-31 11:59:59 PM / expected: 9999-12-31 11:59:59 │
00:06:55 verbose #8263 > > │ PM │
00:06:55 verbose #8264 > > │ │
00:06:55 verbose #8265 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:55 verbose #8266 > >
00:06:55 verbose #8267 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:55 verbose #8268 > > //// test
00:06:55 verbose #8269 > >
00:06:55 verbose #8270 > > date_time_from_guid (guid.new_guid $'$"19700101-0000-0000-0000-0{(!test_guid ()
00:06:55 verbose #8271 > > |> string).[[^10..]]}"')
00:06:55 verbose #8272 > > |> _assert_eq' $'System.DateTime.UnixEpoch'
00:06:56 verbose #8273 > 00:06:54 debug #128 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e93cadc87077b66f0497523ef7d3ba58926312c097f32ed1b6677e28f417569b/main.spi
00:06:56 verbose #8274 > >
00:06:56 verbose #8275 > > ╭─[ 766.36ms - stdout ]────────────────────────────────────────────────────────╮
00:06:56 verbose #8276 > > │ assert_eq' / actual: 1970-01-01 12:00:00 AM / expected: 1970-01-01 12:00:00 │
00:06:56 verbose #8277 > > │ AM │
00:06:56 verbose #8278 > > │ │
00:06:56 verbose #8279 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:56 verbose #8280 > >
00:06:56 verbose #8281 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:56 verbose #8282 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:56 verbose #8283 > > │ ## timestamp_guid_from_timestamp │
00:06:56 verbose #8284 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:56 verbose #8285 > >
00:06:56 verbose #8286 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:56 verbose #8287 > > inl timestamp_guid_from_timestamp (guid : guid.guid) (timestamp : timestamp) :
00:06:56 verbose #8288 > > timestamp_guid =
00:06:56 verbose #8289 > > inl guid = guid |> sm'.obj_to_string
00:06:56 verbose #8290 > > inl timestamp = timestamp |> sm'.obj_to_string |> sm'.pad_left 18i32 '0'
00:06:56 verbose #8291 > > $'`timestamp_guid
00:06:56 verbose #8292 > > $"{!timestamp.[[0..7]]}-{!timestamp.[[8..11]]}-{!timestamp.[[12..15]]}-{!timesta
00:06:56 verbose #8293 > > mp.[[16..17]]}{!guid.[[21..]]}"'
00:06:56 verbose #8294 > 00:06:55 debug #129 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d2b7cc221d2473bc7b6e161f09faf9da8033f7a54cd041471fffd348fbff9f02/main.spi
00:06:57 verbose #8295 > >
00:06:57 verbose #8296 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:57 verbose #8297 > > //// test
00:06:57 verbose #8298 > >
00:06:57 verbose #8299 > > timestamp_guid_from_timestamp (test_guid ()) (timestamp 0i64)
00:06:57 verbose #8300 > > |> _assert_eq' (guid.new_guid "00000000-0000-0000-00dc-ba9876543210")
00:06:57 verbose #8301 > 00:06:56 debug #130 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/deea36b94607b1d06bf7930caba1693f585ba02f876791dfbbbe77a70b0c05f0/main.spi
00:06:57 verbose #8302 > >
00:06:57 verbose #8303 > > ╭─[ 689.00ms - stdout ]────────────────────────────────────────────────────────╮
00:06:57 verbose #8304 > > │ assert_eq' / actual: 00000000-0000-0000-00dc-ba9876543210 / expected: │
00:06:57 verbose #8305 > > │ 00000000-0000-0000-00dc-ba9876543210 │
00:06:57 verbose #8306 > > │ │
00:06:57 verbose #8307 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:57 verbose #8308 > >
00:06:57 verbose #8309 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:57 verbose #8310 > > //// test
00:06:57 verbose #8311 > >
00:06:57 verbose #8312 > > timestamp_guid_from_timestamp (test_guid ()) (timestamp 999999999999999999i64)
00:06:57 verbose #8313 > > |> _assert_eq' (guid.new_guid $'$"99999999-9999-9999-99dc-b{(!test_guid () |>
00:06:57 verbose #8314 > > string).[[^10..]]}"')
00:06:58 verbose #8315 > 00:06:57 debug #131 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7dce713276a2c55ea297a79d1b7ad3a514dd0630fde39b7e083962d8ee4b44f6/main.spi
00:06:58 verbose #8316 > >
00:06:58 verbose #8317 > > ╭─[ 862.57ms - stdout ]────────────────────────────────────────────────────────╮
00:06:58 verbose #8318 > > │ assert_eq' / actual: 99999999-9999-9999-99dc-ba9876543210 / expected: │
00:06:58 verbose #8319 > > │ 99999999-9999-9999-99dc-ba9876543210 │
00:06:58 verbose #8320 > > │ │
00:06:58 verbose #8321 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:58 verbose #8322 > >
00:06:58 verbose #8323 > > ── markdown ────────────────────────────────────────────────────────────────────
00:06:58 verbose #8324 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:06:58 verbose #8325 > > │ ## timestamp_from_guid │
00:06:58 verbose #8326 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:06:58 verbose #8327 > >
00:06:58 verbose #8328 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:58 verbose #8329 > > inl timestamp_from_guid (guid : date_time_guid) : timestamp =
00:06:58 verbose #8330 > > inl guid = guid |> sm'.obj_to_string
00:06:58 verbose #8331 > > $'`i64
00:06:58 verbose #8332 > > $"{!guid.[[0..7]]}{!guid.[[9..12]]}{!guid.[[14..17]]}{!guid.[[19..20]]}"'
00:06:59 verbose #8333 > 00:06:57 debug #132 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9cc5bf2edc4eed55ec80b594e7c6e9dc0967e5ee8b26f29b3de75988bd7da428/main.spi
00:06:59 verbose #8334 > >
00:06:59 verbose #8335 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:06:59 verbose #8336 > > //// test
00:06:59 verbose #8337 > >
00:06:59 verbose #8338 > > timestamp_from_guid (guid.new_guid "00000000-0000-0000-00dc-ba9876543210")
00:06:59 verbose #8339 > > |> _assert_eq (timestamp 0)
00:06:59 verbose #8340 > 00:06:58 debug #133 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/eb30f62c255c484f5af612816ca8ce13a7a0653b76ae222c459fdf66620b65ec/main.spi
00:07:00 verbose #8341 > >
00:07:00 verbose #8342 > > ╭─[ 792.25ms - stdout ]────────────────────────────────────────────────────────╮
00:07:00 verbose #8343 > > │ assert_eq / actual: 0L / expected: 0L │
00:07:00 verbose #8344 > > │ │
00:07:00 verbose #8345 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:00 verbose #8346 > >
00:07:00 verbose #8347 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:00 verbose #8348 > > //// test
00:07:00 verbose #8349 > >
00:07:00 verbose #8350 > > timestamp_from_guid (guid.new_guid $'$"99999999-9999-9999-99{(!test_guid () |>
00:07:00 verbose #8351 > > string).[[^14..]]}"')
00:07:00 verbose #8352 > > |> _assert_eq (timestamp 999999999999999999)
00:07:00 verbose #8353 > 00:06:59 debug #134 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4cd3e8961e94dadf8ca7ef9a486ff7b97c793450c7e91039aef3add3183d52f0/main.spi
00:07:00 verbose #8354 > >
00:07:00 verbose #8355 > > ╭─[ 817.73ms - stdout ]────────────────────────────────────────────────────────╮
00:07:00 verbose #8356 > > │ assert_eq / actual: 999999999999999999L / expected: 999999999999999999L │
00:07:00 verbose #8357 > > │ │
00:07:00 verbose #8358 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:00 verbose #8359 > >
00:07:00 verbose #8360 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:00 verbose #8361 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:00 verbose #8362 > > │ ## new_guid_from_date_time │
00:07:00 verbose #8363 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:00 verbose #8364 > >
00:07:00 verbose #8365 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:00 verbose #8366 > > inl new_guid_from_date_time (date_time : date_time) =
00:07:00 verbose #8367 > > inl guid = guid.new_raw_guid ()
00:07:00 verbose #8368 > > date_time_guid_from_date_time guid date_time
00:07:01 verbose #8369 > 00:07:00 debug #135 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d56ad8cf6767a8c77b0c2998531a468be618f47caa5eb73b8ee888d91b465db8/main.spi
00:07:01 verbose #8370 > >
00:07:01 verbose #8371 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:01 verbose #8372 > > //// test
00:07:01 verbose #8373 > >
00:07:01 verbose #8374 > > utc_now ()
00:07:01 verbose #8375 > > |> new_guid_from_date_time
00:07:01 verbose #8376 > > |> date_time_from_guid
00:07:01 verbose #8377 > > |> fun date_time => new_time_span date_time (utc_now ()) |> total_seconds |> i32
00:07:01 verbose #8378 > > |> _assert_eq 0
00:07:02 verbose #8379 > 00:07:01 debug #136 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/abba5530c10c9f77507846283c65af6f7bbe8ca97ee08726c4719444e206aae2/main.spi
00:07:02 verbose #8380 > >
00:07:02 verbose #8381 > > ╭─[ 839.67ms - stdout ]────────────────────────────────────────────────────────╮
00:07:02 verbose #8382 > > │ assert_eq / actual: 0 / expected: 0 │
00:07:02 verbose #8383 > > │ │
00:07:02 verbose #8384 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:02 verbose #8385 > >
00:07:02 verbose #8386 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:02 verbose #8387 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:02 verbose #8388 > > │ ## new_guid_from_timestamp │
00:07:02 verbose #8389 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:02 verbose #8390 > >
00:07:02 verbose #8391 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:02 verbose #8392 > > inl new_guid_from_timestamp (timestamp : timestamp) =
00:07:02 verbose #8393 > > inl guid = guid.new_raw_guid ()
00:07:02 verbose #8394 > > timestamp_guid_from_timestamp guid timestamp
00:07:03 verbose #8395 > 00:07:01 debug #137 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/801a8ae51cb6281423425d4622c6c4c4883c8eefb7fbcd46ff95d928a0fc5d7a/main.spi
00:07:03 verbose #8396 > >
00:07:03 verbose #8397 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:03 verbose #8398 > > //// test
00:07:03 verbose #8399 > >
00:07:03 verbose #8400 > > utc_now ()
00:07:03 verbose #8401 > > |> ticks
00:07:03 verbose #8402 > > |> new_guid_from_timestamp
00:07:03 verbose #8403 > > |> timestamp_from_guid
00:07:03 verbose #8404 > > |> fun (timestamp timestamp) => (timestamp - (utc_now () |> ticks |> fun
00:07:03 verbose #8405 > > (timestamp x) => x)) / 100000i64
00:07:03 verbose #8406 > > |> _assert_eq 0i64
00:07:03 verbose #8407 > 00:07:02 debug #138 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/49b996c13dabf10e48215a29f82adc30bcb14c9e0055058ab282cd7c629af7a5/main.spi
00:07:04 verbose #8408 > >
00:07:04 verbose #8409 > > ╭─[ 803.45ms - stdout ]────────────────────────────────────────────────────────╮
00:07:04 verbose #8410 > > │ assert_eq / actual: 0L / expected: 0L │
00:07:04 verbose #8411 > > │ │
00:07:04 verbose #8412 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:04 verbose #8413 > >
00:07:04 verbose #8414 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:04 verbose #8415 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:04 verbose #8416 > > │ ## main │
00:07:04 verbose #8417 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:04 verbose #8418 > >
00:07:04 verbose #8419 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:04 verbose #8420 > > inl main () =
00:07:04 verbose #8421 > > types ()
00:07:04 verbose #8422 > > $'let date_time_guid_from_date_time x = !date_time_guid_from_date_time x' :
00:07:04 verbose #8423 > > ()
00:07:04 verbose #8424 > > $'let date_time_from_guid x = !date_time_from_guid x' : ()
00:07:04 verbose #8425 > > $'let timestamp_guid_from_timestamp x = !timestamp_guid_from_timestamp x' :
00:07:04 verbose #8426 > > ()
00:07:04 verbose #8427 > > $'let timestamp_from_guid x = !timestamp_from_guid x' : ()
00:07:04 verbose #8428 > > $'let new_guid_from_date_time x = !new_guid_from_date_time x' : ()
00:07:04 verbose #8429 > > $'let new_guid_from_timestamp x = !new_guid_from_timestamp x' : ()
00:07:04 verbose #8430 > > $'let format x = !format x' : ()
00:07:04 verbose #8431 > > $'let format_iso8601 x = !format_iso8601 x' : ()
00:07:04 verbose #8432 > 00:07:03 debug #139 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/38fb7b76a7caf013f055f05c785cd7c7a95b020420c051be452dc0619b42157e/main.spi
00:07:05 verbose #8433 > 00:01:00 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39360
00:07:05 verbose #8434 > 00:01:00 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:07:07 verbose #8435 > 00:01:02 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb to html
00:07:07 verbose #8436 > 00:01:02 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:07:07 verbose #8437 > 00:01:02 verbose #7 ! validate(nb)
00:07:10 verbose #8438 > 00:01:04 verbose #8 ! [NbConvertApp] Writing 388347 bytes to c:\home\git\polyglot\lib\spiral\date_time.dib.html
00:07:10 verbose #8439 > 00:01:05 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649
00:07:10 verbose #8440 > 00:01:05 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649
00:07:10 verbose #8441 > 00:01:05 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:07:11 verbose #8442 > 00:01:06 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:07:11 verbose #8443 > 00:01:06 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:07:12 verbose #8444 > 00:01:07 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 40068
00:07:12 debug #8445 execute_with_options_async / exit_code: 0 / output.Length: 43954
00:07:12 debug #15 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path date_time.dib --retries 3
00:07:12 debug #8446 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 3",
[||], None, None, true, None)
00:07:12 verbose #8447 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "math.dib", "--retries", "3"])
00:07:12 verbose #8448 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/math.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/math.dib" --output-path "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:07:15 verbose #8449 > >
00:07:15 verbose #8450 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:15 verbose #8451 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:15 verbose #8452 > > │ # math │
00:07:15 verbose #8453 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:15 verbose #8454 > >
00:07:15 verbose #8455 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:15 verbose #8456 > > //// test
00:07:15 verbose #8457 > >
00:07:15 verbose #8458 > > open testing
00:07:15 verbose #8459 > >
00:07:15 verbose #8460 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:07:15 verbose #8461 > > #r
00:07:15 verbose #8462 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:07:15 verbose #8463 > > otNet.Interactive.Spiral.dll"
00:07:15 verbose #8464 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:07:15 verbose #8465 > > #r
00:07:15 verbose #8466 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:07:15 verbose #8467 > > otNet.Interactive.dll"
00:07:15 verbose #8468 > > open type Microsoft.DotNet.Interactive.Kernel
00:07:21 verbose #8469 > >
00:07:21 verbose #8470 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:21 verbose #8471 > > //// test
00:07:21 verbose #8472 > >
00:07:21 verbose #8473 > > 2 * 2 / 0.4f64 |> sqrt
00:07:21 verbose #8474 > > |> _assert_approx_eq None 3.1622776601683795
00:07:21 verbose #8475 > >
00:07:21 verbose #8476 > > ╭─[ 684.61ms - stdout ]────────────────────────────────────────────────────────╮
00:07:21 verbose #8477 > > │ assert_approx_eq / actual: 3.16227766 / expected: 3.16227766 │
00:07:21 verbose #8478 > > │ │
00:07:21 verbose #8479 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:21 verbose #8480 > >
00:07:21 verbose #8481 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:21 verbose #8482 > > //// test
00:07:21 verbose #8483 > >
00:07:21 verbose #8484 > > 2f64 / 3
00:07:21 verbose #8485 > > |> _assert_approx_eq None 0.6666666666666666
00:07:21 verbose #8486 > >
00:07:21 verbose #8487 > > ╭─[ 39.93ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:21 verbose #8488 > > │ assert_approx_eq / actual: 0.6666666667 / expected: 0.6666666667 │
00:07:21 verbose #8489 > > │ │
00:07:21 verbose #8490 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:21 verbose #8491 > >
00:07:21 verbose #8492 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:21 verbose #8493 > > //// test
00:07:21 verbose #8494 > >
00:07:21 verbose #8495 > > 2f64 |> log
00:07:21 verbose #8496 > > |> _assert_approx_eq None 0.6931471805599453
00:07:21 verbose #8497 > >
00:07:21 verbose #8498 > > ╭─[ 34.35ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:21 verbose #8499 > > │ assert_approx_eq / actual: 0.6931471806 / expected: 0.6931471806 │
00:07:21 verbose #8500 > > │ │
00:07:21 verbose #8501 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:21 verbose #8502 > >
00:07:21 verbose #8503 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:21 verbose #8504 > > //// test
00:07:21 verbose #8505 > >
00:07:21 verbose #8506 > > pi
00:07:21 verbose #8507 > > |> _assert_approx_eq None 3.141592653589793f64
00:07:22 verbose #8508 > >
00:07:22 verbose #8509 > > ╭─[ 39.12ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8510 > > │ assert_approx_eq / actual: 3.141592654 / expected: 3.141592654 │
00:07:22 verbose #8511 > > │ │
00:07:22 verbose #8512 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8513 > >
00:07:22 verbose #8514 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8515 > > //// test
00:07:22 verbose #8516 > >
00:07:22 verbose #8517 > > pi |> cos
00:07:22 verbose #8518 > > |> _assert_eq -1f64
00:07:22 verbose #8519 > >
00:07:22 verbose #8520 > > ╭─[ 54.62ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8521 > > │ assert_eq / actual: -1.0 / expected: -1.0 │
00:07:22 verbose #8522 > > │ │
00:07:22 verbose #8523 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8524 > >
00:07:22 verbose #8525 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8526 > > //// test
00:07:22 verbose #8527 > >
00:07:22 verbose #8528 > > pi
00:07:22 verbose #8529 > > |> cos
00:07:22 verbose #8530 > > |> fun n => n / 2f64
00:07:22 verbose #8531 > > |> _assert_approx_eq None -0.5
00:07:22 verbose #8532 > >
00:07:22 verbose #8533 > > ╭─[ 32.46ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8534 > > │ assert_approx_eq / actual: -0.5 / expected: -0.5 │
00:07:22 verbose #8535 > > │ │
00:07:22 verbose #8536 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8537 > >
00:07:22 verbose #8538 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8539 > > //// test
00:07:22 verbose #8540 > >
00:07:22 verbose #8541 > > pi / 2 |> cos
00:07:22 verbose #8542 > > |> _assert_approx_eq None 0.00000000000000006123233995736766f64
00:07:22 verbose #8543 > >
00:07:22 verbose #8544 > > ╭─[ 42.19ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8545 > > │ assert_approx_eq / actual: 6.123233996e-17 / expected: 6.123233996e-17 │
00:07:22 verbose #8546 > > │ │
00:07:22 verbose #8547 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8548 > >
00:07:22 verbose #8549 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8550 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8551 > > │ ## atan2 │
00:07:22 verbose #8552 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8553 > >
00:07:22 verbose #8554 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8555 > > inl atan2 (y : f64) (x : f64) : f64 =
00:07:22 verbose #8556 > > $'System.Math.Atan2 (!y, !x)'
00:07:22 verbose #8557 > >
00:07:22 verbose #8558 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8559 > > //// test
00:07:22 verbose #8560 > >
00:07:22 verbose #8561 > > 0 |> atan2 1
00:07:22 verbose #8562 > > |> _assert_eq 1.5707963267948966
00:07:22 verbose #8563 > >
00:07:22 verbose #8564 > > ╭─[ 218.29ms - stdout ]────────────────────────────────────────────────────────╮
00:07:22 verbose #8565 > > │ assert_eq / actual: 1.570796327 / expected: 1.570796327 │
00:07:22 verbose #8566 > > │ │
00:07:22 verbose #8567 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8568 > >
00:07:22 verbose #8569 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8570 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8571 > > │ ## e │
00:07:22 verbose #8572 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8573 > >
00:07:22 verbose #8574 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8575 > > inl e () =
00:07:22 verbose #8576 > > exp 1f64
00:07:22 verbose #8577 > >
00:07:22 verbose #8578 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8579 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8580 > > │ ## floor │
00:07:22 verbose #8581 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8582 > >
00:07:22 verbose #8583 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8584 > > inl floor forall t {float}. (n : t) : t =
00:07:22 verbose #8585 > > n |> $'floor'
00:07:22 verbose #8586 > >
00:07:22 verbose #8587 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8588 > > //// test
00:07:22 verbose #8589 > >
00:07:22 verbose #8590 > > 0.6 |> floor
00:07:22 verbose #8591 > > |> _assert_eq 0f64
00:07:22 verbose #8592 > >
00:07:22 verbose #8593 > > ╭─[ 88.20ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8594 > > │ assert_eq / actual: 0.0 / expected: 0.0 │
00:07:22 verbose #8595 > > │ │
00:07:22 verbose #8596 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8597 > >
00:07:22 verbose #8598 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8599 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8600 > > │ ## ceil │
00:07:22 verbose #8601 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8602 > >
00:07:22 verbose #8603 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8604 > > inl ceil forall t {float}. (n : t) : t =
00:07:22 verbose #8605 > > n |> $'ceil'
00:07:22 verbose #8606 > >
00:07:22 verbose #8607 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8608 > > //// test
00:07:22 verbose #8609 > >
00:07:22 verbose #8610 > > 0.6 |> ceil
00:07:22 verbose #8611 > > |> _assert_eq 1f64
00:07:22 verbose #8612 > >
00:07:22 verbose #8613 > > ╭─[ 40.80ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8614 > > │ assert_eq / actual: 1.0 / expected: 1.0 │
00:07:22 verbose #8615 > > │ │
00:07:22 verbose #8616 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8617 > >
00:07:22 verbose #8618 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8619 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8620 > > │ ## round │
00:07:22 verbose #8621 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8622 > >
00:07:22 verbose #8623 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8624 > > inl round forall t {float}. (n : t) : t =
00:07:22 verbose #8625 > > n |> $'round'
00:07:22 verbose #8626 > >
00:07:22 verbose #8627 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8628 > > //// test
00:07:22 verbose #8629 > >
00:07:22 verbose #8630 > > 0.5 |> round
00:07:22 verbose #8631 > > |> _assert_eq 0f64
00:07:22 verbose #8632 > >
00:07:22 verbose #8633 > > 1.5 |> round
00:07:22 verbose #8634 > > |> _assert_eq 2f64
00:07:22 verbose #8635 > >
00:07:22 verbose #8636 > > 2.5 |> round
00:07:22 verbose #8637 > > |> _assert_eq 2f64
00:07:22 verbose #8638 > >
00:07:22 verbose #8639 > > 3.5 |> round
00:07:22 verbose #8640 > > |> _assert_eq 4f64
00:07:22 verbose #8641 > >
00:07:22 verbose #8642 > > ╭─[ 71.68ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8643 > > │ assert_eq / actual: 0.0 / expected: 0.0 │
00:07:22 verbose #8644 > > │ assert_eq / actual: 2.0 / expected: 2.0 │
00:07:22 verbose #8645 > > │ assert_eq / actual: 2.0 / expected: 2.0 │
00:07:22 verbose #8646 > > │ assert_eq / actual: 4.0 / expected: 4.0 │
00:07:22 verbose #8647 > > │ │
00:07:22 verbose #8648 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8649 > >
00:07:22 verbose #8650 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8651 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8652 > > │ ## log_base │
00:07:22 verbose #8653 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8654 > >
00:07:22 verbose #8655 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8656 > > inl log_base (new_base : f64) (a : f64) : f64 =
00:07:22 verbose #8657 > > $'System.Math.Log (!a, !new_base)'
00:07:22 verbose #8658 > >
00:07:22 verbose #8659 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8660 > > //// test
00:07:22 verbose #8661 > >
00:07:22 verbose #8662 > > 100 |> log_base 10
00:07:22 verbose #8663 > > |> _assert_eq 2
00:07:22 verbose #8664 > >
00:07:22 verbose #8665 > > ╭─[ 66.20ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8666 > > │ assert_eq / actual: 2.0 / expected: 2.0 │
00:07:22 verbose #8667 > > │ │
00:07:22 verbose #8668 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8669 > >
00:07:22 verbose #8670 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8671 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8672 > > │ ## round │
00:07:22 verbose #8673 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8674 > >
00:07:22 verbose #8675 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8676 > > inl round forall t {float}. (x : t) : t =
00:07:22 verbose #8677 > > x |> $'round'
00:07:22 verbose #8678 > >
00:07:22 verbose #8679 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8680 > > //// test
00:07:22 verbose #8681 > >
00:07:22 verbose #8682 > > 0.5 |> round
00:07:22 verbose #8683 > > |> _assert_eq 0f64
00:07:22 verbose #8684 > >
00:07:22 verbose #8685 > > ╭─[ 49.28ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8686 > > │ assert_eq / actual: 0.0 / expected: 0.0 │
00:07:22 verbose #8687 > > │ │
00:07:22 verbose #8688 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8689 > >
00:07:22 verbose #8690 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8691 > > //// test
00:07:22 verbose #8692 > >
00:07:22 verbose #8693 > > 0.6 |> round
00:07:22 verbose #8694 > > |> _assert_eq 1f64
00:07:22 verbose #8695 > >
00:07:22 verbose #8696 > > ╭─[ 80.16ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:22 verbose #8697 > > │ assert_eq / actual: 1.0 / expected: 1.0 │
00:07:22 verbose #8698 > > │ │
00:07:22 verbose #8699 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8700 > >
00:07:22 verbose #8701 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:22 verbose #8702 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:22 verbose #8703 > > │ ## square │
00:07:22 verbose #8704 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:22 verbose #8705 > >
00:07:22 verbose #8706 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:22 verbose #8707 > > inl square x =
00:07:22 verbose #8708 > > x ** 2
00:07:23 verbose #8709 > >
00:07:23 verbose #8710 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:23 verbose #8711 > > //// test
00:07:23 verbose #8712 > >
00:07:23 verbose #8713 > > 5f64
00:07:23 verbose #8714 > > |> sqrt
00:07:23 verbose #8715 > > |> square
00:07:23 verbose #8716 > > |> _assert_approx_eq None 5
00:07:23 verbose #8717 > >
00:07:23 verbose #8718 > > ╭─[ 47.22ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:23 verbose #8719 > > │ assert_approx_eq / actual: 5.0 / expected: 5.0 │
00:07:23 verbose #8720 > > │ │
00:07:23 verbose #8721 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:23 verbose #8722 > >
00:07:23 verbose #8723 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:23 verbose #8724 > > //// test
00:07:23 verbose #8725 > >
00:07:23 verbose #8726 > > e () |> square
00:07:23 verbose #8727 > > |> _assert_approx_eq None 7.3890560989306495
00:07:23 verbose #8728 > >
00:07:23 verbose #8729 > > ╭─[ 49.24ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:23 verbose #8730 > > │ assert_approx_eq / actual: 7.389056099 / expected: 7.389056099 │
00:07:23 verbose #8731 > > │ │
00:07:23 verbose #8732 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:23 verbose #8733 > 00:00:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12325
00:07:23 verbose #8734 > 00:00:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/math.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:07:26 verbose #8735 > 00:00:14 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/math.dib.ipynb to html
00:07:26 verbose #8736 > 00:00:14 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:07:26 verbose #8737 > 00:00:14 verbose #7 ! validate(nb)
00:07:28 verbose #8738 > 00:00:15 verbose #8 ! [NbConvertApp] Writing 303804 bytes to c:\home\git\polyglot\lib\spiral\math.dib.html
00:07:28 verbose #8739 > 00:00:15 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639
00:07:28 verbose #8740 > 00:00:15 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639
00:07:28 verbose #8741 > 00:00:15 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:07:29 verbose #8742 > 00:00:17 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:07:29 verbose #8743 > 00:00:17 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:07:30 verbose #8744 > 00:00:17 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 13023
00:07:30 debug #8745 execute_with_options_async / exit_code: 0 / output.Length: 15802
00:07:30 debug #16 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 3
00:07:30 debug #8746 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path optionm'.dib --retries 3",
[||], None, None, true, None)
00:07:30 verbose #8747 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "optionm'.dib", "--retries", "3"])
00:07:30 verbose #8748 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/optionm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/optionm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:07:32 verbose #8749 > >
00:07:32 verbose #8750 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:32 verbose #8751 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:32 verbose #8752 > > │ # optionm │
00:07:32 verbose #8753 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:33 verbose #8754 > >
00:07:33 verbose #8755 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:33 verbose #8756 > > //// test
00:07:33 verbose #8757 > >
00:07:33 verbose #8758 > > open testing
00:07:33 verbose #8759 > >
00:07:33 verbose #8760 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:07:33 verbose #8761 > > #r
00:07:33 verbose #8762 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:07:33 verbose #8763 > > otNet.Interactive.Spiral.dll"
00:07:33 verbose #8764 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:07:33 verbose #8765 > > #r
00:07:33 verbose #8766 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:07:33 verbose #8767 > > otNet.Interactive.dll"
00:07:33 verbose #8768 > > open type Microsoft.DotNet.Interactive.Kernel
00:07:38 verbose #8769 > >
00:07:38 verbose #8770 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:38 verbose #8771 > > open rust_operators
00:07:38 verbose #8772 > >
00:07:38 verbose #8773 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:38 verbose #8774 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:38 verbose #8775 > > │ ## default_value │
00:07:38 verbose #8776 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:38 verbose #8777 > >
00:07:38 verbose #8778 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:38 verbose #8779 > > inl default_value d =
00:07:38 verbose #8780 > > optionm.defaultWith d
00:07:38 verbose #8781 > >
00:07:38 verbose #8782 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:38 verbose #8783 > > //// test
00:07:38 verbose #8784 > >
00:07:38 verbose #8785 > > None
00:07:38 verbose #8786 > > |> default_value 3i32
00:07:38 verbose #8787 > > |> _assert_eq 3i32
00:07:39 verbose #8788 > >
00:07:39 verbose #8789 > > ╭─[ 1.02s - stdout ]───────────────────────────────────────────────────────────╮
00:07:39 verbose #8790 > > │ assert_eq / actual: 3 / expected: 3 │
00:07:39 verbose #8791 > > │ │
00:07:39 verbose #8792 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:39 verbose #8793 > >
00:07:39 verbose #8794 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:39 verbose #8795 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:39 verbose #8796 > > │ ## (/??) │
00:07:39 verbose #8797 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:39 verbose #8798 > >
00:07:39 verbose #8799 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:39 verbose #8800 > > inl (/??) a b =
00:07:39 verbose #8801 > > a |> default_value b
00:07:39 verbose #8802 > >
00:07:39 verbose #8803 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:39 verbose #8804 > > //// test
00:07:39 verbose #8805 > >
00:07:39 verbose #8806 > > None /?? 3i32
00:07:39 verbose #8807 > > |> _assert_eq 3i32
00:07:39 verbose #8808 > >
00:07:39 verbose #8809 > > ╭─[ 33.82ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:39 verbose #8810 > > │ assert_eq / actual: 3 / expected: 3 │
00:07:39 verbose #8811 > > │ │
00:07:39 verbose #8812 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:39 verbose #8813 > >
00:07:39 verbose #8814 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:39 verbose #8815 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:39 verbose #8816 > > │ ## default_with │
00:07:39 verbose #8817 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:39 verbose #8818 > >
00:07:39 verbose #8819 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:39 verbose #8820 > > inl default_with fn = function
00:07:39 verbose #8821 > > | Some x => x
00:07:39 verbose #8822 > > | None => fn ()
00:07:39 verbose #8823 > >
00:07:39 verbose #8824 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:39 verbose #8825 > > //// test
00:07:39 verbose #8826 > >
00:07:39 verbose #8827 > > None
00:07:39 verbose #8828 > > |> default_with fun () => 3i32
00:07:39 verbose #8829 > > |> _assert_eq 3i32
00:07:39 verbose #8830 > >
00:07:39 verbose #8831 > > ╭─[ 48.63ms - stdout ]─────────────────────────────────────────────────────────╮
00:07:39 verbose #8832 > > │ assert_eq / actual: 3 / expected: 3 │
00:07:39 verbose #8833 > > │ │
00:07:39 verbose #8834 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:39 verbose #8835 > >
00:07:39 verbose #8836 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:39 verbose #8837 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:39 verbose #8838 > > │ ## choose │
00:07:39 verbose #8839 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:39 verbose #8840 > >
00:07:39 verbose #8841 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:39 verbose #8842 > > inl choose fn a b =
00:07:39 verbose #8843 > > match a, b with
00:07:39 verbose #8844 > > | Some x, Some y => fn x y |> Some
00:07:39 verbose #8845 > > | _ => None
00:07:39 verbose #8846 > >
00:07:39 verbose #8847 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:39 verbose #8848 > > //// test
00:07:39 verbose #8849 > >
00:07:39 verbose #8850 > > (Some 2i32, Some 3)
00:07:39 verbose #8851 > > ||> choose (+)
00:07:39 verbose #8852 > > |> _assert_eq (Some 5)
00:07:40 verbose #8853 > >
00:07:40 verbose #8854 > > ╭─[ 773.53ms - stdout ]────────────────────────────────────────────────────────╮
00:07:40 verbose #8855 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:07:40 verbose #8856 > > │ │
00:07:40 verbose #8857 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:40 verbose #8858 > >
00:07:40 verbose #8859 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:40 verbose #8860 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:40 verbose #8861 > > │ ## iter │
00:07:40 verbose #8862 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:40 verbose #8863 > >
00:07:40 verbose #8864 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:40 verbose #8865 > > inl iter fn = function
00:07:40 verbose #8866 > > | Some x => fn x
00:07:40 verbose #8867 > > | None => ()
00:07:40 verbose #8868 > >
00:07:40 verbose #8869 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:40 verbose #8870 > > //// test
00:07:40 verbose #8871 > >
00:07:40 verbose #8872 > > inl n = mut 1i32
00:07:40 verbose #8873 > > inl fn =
00:07:40 verbose #8874 > > fun n' =>
00:07:40 verbose #8875 > > n <- *n + n'
00:07:40 verbose #8876 > > Some 1i32 |> iter fn
00:07:40 verbose #8877 > > None |> iter fn
00:07:40 verbose #8878 > > *n
00:07:40 verbose #8879 > > |> _assert_eq 2i32
00:07:40 verbose #8880 > >
00:07:40 verbose #8881 > > ╭─[ 262.78ms - stdout ]────────────────────────────────────────────────────────╮
00:07:40 verbose #8882 > > │ assert_eq / actual: 2 / expected: 2 │
00:07:40 verbose #8883 > > │ │
00:07:40 verbose #8884 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:40 verbose #8885 > >
00:07:40 verbose #8886 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:40 verbose #8887 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:40 verbose #8888 > > │ ## option' │
00:07:40 verbose #8889 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:40 verbose #8890 > >
00:07:40 verbose #8891 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:40 verbose #8892 > > nominal option' t = $'`t option'
00:07:40 verbose #8893 > >
00:07:40 verbose #8894 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:40 verbose #8895 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:40 verbose #8896 > > │ ## none' │
00:07:40 verbose #8897 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:40 verbose #8898 > >
00:07:40 verbose #8899 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:40 verbose #8900 > > inl none' forall t. () : option' t =
00:07:40 verbose #8901 > > $'None'
00:07:40 verbose #8902 > >
00:07:40 verbose #8903 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:40 verbose #8904 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:40 verbose #8905 > > │ ## some' │
00:07:40 verbose #8906 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:40 verbose #8907 > >
00:07:40 verbose #8908 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:40 verbose #8909 > > inl some' forall t. (x : t) : option' t =
00:07:40 verbose #8910 > > $'Some !x '
00:07:41 verbose #8911 > >
00:07:41 verbose #8912 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:41 verbose #8913 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:41 verbose #8914 > > │ ## default_value' │
00:07:41 verbose #8915 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #8916 > >
00:07:41 verbose #8917 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8918 > > inl default_value' forall t. (value : t) (x : option' t) : t =
00:07:41 verbose #8919 > > $'!x |> Option.defaultValue !value '
00:07:41 verbose #8920 > >
00:07:41 verbose #8921 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:41 verbose #8922 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:41 verbose #8923 > > │ ## try' │
00:07:41 verbose #8924 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #8925 > >
00:07:41 verbose #8926 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8927 > > inl try' forall t. (x : option' t) : t =
00:07:41 verbose #8928 > > !\\(x, $'"$0?"')
00:07:41 verbose #8929 > >
00:07:41 verbose #8930 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:41 verbose #8931 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:41 verbose #8932 > > │ ## map │
00:07:41 verbose #8933 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #8934 > >
00:07:41 verbose #8935 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8936 > > inl map forall t u. (fn : t -> u) (x : option' t) : option' u =
00:07:41 verbose #8937 > > inl result : option' u = none' ()
00:07:41 verbose #8938 > > $'let _!result = ref !result '
00:07:41 verbose #8939 > > $'match !x with'
00:07:41 verbose #8940 > > $'| Some x -> ('
00:07:41 verbose #8941 > > $'(fun () ->'
00:07:41 verbose #8942 > > $'(fun () ->'
00:07:41 verbose #8943 > > inl x = dyn $'x'
00:07:41 verbose #8944 > > x |> fn |> emit_unit
00:07:41 verbose #8945 > > $')'
00:07:41 verbose #8946 > > $'|> fun x -> x () |> Some'
00:07:41 verbose #8947 > > $') () ) | None -> None'
00:07:41 verbose #8948 > > $'|> fun x -> _!result.Value <- x'
00:07:41 verbose #8949 > > $'_!result.Value '
00:07:41 verbose #8950 > >
00:07:41 verbose #8951 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:41 verbose #8952 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:41 verbose #8953 > > │ ## box │
00:07:41 verbose #8954 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #8955 > >
00:07:41 verbose #8956 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8957 > > inl box forall t. (x : option t) : option' t =
00:07:41 verbose #8958 > > // x
00:07:41 verbose #8959 > > // |> optionm.map some'
00:07:41 verbose #8960 > > // |> default_with none'
00:07:41 verbose #8961 > > match x with
00:07:41 verbose #8962 > > | Some x => some' x
00:07:41 verbose #8963 > > | None => none' ()
00:07:41 verbose #8964 > >
00:07:41 verbose #8965 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:41 verbose #8966 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:41 verbose #8967 > > │ ## map' │
00:07:41 verbose #8968 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #8969 > >
00:07:41 verbose #8970 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8971 > > inl map' forall t u. (fn : t -> u) (x : option' t) : option' u =
00:07:41 verbose #8972 > > (!\($'"true; let _result = !x.map(|x| { //"') : bool) |> ignore
00:07:41 verbose #8973 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:07:41 verbose #8974 > > !\($'"_result"')
00:07:41 verbose #8975 > >
00:07:41 verbose #8976 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:41 verbose #8977 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:41 verbose #8978 > > │ ## map'' │
00:07:41 verbose #8979 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #8980 > >
00:07:41 verbose #8981 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8982 > > inl map'' forall t u. (fn : t -> u) (x : option' t) : option' u =
00:07:41 verbose #8983 > > $'!x |> Option.map !fn '
00:07:41 verbose #8984 > >
00:07:41 verbose #8985 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:41 verbose #8986 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:41 verbose #8987 > > │ ## unbox │
00:07:41 verbose #8988 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #8989 > >
00:07:41 verbose #8990 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8991 > > inl unbox forall t. (x : option' t) : option t =
00:07:41 verbose #8992 > > x |> map Some |> default_value' None
00:07:41 verbose #8993 > > // inl some x : option t = Some x
00:07:41 verbose #8994 > > // inl some = join some
00:07:41 verbose #8995 > > // inl none : option t = None
00:07:41 verbose #8996 > > // $'!x |> Option.map !some |> Option.defaultValue !none '
00:07:41 verbose #8997 > >
00:07:41 verbose #8998 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #8999 > > //// test
00:07:41 verbose #9000 > >
00:07:41 verbose #9001 > > inl x = Some 3i32
00:07:41 verbose #9002 > > inl y : option i32 = None
00:07:41 verbose #9003 > > inl x' = x |> box |> unbox
00:07:41 verbose #9004 > > inl y' = y |> box |> map id |> unbox
00:07:41 verbose #9005 > > (x', y') |> _assert_eq (x, y)
00:07:41 verbose #9006 > >
00:07:41 verbose #9007 > > ╭─[ 181.60ms - stdout ]────────────────────────────────────────────────────────╮
00:07:41 verbose #9008 > > │ assert_eq / actual: struct (US0_0 3, US0_1) / expected: struct (US0_0 3, │
00:07:41 verbose #9009 > > │ US0_1) │
00:07:41 verbose #9010 > > │ │
00:07:41 verbose #9011 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:41 verbose #9012 > >
00:07:41 verbose #9013 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:41 verbose #9014 > > //// test
00:07:41 verbose #9015 > > ///! rust
00:07:41 verbose #9016 > >
00:07:41 verbose #9017 > > inl x = Some 3i32
00:07:41 verbose #9018 > > inl y : option i32 = None
00:07:41 verbose #9019 > > inl x' = x |> box |> unbox
00:07:41 verbose #9020 > > inl y' = y |> box |> map id |> unbox
00:07:41 verbose #9021 > > (x', y') |> _assert_eq' (x, y)
00:07:46 verbose #9022 > >
00:07:46 verbose #9023 > > ╭─[ 5.21s - return value ]─────────────────────────────────────────────────────╮
00:07:46 verbose #9024 > > │ assert_eq' / actual: (US0_0(3), US0_1) / expected: (US0_0(3), US0_1) │
00:07:46 verbose #9025 > > │ │
00:07:46 verbose #9026 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:46 verbose #9027 > >
00:07:46 verbose #9028 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:46 verbose #9029 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:46 verbose #9030 > > │ ## of_obj │
00:07:46 verbose #9031 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:46 verbose #9032 > >
00:07:46 verbose #9033 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:46 verbose #9034 > > inl of_obj forall t. (x : t) : option' t =
00:07:46 verbose #9035 > > $'let mutable _!x = None'
00:07:46 verbose #9036 > > $'#if \!FABLE_COMPILER && \!WASM && \!CONTRACT'
00:07:46 verbose #9037 > > ((x |> $'Option.ofObj') : option' t) |> emit_unit
00:07:46 verbose #9038 > > $'#else'
00:07:46 verbose #9039 > > $'Some !x '
00:07:46 verbose #9040 > > $'#endif'
00:07:46 verbose #9041 > > $'|> fun x -> _!x <- Some x'
00:07:46 verbose #9042 > > $'match _!x with Some x -> x | None -> failwith "optionm\'.of_obj
00:07:46 verbose #9043 > > _!x=None"'
00:07:46 verbose #9044 > >
00:07:46 verbose #9045 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:46 verbose #9046 > > //// test
00:07:46 verbose #9047 > >
00:07:46 verbose #9048 > > null ()
00:07:46 verbose #9049 > > |> of_obj
00:07:46 verbose #9050 > > |> unbox
00:07:46 verbose #9051 > > |> _assert_eq (None : option string)
00:07:46 verbose #9052 > >
00:07:46 verbose #9053 > > ╭─[ 155.84ms - stdout ]────────────────────────────────────────────────────────╮
00:07:46 verbose #9054 > > │ assert_eq / actual: US0_1 / expected: US0_1 │
00:07:46 verbose #9055 > > │ │
00:07:46 verbose #9056 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:46 verbose #9057 > >
00:07:46 verbose #9058 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:46 verbose #9059 > > //// test
00:07:46 verbose #9060 > > ///! rust
00:07:46 verbose #9061 > >
00:07:46 verbose #9062 > > ""
00:07:46 verbose #9063 > > |> of_obj
00:07:46 verbose #9064 > > |> unbox
00:07:46 verbose #9065 > > |> _assert_eq' (Some "")
00:07:51 verbose #9066 > >
00:07:51 verbose #9067 > > ╭─[ 4.78s - return value ]─────────────────────────────────────────────────────╮
00:07:51 verbose #9068 > > │ assert_eq' / actual: US0_0("") / expected: US0_0("") │
00:07:51 verbose #9069 > > │ │
00:07:51 verbose #9070 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:51 verbose #9071 > >
00:07:51 verbose #9072 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:51 verbose #9073 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:51 verbose #9074 > > │ ## flatten │
00:07:51 verbose #9075 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:51 verbose #9076 > >
00:07:51 verbose #9077 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:51 verbose #9078 > > inl flatten x =
00:07:51 verbose #9079 > > match x with
00:07:51 verbose #9080 > > | Some (Some x) => Some x
00:07:51 verbose #9081 > > | _ => None
00:07:51 verbose #9082 > >
00:07:51 verbose #9083 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:51 verbose #9084 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:51 verbose #9085 > > │ ## unwrap │
00:07:51 verbose #9086 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:51 verbose #9087 > >
00:07:51 verbose #9088 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:51 verbose #9089 > > inl unwrap forall t. (x : option' t) : t =
00:07:51 verbose #9090 > > !\\(x, $'"$0.unwrap()"')
00:07:52 verbose #9091 > 00:07:51 debug #140 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a6aa0273deb035867c0901480f6c5438b7924cf98c645aa6b4925c7e1cab7336/main.spi
00:07:52 verbose #9092 > >
00:07:52 verbose #9093 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:52 verbose #9094 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:52 verbose #9095 > > │ ## take │
00:07:52 verbose #9096 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:52 verbose #9097 > >
00:07:52 verbose #9098 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:52 verbose #9099 > > inl take forall t. (x : option' t) : option' t =
00:07:52 verbose #9100 > > (!\\(x, $'"true; let mut !x = !x"') : bool) |> ignore
00:07:52 verbose #9101 > > !\\(x, $'"Option::take(&mut $0)"')
00:07:53 verbose #9102 > 00:07:52 debug #141 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1b68973fac77cde584b93d4e76fc996a9fc449b100de99398e7e6e5187d649a2/main.spi
00:07:53 verbose #9103 > >
00:07:53 verbose #9104 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:53 verbose #9105 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:53 verbose #9106 > > │ ## take_ref │
00:07:53 verbose #9107 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:53 verbose #9108 > >
00:07:53 verbose #9109 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:53 verbose #9110 > > inl take_ref forall t. (x : rust.ref' (option' t)) : option' t =
00:07:53 verbose #9111 > > (!\\(x, $'"true; let mut !x = !x"') : bool) |> ignore
00:07:53 verbose #9112 > > !\\(x, $'"Option::take(&mut $0)"')
00:07:54 verbose #9113 > 00:07:52 debug #142 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/027a2004fe0014cfd57f2ec633ece595c91d2e1a574afc31bd062165c73c5274/main.spi
00:07:54 verbose #9114 > >
00:07:54 verbose #9115 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:54 verbose #9116 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:54 verbose #9117 > > │ ## take_ref_mut │
00:07:54 verbose #9118 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:54 verbose #9119 > >
00:07:54 verbose #9120 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:54 verbose #9121 > > inl take_ref_mut forall t. (x : rust.ref' (rust.mut' (option' t))) : option' t =
00:07:54 verbose #9122 > > !\\(x, $'"Option::take($0)"')
00:07:54 verbose #9123 > 00:07:53 debug #143 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1837cbc758718edab12561b54f3d35235576abdfae81c95561cde74b47a099ce/main.spi
00:07:55 verbose #9124 > >
00:07:55 verbose #9125 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:55 verbose #9126 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:55 verbose #9127 > > │ ## as_ref │
00:07:55 verbose #9128 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:55 verbose #9129 > >
00:07:55 verbose #9130 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:55 verbose #9131 > > inl as_ref forall t. (x : rust.ref' (option' t)) : option' (rust.ref' t) =
00:07:55 verbose #9132 > > !\\(x, $'"$0.as_ref()"')
00:07:55 verbose #9133 > 00:07:54 debug #144 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/517c1ee4e067f678dc66d80dd1df710aeb99f9340688b4c5bfdef1732fcae0c1/main.spi
00:07:55 verbose #9134 > >
00:07:55 verbose #9135 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:55 verbose #9136 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:55 verbose #9137 > > │ ## as_mut │
00:07:55 verbose #9138 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:55 verbose #9139 > >
00:07:55 verbose #9140 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:55 verbose #9141 > > inl as_mut forall t. (x : rust.ref' (rust.mut' (option' t))) : option'
00:07:55 verbose #9142 > > (rust.ref' (rust.mut' t)) =
00:07:55 verbose #9143 > > !\\(x, $'"$0.as_mut()"')
00:07:56 verbose #9144 > 00:07:55 debug #145 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/963cc6cee675e06d28200f11fd3fd8e68e36af3d32fe263759588723e8b935b2/main.spi
00:07:56 verbose #9145 > >
00:07:56 verbose #9146 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:56 verbose #9147 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:56 verbose #9148 > > │ ## unwrap_or │
00:07:56 verbose #9149 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:56 verbose #9150 > >
00:07:56 verbose #9151 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:56 verbose #9152 > > inl unwrap_or forall t. (def : t) (x : option' t) : t =
00:07:56 verbose #9153 > > !\($'"!x.unwrap_or(!def)"')
00:07:57 verbose #9154 > 00:07:55 debug #146 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/af4fac8da32f3e73124afdefc76791fc54e2a7ca44c79406195818a8cb718a7f/main.spi
00:07:57 verbose #9155 > >
00:07:57 verbose #9156 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:57 verbose #9157 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:57 verbose #9158 > > │ ## rc_upgrade │
00:07:57 verbose #9159 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:57 verbose #9160 > >
00:07:57 verbose #9161 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:57 verbose #9162 > > inl rc_upgrade forall t. (x : rust.weak_rc t) : option' (rust.rc t) =
00:07:57 verbose #9163 > > !\\(x, $'"std::rc::Weak::upgrade(&$0)"')
00:07:57 verbose #9164 > 00:07:56 debug #147 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f9076fbb720aa969f55042339f828e4b841931935de7bc28678f6604d88d1aad/main.spi
00:07:58 verbose #9165 > >
00:07:58 verbose #9166 > > ── markdown ────────────────────────────────────────────────────────────────────
00:07:58 verbose #9167 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:58 verbose #9168 > > │ ## rc_into_inner │
00:07:58 verbose #9169 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:58 verbose #9170 > >
00:07:58 verbose #9171 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:58 verbose #9172 > > inl rc_into_inner forall t. (x : rust.rc t) : option' t =
00:07:58 verbose #9173 > > !\\(x, $'"std::rc::Rc::into_inner($0)"')
00:07:58 verbose #9174 > 00:07:57 debug #148 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/039fa90a51af6fe5e549bd21251918efa9e0291e0989b2dd9c6b3174039cc9fd/main.spi
00:07:58 verbose #9175 > >
00:07:58 verbose #9176 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:58 verbose #9177 > > //// test
00:07:58 verbose #9178 > > ///! rust
00:07:58 verbose #9179 > >
00:07:58 verbose #9180 > > types ()
00:07:58 verbose #9181 > > rust.new_rc 0i32
00:07:58 verbose #9182 > > |> rc_into_inner
00:07:58 verbose #9183 > > |> unbox
00:07:58 verbose #9184 > > |> _assert_eq' (Some 0i32)
00:07:59 verbose #9185 > 00:07:58 debug #149 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/de2893bcf7f79e9ae70b81210575f36c451e655d822430a67a1eac1bab66ec9b/main.spi
00:08:04 verbose #9186 > >
00:08:04 verbose #9187 > > ╭─[ 5.44s - return value ]─────────────────────────────────────────────────────╮
00:08:04 verbose #9188 > > │ assert_eq' / actual: US0_0(0) / expected: US0_0(0) │
00:08:04 verbose #9189 > > │ │
00:08:04 verbose #9190 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:04 verbose #9191 > 00:00:34 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 19800
00:08:04 verbose #9192 > 00:00:34 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:08:06 verbose #9193 > 00:00:36 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb to html
00:08:06 verbose #9194 > 00:00:36 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:08:06 verbose #9195 > 00:00:36 verbose #7 ! validate(nb)
00:08:08 verbose #9196 > 00:00:38 verbose #8 ! [NbConvertApp] Writing 331712 bytes to c:\home\git\polyglot\lib\spiral\optionm'.dib.html
00:08:09 verbose #9197 > 00:00:38 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 647
00:08:09 verbose #9198 > 00:00:38 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 647
00:08:09 verbose #9199 > 00:00:38 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:08:10 verbose #9200 > 00:00:40 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:08:10 verbose #9201 > 00:00:40 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:08:11 verbose #9202 > 00:00:41 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 20506
00:08:11 debug #9203 execute_with_options_async / exit_code: 0 / output.Length: 23619
00:08:11 debug #17 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path optionm'.dib --retries 3
00:08:11 debug #9204 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path listm'.dib --retries 3",
[||], None, None, true, None)
00:08:11 verbose #9205 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "listm'.dib", "--retries", "3"])
00:08:11 verbose #9206 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/listm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/listm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:08:14 verbose #9207 > >
00:08:14 verbose #9208 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:14 verbose #9209 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:14 verbose #9210 > > │ # listm │
00:08:14 verbose #9211 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:14 verbose #9212 > >
00:08:14 verbose #9213 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:14 verbose #9214 > > //// test
00:08:14 verbose #9215 > >
00:08:14 verbose #9216 > > open testing
00:08:14 verbose #9217 > >
00:08:14 verbose #9218 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:08:14 verbose #9219 > > #r
00:08:14 verbose #9220 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:08:14 verbose #9221 > > otNet.Interactive.Spiral.dll"
00:08:14 verbose #9222 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:08:14 verbose #9223 > > #r
00:08:14 verbose #9224 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:08:14 verbose #9225 > > otNet.Interactive.dll"
00:08:14 verbose #9226 > > open type Microsoft.DotNet.Interactive.Kernel
00:08:20 verbose #9227 > >
00:08:20 verbose #9228 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9229 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9230 > > │ ## list' │
00:08:20 verbose #9231 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9232 > >
00:08:20 verbose #9233 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9234 > > nominal list' t = $'`t list'
00:08:20 verbose #9235 > >
00:08:20 verbose #9236 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9237 > > inl empty' forall t. () : list' t =
00:08:20 verbose #9238 > > $'[[]]'
00:08:20 verbose #9239 > >
00:08:20 verbose #9240 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9241 > > inl cons' forall t. (head : t) (tail : list' t) : list' t =
00:08:20 verbose #9242 > > $'!head :: !tail '
00:08:20 verbose #9243 > >
00:08:20 verbose #9244 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9245 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9246 > > │ ## box │
00:08:20 verbose #9247 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9248 > >
00:08:20 verbose #9249 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9250 > > inl box forall t. (list : list t) : list' t =
00:08:20 verbose #9251 > > (list, empty' ())
00:08:20 verbose #9252 > > ||> listm.foldBack fun x acc =>
00:08:20 verbose #9253 > > acc |> cons' x
00:08:20 verbose #9254 > >
00:08:20 verbose #9255 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9256 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9257 > > │ ## fold' │
00:08:20 verbose #9258 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9259 > >
00:08:20 verbose #9260 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9261 > > inl fold' forall t u. (fn : t -> u) (init : list u) (list : list' t) : list u =
00:08:20 verbose #9262 > > (init, list)
00:08:20 verbose #9263 > > ||> $'List.fold' join fun acc x => Cons (fn x, acc)
00:08:20 verbose #9264 > >
00:08:20 verbose #9265 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9266 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9267 > > │ ## fold_back' │
00:08:20 verbose #9268 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9269 > >
00:08:20 verbose #9270 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9271 > > inl fold_back' forall t u. (fn : t -> u) (list : list' t) (init : list u) : list
00:08:20 verbose #9272 > > u =
00:08:20 verbose #9273 > > (list, init)
00:08:20 verbose #9274 > > ||> $'List.foldBack' join fun x acc => Cons (fn x, acc)
00:08:20 verbose #9275 > >
00:08:20 verbose #9276 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9277 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9278 > > │ ## filter' │
00:08:20 verbose #9279 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9280 > >
00:08:20 verbose #9281 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9282 > > inl filter' forall t. (fn : t -> bool) (list : list' t) : list' t =
00:08:20 verbose #9283 > > list |> $'"List.filter !fn"'
00:08:20 verbose #9284 > >
00:08:20 verbose #9285 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9286 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9287 > > │ ## filter │
00:08:20 verbose #9288 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9289 > >
00:08:20 verbose #9290 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9291 > > inl filter forall t. (fn : t -> bool) (list : list t) : list t =
00:08:20 verbose #9292 > > (list, Nil)
00:08:20 verbose #9293 > > ||> listm.foldBack fun x acc =>
00:08:20 verbose #9294 > > if fn x then x :: acc else acc
00:08:20 verbose #9295 > >
00:08:20 verbose #9296 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9297 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9298 > > │ ## unbox │
00:08:20 verbose #9299 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9300 > >
00:08:20 verbose #9301 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9302 > > inl unbox forall t. (list : list' t) : list t =
00:08:20 verbose #9303 > > (list, Nil)
00:08:20 verbose #9304 > > ||> fold_back' id
00:08:20 verbose #9305 > >
00:08:20 verbose #9306 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:20 verbose #9307 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:20 verbose #9308 > > │ ## distinct' │
00:08:20 verbose #9309 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:20 verbose #9310 > >
00:08:20 verbose #9311 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9312 > > inl distinct' forall t. (list : list' t) : list' t =
00:08:20 verbose #9313 > > list |> $'List.distinct'
00:08:20 verbose #9314 > >
00:08:20 verbose #9315 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:20 verbose #9316 > > //// test
00:08:20 verbose #9317 > >
00:08:20 verbose #9318 > > [[ "1"; "2"; "2"; "3" ]]
00:08:20 verbose #9319 > > |> box
00:08:20 verbose #9320 > > |> distinct'
00:08:20 verbose #9321 > > |> unbox
00:08:20 verbose #9322 > > |> _assert_eq [[ "1"; "2"; "3" ]]
00:08:22 verbose #9323 > >
00:08:22 verbose #9324 > > ╭─[ 1.50s - stdout ]───────────────────────────────────────────────────────────╮
00:08:22 verbose #9325 > > │ assert_eq / actual: UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) / expected: │
00:08:22 verbose #9326 > > │ UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) │
00:08:22 verbose #9327 > > │ │
00:08:22 verbose #9328 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9329 > >
00:08:22 verbose #9330 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:22 verbose #9331 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:22 verbose #9332 > > │ ## to_array' │
00:08:22 verbose #9333 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9334 > >
00:08:22 verbose #9335 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9336 > > inl to_array' forall dim t. (items : list' t) : a dim t =
00:08:22 verbose #9337 > > items |> $'List.toArray'
00:08:22 verbose #9338 > >
00:08:22 verbose #9339 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:22 verbose #9340 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:22 verbose #9341 > > │ ## append │
00:08:22 verbose #9342 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9343 > >
00:08:22 verbose #9344 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9345 > > instance append list t =
00:08:22 verbose #9346 > > listm.append
00:08:22 verbose #9347 > >
00:08:22 verbose #9348 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9349 > > //// test
00:08:22 verbose #9350 > >
00:08:22 verbose #9351 > > [[ "a"; "b" ]] ++ [[ "c"; "d" ]]
00:08:22 verbose #9352 > > |> _assert_eq [[ "a"; "b"; "c"; "d" ]]
00:08:22 verbose #9353 > >
00:08:22 verbose #9354 > > ╭─[ 110.41ms - stdout ]────────────────────────────────────────────────────────╮
00:08:22 verbose #9355 > > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │
00:08:22 verbose #9356 > > │ UH0_0)))) / expected: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │
00:08:22 verbose #9357 > > │ UH0_0)))) │
00:08:22 verbose #9358 > > │ │
00:08:22 verbose #9359 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9360 > >
00:08:22 verbose #9361 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:22 verbose #9362 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:22 verbose #9363 > > │ ## collect │
00:08:22 verbose #9364 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9365 > >
00:08:22 verbose #9366 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9367 > > inl collect forall t r. (fn : t -> list r) (items : list t) : list r =
00:08:22 verbose #9368 > > items
00:08:22 verbose #9369 > > |> listm.map fn
00:08:22 verbose #9370 > > |> listm.fold (++) [[]]
00:08:22 verbose #9371 > >
00:08:22 verbose #9372 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:22 verbose #9373 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:22 verbose #9374 > > │ ## init_series │
00:08:22 verbose #9375 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9376 > >
00:08:22 verbose #9377 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9378 > > inl init_series start end inc =
00:08:22 verbose #9379 > > inl total : f64 = conv ((end - start) / inc) + 1
00:08:22 verbose #9380 > > listm.init total (conv >> (*) inc >> (+) start)
00:08:22 verbose #9381 > >
00:08:22 verbose #9382 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9383 > > //// test
00:08:22 verbose #9384 > >
00:08:22 verbose #9385 > > init_series 0 1 0.5
00:08:22 verbose #9386 > > |> _assert_eq [[ 0f64; 0.5; 1 ]]
00:08:22 verbose #9387 > >
00:08:22 verbose #9388 > > ╭─[ 85.87ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:22 verbose #9389 > > │ assert_eq / actual: UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) / expected: │
00:08:22 verbose #9390 > > │ UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) │
00:08:22 verbose #9391 > > │ │
00:08:22 verbose #9392 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9393 > >
00:08:22 verbose #9394 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:22 verbose #9395 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:22 verbose #9396 > > │ ## try_item │
00:08:22 verbose #9397 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9398 > >
00:08:22 verbose #9399 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9400 > > inl rec try_item i = function
00:08:22 verbose #9401 > > | Cons (x, _) when i = 0 => Some x
00:08:22 verbose #9402 > > | Cons (_, xs) => try_item (i - 1) xs
00:08:22 verbose #9403 > > | Nil => None
00:08:22 verbose #9404 > >
00:08:22 verbose #9405 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9406 > > //// test
00:08:22 verbose #9407 > >
00:08:22 verbose #9408 > > listm.init 10i32 id
00:08:22 verbose #9409 > > |> try_item 9i32
00:08:22 verbose #9410 > > |> _assert_eq (Some 9)
00:08:22 verbose #9411 > >
00:08:22 verbose #9412 > > ╭─[ 108.03ms - stdout ]────────────────────────────────────────────────────────╮
00:08:22 verbose #9413 > > │ assert_eq / actual: US0_0 9 / expected: US0_0 9 │
00:08:22 verbose #9414 > > │ │
00:08:22 verbose #9415 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9416 > >
00:08:22 verbose #9417 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9418 > > //// test
00:08:22 verbose #9419 > >
00:08:22 verbose #9420 > > listm.init 10i32 id
00:08:22 verbose #9421 > > |> try_item 10i32
00:08:22 verbose #9422 > > |> _assert_eq None
00:08:22 verbose #9423 > >
00:08:22 verbose #9424 > > ╭─[ 73.62ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:22 verbose #9425 > > │ assert_eq / actual: US0_1 / expected: US0_1 │
00:08:22 verbose #9426 > > │ │
00:08:22 verbose #9427 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9428 > >
00:08:22 verbose #9429 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:22 verbose #9430 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:22 verbose #9431 > > │ ## list_item │
00:08:22 verbose #9432 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:22 verbose #9433 > >
00:08:22 verbose #9434 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:22 verbose #9435 > > inl item i =
00:08:22 verbose #9436 > > try_item i >> optionm.value
00:08:23 verbose #9437 > >
00:08:23 verbose #9438 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9439 > > //// test
00:08:23 verbose #9440 > >
00:08:23 verbose #9441 > > listm.init 10i32 id
00:08:23 verbose #9442 > > |> item 9i32
00:08:23 verbose #9443 > > |> _assert_eq 9
00:08:23 verbose #9444 > >
00:08:23 verbose #9445 > > ╭─[ 43.74ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9446 > > │ assert_eq / actual: 9 / expected: 9 │
00:08:23 verbose #9447 > > │ │
00:08:23 verbose #9448 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9449 > >
00:08:23 verbose #9450 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9451 > > //// test
00:08:23 verbose #9452 > >
00:08:23 verbose #9453 > > fun () =>
00:08:23 verbose #9454 > > listm.init 10i32 id
00:08:23 verbose #9455 > > |> item 10i32
00:08:23 verbose #9456 > > |> ignore
00:08:23 verbose #9457 > > |> _throws
00:08:23 verbose #9458 > > |> optionm.map sm'.format_exception
00:08:23 verbose #9459 > > |> _assert_eq (Some "System.Exception: Option does not have a value.")
00:08:23 verbose #9460 > >
00:08:23 verbose #9461 > > ╭─[ 213.43ms - stdout ]────────────────────────────────────────────────────────╮
00:08:23 verbose #9462 > > │ assert_eq / actual: US1_0 "System.Exception: Option does not have a value." │
00:08:23 verbose #9463 > > │ / expected: US1_0 "System.Exception: Option does not have a value." │
00:08:23 verbose #9464 > > │ │
00:08:23 verbose #9465 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9466 > >
00:08:23 verbose #9467 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9468 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9469 > > │ ## try_item_ │
00:08:23 verbose #9470 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9471 > >
00:08:23 verbose #9472 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9473 > > let rec try_item_ i = function
00:08:23 verbose #9474 > > | Cons (x, _) when i = 0 => Some x
00:08:23 verbose #9475 > > | Cons (_, xs) => try_item_ (i - 1) xs
00:08:23 verbose #9476 > > | Nil => None
00:08:23 verbose #9477 > >
00:08:23 verbose #9478 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9479 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9480 > > │ ## item_ │
00:08:23 verbose #9481 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9482 > >
00:08:23 verbose #9483 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9484 > > inl item_ i =
00:08:23 verbose #9485 > > try_item_ i >> optionm.value
00:08:23 verbose #9486 > >
00:08:23 verbose #9487 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9488 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9489 > > │ ## sum │
00:08:23 verbose #9490 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9491 > >
00:08:23 verbose #9492 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9493 > > inl sum list =
00:08:23 verbose #9494 > > list |> listm.fold (+) 0
00:08:23 verbose #9495 > >
00:08:23 verbose #9496 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9497 > > //// test
00:08:23 verbose #9498 > >
00:08:23 verbose #9499 > > listm.init 10i32 id
00:08:23 verbose #9500 > > |> sum
00:08:23 verbose #9501 > > |> _assert_eq 45
00:08:23 verbose #9502 > >
00:08:23 verbose #9503 > > ╭─[ 37.68ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9504 > > │ assert_eq / actual: 45 / expected: 45 │
00:08:23 verbose #9505 > > │ │
00:08:23 verbose #9506 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9507 > >
00:08:23 verbose #9508 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9509 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9510 > > │ ## unzip │
00:08:23 verbose #9511 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9512 > >
00:08:23 verbose #9513 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9514 > > inl unzip list =
00:08:23 verbose #9515 > > (([[]], [[]]), list)
00:08:23 verbose #9516 > > ||> listm.fold fun (acc_x, acc_y) (x, y) =>
00:08:23 verbose #9517 > > x :: acc_x, y :: acc_y
00:08:23 verbose #9518 > > |> fun x, y =>
00:08:23 verbose #9519 > > x |> listm.rev, y |> listm.rev
00:08:23 verbose #9520 > >
00:08:23 verbose #9521 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9522 > > //// test
00:08:23 verbose #9523 > >
00:08:23 verbose #9524 > > listm.init 10i32 id
00:08:23 verbose #9525 > > |> listm.map (fun x => x, x)
00:08:23 verbose #9526 > > |> unzip
00:08:23 verbose #9527 > > |> fun x, y =>
00:08:23 verbose #9528 > > x |> sum
00:08:23 verbose #9529 > > |> _assert_eq 45
00:08:23 verbose #9530 > >
00:08:23 verbose #9531 > > y |> sum
00:08:23 verbose #9532 > > |> _assert_eq 45
00:08:23 verbose #9533 > >
00:08:23 verbose #9534 > > ╭─[ 48.16ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9535 > > │ assert_eq / actual: 45 / expected: 45 │
00:08:23 verbose #9536 > > │ assert_eq / actual: 45 / expected: 45 │
00:08:23 verbose #9537 > > │ │
00:08:23 verbose #9538 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9539 > >
00:08:23 verbose #9540 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9541 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9542 > > │ ## try_index_of │
00:08:23 verbose #9543 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9544 > >
00:08:23 verbose #9545 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9546 > > inl try_index_of item list =
00:08:23 verbose #9547 > > inl rec loop i = function
00:08:23 verbose #9548 > > | [[]] => None
00:08:23 verbose #9549 > > | x :: xs =>
00:08:23 verbose #9550 > > if x = item
00:08:23 verbose #9551 > > then Some i
00:08:23 verbose #9552 > > else loop (i + 1) xs
00:08:23 verbose #9553 > > loop 0 list
00:08:23 verbose #9554 > >
00:08:23 verbose #9555 > > inl index_of item =
00:08:23 verbose #9556 > > try_index_of item >> optionm.value
00:08:23 verbose #9557 > >
00:08:23 verbose #9558 > > inl try_index_of_ item list =
00:08:23 verbose #9559 > > let rec loop i = function
00:08:23 verbose #9560 > > | [[]] => None
00:08:23 verbose #9561 > > | x :: xs =>
00:08:23 verbose #9562 > > if x = item
00:08:23 verbose #9563 > > then Some i
00:08:23 verbose #9564 > > else loop (i + 1) xs
00:08:23 verbose #9565 > > loop 0 list
00:08:23 verbose #9566 > >
00:08:23 verbose #9567 > > inl index_of_ item =
00:08:23 verbose #9568 > > try_index_of_ item >> optionm.value
00:08:23 verbose #9569 > >
00:08:23 verbose #9570 > > inl try_index_of__ item list =
00:08:23 verbose #9571 > > inl i = mut 0
00:08:23 verbose #9572 > > inl list = mut list
00:08:23 verbose #9573 > > inl result = mut None
00:08:23 verbose #9574 > > let rec loop () =
00:08:23 verbose #9575 > > match *list with
00:08:23 verbose #9576 > > | [[]] => result <- None
00:08:23 verbose #9577 > > | x :: xs =>
00:08:23 verbose #9578 > > if x = item
00:08:23 verbose #9579 > > then result <- Some *i
00:08:23 verbose #9580 > > else
00:08:23 verbose #9581 > > i <- *i + 1
00:08:23 verbose #9582 > > list <- xs
00:08:23 verbose #9583 > > loop ()
00:08:23 verbose #9584 > > loop ()
00:08:23 verbose #9585 > > *result
00:08:23 verbose #9586 > >
00:08:23 verbose #9587 > > inl index_of__ item =
00:08:23 verbose #9588 > > try_index_of__ item >> optionm.value
00:08:23 verbose #9589 > >
00:08:23 verbose #9590 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9591 > > //// test
00:08:23 verbose #9592 > >
00:08:23 verbose #9593 > > listm.init 10i32 id
00:08:23 verbose #9594 > > |> index_of 5i32
00:08:23 verbose #9595 > > |> _assert_eq 5i32
00:08:23 verbose #9596 > >
00:08:23 verbose #9597 > > ╭─[ 37.13ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9598 > > │ assert_eq / actual: 5 / expected: 5 │
00:08:23 verbose #9599 > > │ │
00:08:23 verbose #9600 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9601 > >
00:08:23 verbose #9602 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9603 > > //// test
00:08:23 verbose #9604 > >
00:08:23 verbose #9605 > > listm.init 10i32 id
00:08:23 verbose #9606 > > |> try_index_of 10i32
00:08:23 verbose #9607 > > |> _assert_eq (None : option i32)
00:08:23 verbose #9608 > >
00:08:23 verbose #9609 > > ╭─[ 65.52ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9610 > > │ assert_eq / actual: US0_1 / expected: US0_1 │
00:08:23 verbose #9611 > > │ │
00:08:23 verbose #9612 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9613 > >
00:08:23 verbose #9614 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9615 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9616 > > │ ## try_find │
00:08:23 verbose #9617 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9618 > >
00:08:23 verbose #9619 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9620 > > inl try_find fn list =
00:08:23 verbose #9621 > > inl rec loop = function
00:08:23 verbose #9622 > > | [[]] => None
00:08:23 verbose #9623 > > | x :: xs =>
00:08:23 verbose #9624 > > if fn x
00:08:23 verbose #9625 > > then Some x
00:08:23 verbose #9626 > > else loop xs
00:08:23 verbose #9627 > > loop list
00:08:23 verbose #9628 > >
00:08:23 verbose #9629 > > inl try_find_ fn list =
00:08:23 verbose #9630 > > let rec loop = function
00:08:23 verbose #9631 > > | [[]] => None
00:08:23 verbose #9632 > > | x :: xs =>
00:08:23 verbose #9633 > > if fn x
00:08:23 verbose #9634 > > then Some x
00:08:23 verbose #9635 > > else loop xs
00:08:23 verbose #9636 > > loop list
00:08:23 verbose #9637 > >
00:08:23 verbose #9638 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9639 > > //// test
00:08:23 verbose #9640 > >
00:08:23 verbose #9641 > > listm.init 10i32 id
00:08:23 verbose #9642 > > |> try_find ((=) 5i32)
00:08:23 verbose #9643 > > |> _assert_eq (Some 5i32)
00:08:23 verbose #9644 > >
00:08:23 verbose #9645 > > ╭─[ 73.03ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9646 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:08:23 verbose #9647 > > │ │
00:08:23 verbose #9648 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9649 > >
00:08:23 verbose #9650 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9651 > > inl find x =
00:08:23 verbose #9652 > > try_find x >> optionm.value
00:08:23 verbose #9653 > >
00:08:23 verbose #9654 > > inl find_ x =
00:08:23 verbose #9655 > > try_find_ x >> optionm.value
00:08:23 verbose #9656 > >
00:08:23 verbose #9657 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9658 > > //// test
00:08:23 verbose #9659 > >
00:08:23 verbose #9660 > > listm.init 10i32 id
00:08:23 verbose #9661 > > |> find ((=) 5i32)
00:08:23 verbose #9662 > > |> _assert_eq 5i32
00:08:23 verbose #9663 > >
00:08:23 verbose #9664 > > ╭─[ 45.23ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9665 > > │ assert_eq / actual: 5 / expected: 5 │
00:08:23 verbose #9666 > > │ │
00:08:23 verbose #9667 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9668 > >
00:08:23 verbose #9669 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9670 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9671 > > │ ## choose │
00:08:23 verbose #9672 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9673 > >
00:08:23 verbose #9674 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9675 > > inl choose f l =
00:08:23 verbose #9676 > > (l, [[]])
00:08:23 verbose #9677 > > ||> listm.foldBack fun x acc =>
00:08:23 verbose #9678 > > match f x with
00:08:23 verbose #9679 > > | Some y => y :: acc
00:08:23 verbose #9680 > > | None => acc
00:08:23 verbose #9681 > >
00:08:23 verbose #9682 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9683 > > //// test
00:08:23 verbose #9684 > >
00:08:23 verbose #9685 > > listm.init 10i32 id
00:08:23 verbose #9686 > > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:08:23 verbose #9687 > > |> _assert_eq [[ 0; 2; 4; 6; 8 ]]
00:08:23 verbose #9688 > >
00:08:23 verbose #9689 > > ╭─[ 63.13ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9690 > > │ assert_eq / actual: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │
00:08:23 verbose #9691 > > │ UH0_0))))) / expected: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │
00:08:23 verbose #9692 > > │ UH0_0))))) │
00:08:23 verbose #9693 > > │ │
00:08:23 verbose #9694 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9695 > >
00:08:23 verbose #9696 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9697 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9698 > > │ ## zip_with │
00:08:23 verbose #9699 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9700 > >
00:08:23 verbose #9701 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9702 > > inl zip_with fn xs ys =
00:08:23 verbose #9703 > > inl rec loop acc xs ys =
00:08:23 verbose #9704 > > match xs, ys with
00:08:23 verbose #9705 > > | Cons (x, xs), Cons (y, ys) =>
00:08:23 verbose #9706 > > loop (fn x y :: acc) xs ys
00:08:23 verbose #9707 > > | _ => listm.rev acc
00:08:23 verbose #9708 > > loop [[]] xs ys
00:08:23 verbose #9709 > >
00:08:23 verbose #9710 > > inl zip_with_ fn xs ys =
00:08:23 verbose #9711 > > let rec loop acc xs ys =
00:08:23 verbose #9712 > > match xs, ys with
00:08:23 verbose #9713 > > | Cons (x, xs), Cons (y, ys) =>
00:08:23 verbose #9714 > > loop (fn x y :: acc) xs ys
00:08:23 verbose #9715 > > | _ => listm.rev acc
00:08:23 verbose #9716 > > loop [[]] xs ys
00:08:23 verbose #9717 > >
00:08:23 verbose #9718 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9719 > > //// test
00:08:23 verbose #9720 > >
00:08:23 verbose #9721 > > ([[ 1i32; 2; 3 ]], [[ 4; 5; 6 ]])
00:08:23 verbose #9722 > > ||> zip_with (+)
00:08:23 verbose #9723 > > |> _assert_eq [[ 5; 7; 9 ]]
00:08:23 verbose #9724 > >
00:08:23 verbose #9725 > > ╭─[ 77.23ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:23 verbose #9726 > > │ assert_eq / actual: UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))) / expected: UH0_1 │
00:08:23 verbose #9727 > > │ (5, UH0_1 (7, UH0_1 (9, UH0_0))) │
00:08:23 verbose #9728 > > │ │
00:08:23 verbose #9729 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9730 > >
00:08:23 verbose #9731 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:23 verbose #9732 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:23 verbose #9733 > > │ ## zip │
00:08:23 verbose #9734 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:23 verbose #9735 > >
00:08:23 verbose #9736 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9737 > > inl zip xs ys =
00:08:23 verbose #9738 > > zip_with pair xs ys
00:08:23 verbose #9739 > >
00:08:23 verbose #9740 > > inl zip_ xs ys =
00:08:23 verbose #9741 > > zip_with_ pair xs ys
00:08:23 verbose #9742 > >
00:08:23 verbose #9743 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:23 verbose #9744 > > //// test
00:08:23 verbose #9745 > >
00:08:23 verbose #9746 > > ([[ 1i32; 2; 3 ]], [[ 4i32; 5; 6 ]])
00:08:23 verbose #9747 > > ||> zip
00:08:23 verbose #9748 > > |> _assert_eq [[ 1, 4; 2, 5; 3, 6 ]]
00:08:24 verbose #9749 > >
00:08:24 verbose #9750 > > ╭─[ 136.18ms - stdout ]────────────────────────────────────────────────────────╮
00:08:24 verbose #9751 > > │ assert_eq / actual: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) / │
00:08:24 verbose #9752 > > │ expected: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) │
00:08:24 verbose #9753 > > │ │
00:08:24 verbose #9754 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9755 > >
00:08:24 verbose #9756 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:24 verbose #9757 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:24 verbose #9758 > > │ ## indexed │
00:08:24 verbose #9759 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9760 > >
00:08:24 verbose #9761 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9762 > > inl indexed list =
00:08:24 verbose #9763 > > (([[]], 0), list)
00:08:24 verbose #9764 > > ||> listm.fold fun (acc, i) x =>
00:08:24 verbose #9765 > > (i, x) :: acc, i + 1
00:08:24 verbose #9766 > > |> fst
00:08:24 verbose #9767 > > |> listm.rev
00:08:24 verbose #9768 > >
00:08:24 verbose #9769 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9770 > > //// test
00:08:24 verbose #9771 > >
00:08:24 verbose #9772 > > listm.init 5i32 ((*) 2)
00:08:24 verbose #9773 > > |> indexed
00:08:24 verbose #9774 > > |> _assert_eq [[ 0i32, 0; 1, 2; 2, 4; 3, 6; 4, 8 ]]
00:08:24 verbose #9775 > >
00:08:24 verbose #9776 > > ╭─[ 86.28ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:24 verbose #9777 > > │ assert_eq / actual: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, UH0_1 (3, 6, │
00:08:24 verbose #9778 > > │ UH0_1 (4, 8, UH0_0))))) / expected: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, │
00:08:24 verbose #9779 > > │ UH0_1 (3, 6, UH0_1 (4, 8, UH0_0))))) │
00:08:24 verbose #9780 > > │ │
00:08:24 verbose #9781 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9782 > >
00:08:24 verbose #9783 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:24 verbose #9784 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:24 verbose #9785 > > │ ## group_by │
00:08:24 verbose #9786 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9787 > >
00:08:24 verbose #9788 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9789 > > inl group_by fn list =
00:08:24 verbose #9790 > > (list, [[]])
00:08:24 verbose #9791 > > ||> listm.foldBack fun x acc =>
00:08:24 verbose #9792 > > inl xk = fn x
00:08:24 verbose #9793 > > inl found, new_acc =
00:08:24 verbose #9794 > > ((false, [[]]), acc)
00:08:24 verbose #9795 > > ||> listm.fold fun (found, acc') (k, xs) =>
00:08:24 verbose #9796 > > if k = xk
00:08:24 verbose #9797 > > then true, (k, x :: xs) :: acc'
00:08:24 verbose #9798 > > else found, (k, xs) :: acc'
00:08:24 verbose #9799 > > if found
00:08:24 verbose #9800 > > then new_acc
00:08:24 verbose #9801 > > else (xk, [[ x ]]) :: new_acc
00:08:24 verbose #9802 > >
00:08:24 verbose #9803 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9804 > > //// test
00:08:24 verbose #9805 > >
00:08:24 verbose #9806 > > listm.init 10i32 id
00:08:24 verbose #9807 > > |> group_by (fun x => x % 2 = 0)
00:08:24 verbose #9808 > > |> _assert_eq [[ true, [[ 0; 2; 4; 6; 8 ]]; false, [[ 1; 3; 5; 7; 9 ]] ]]
00:08:24 verbose #9809 > >
00:08:24 verbose #9810 > > ╭─[ 127.78ms - stdout ]────────────────────────────────────────────────────────╮
00:08:24 verbose #9811 > > │ assert_eq / actual: UH1_1 │
00:08:24 verbose #9812 > > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │
00:08:24 verbose #9813 > > │ UH1_1 │
00:08:24 verbose #9814 > > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │
00:08:24 verbose #9815 > > │ UH1_0)) / expected: UH1_1 │
00:08:24 verbose #9816 > > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │
00:08:24 verbose #9817 > > │ UH1_1 │
00:08:24 verbose #9818 > > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │
00:08:24 verbose #9819 > > │ UH1_0)) │
00:08:24 verbose #9820 > > │ │
00:08:24 verbose #9821 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9822 > >
00:08:24 verbose #9823 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:24 verbose #9824 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:24 verbose #9825 > > │ ## forall' │
00:08:24 verbose #9826 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9827 > >
00:08:24 verbose #9828 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9829 > > inl forall' fn (head :: tail) =
00:08:24 verbose #9830 > > (true, tail)
00:08:24 verbose #9831 > > ||> listm.fold fun acc x =>
00:08:24 verbose #9832 > > acc && x = head
00:08:24 verbose #9833 > >
00:08:24 verbose #9834 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9835 > > //// test
00:08:24 verbose #9836 > >
00:08:24 verbose #9837 > > [[ 1i32; 1; 1; 1; 1 ]]
00:08:24 verbose #9838 > > |> forall' ((=) 1i32)
00:08:24 verbose #9839 > > |> _assert_eq true
00:08:24 verbose #9840 > >
00:08:24 verbose #9841 > > ╭─[ 43.06ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:24 verbose #9842 > > │ assert_eq / actual: true / expected: true │
00:08:24 verbose #9843 > > │ │
00:08:24 verbose #9844 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9845 > >
00:08:24 verbose #9846 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:24 verbose #9847 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:24 verbose #9848 > > │ ## last │
00:08:24 verbose #9849 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9850 > >
00:08:24 verbose #9851 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9852 > > inl last list =
00:08:24 verbose #9853 > > list
00:08:24 verbose #9854 > > |> listm.rev
00:08:24 verbose #9855 > > |> item 0i32
00:08:24 verbose #9856 > >
00:08:24 verbose #9857 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9858 > > //// test
00:08:24 verbose #9859 > >
00:08:24 verbose #9860 > > listm.init 10i32 id
00:08:24 verbose #9861 > > |> last
00:08:24 verbose #9862 > > |> _assert_eq 9
00:08:24 verbose #9863 > >
00:08:24 verbose #9864 > > ╭─[ 34.64ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:24 verbose #9865 > > │ assert_eq / actual: 9 / expected: 9 │
00:08:24 verbose #9866 > > │ │
00:08:24 verbose #9867 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9868 > >
00:08:24 verbose #9869 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:24 verbose #9870 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:24 verbose #9871 > > │ ## try_pick │
00:08:24 verbose #9872 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9873 > >
00:08:24 verbose #9874 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9875 > > inl try_pick fn list =
00:08:24 verbose #9876 > > inl rec body fn = function
00:08:24 verbose #9877 > > | [[]] => None
00:08:24 verbose #9878 > > | x :: xs =>
00:08:24 verbose #9879 > > match fn x with
00:08:24 verbose #9880 > > | Some y => Some y
00:08:24 verbose #9881 > > | None => loop xs
00:08:24 verbose #9882 > > and inl loop list =
00:08:24 verbose #9883 > > if var_is list |> not
00:08:24 verbose #9884 > > then body fn list
00:08:24 verbose #9885 > > else
00:08:24 verbose #9886 > > inl fn = join fn
00:08:24 verbose #9887 > > inl list = dyn list
00:08:24 verbose #9888 > > join body fn list
00:08:24 verbose #9889 > > loop list
00:08:24 verbose #9890 > >
00:08:24 verbose #9891 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:24 verbose #9892 > > //// test
00:08:24 verbose #9893 > >
00:08:24 verbose #9894 > > listm.init 10i32 id
00:08:24 verbose #9895 > > |> try_pick (fun x => if x = 5i32 then Some x else None)
00:08:24 verbose #9896 > > |> _assert_eq (Some 5i32)
00:08:24 verbose #9897 > >
00:08:24 verbose #9898 > > ╭─[ 78.87ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:24 verbose #9899 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:08:24 verbose #9900 > > │ │
00:08:24 verbose #9901 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:24 verbose #9902 > 00:00:13 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 29736
00:08:24 verbose #9903 > 00:00:13 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:08:27 verbose #9904 > 00:00:16 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb to html
00:08:27 verbose #9905 > 00:00:16 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:08:27 verbose #9906 > 00:00:16 verbose #7 ! validate(nb)
00:08:29 verbose #9907 > 00:00:18 verbose #8 ! [NbConvertApp] Writing 368247 bytes to c:\home\git\polyglot\lib\spiral\listm'.dib.html
00:08:30 verbose #9908 > 00:00:18 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643
00:08:30 verbose #9909 > 00:00:18 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643
00:08:30 verbose #9910 > 00:00:18 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:08:31 verbose #9911 > 00:00:20 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:08:31 verbose #9912 > 00:00:20 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:08:32 verbose #9913 > 00:00:20 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 30438
00:08:32 debug #9914 execute_with_options_async / exit_code: 0 / output.Length: 34059
00:08:32 debug #18 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path listm'.dib --retries 3
00:08:32 debug #9915 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path util.dib --retries 3",
[||], None, None, true, None)
00:08:32 verbose #9916 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "util.dib", "--retries", "3"])
00:08:32 verbose #9917 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/util.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/util.dib" --output-path "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:08:34 verbose #9918 > >
00:08:34 verbose #9919 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:35 verbose #9920 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:35 verbose #9921 > > │ # util │
00:08:35 verbose #9922 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:35 verbose #9923 > >
00:08:35 verbose #9924 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:35 verbose #9925 > > //// test
00:08:35 verbose #9926 > >
00:08:35 verbose #9927 > > open testing
00:08:35 verbose #9928 > >
00:08:35 verbose #9929 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:08:35 verbose #9930 > > #r
00:08:35 verbose #9931 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:08:35 verbose #9932 > > otNet.Interactive.Spiral.dll"
00:08:35 verbose #9933 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:08:35 verbose #9934 > > #r
00:08:35 verbose #9935 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:08:35 verbose #9936 > > otNet.Interactive.dll"
00:08:35 verbose #9937 > > open type Microsoft.DotNet.Interactive.Kernel
00:08:40 verbose #9938 > >
00:08:40 verbose #9939 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:40 verbose #9940 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:40 verbose #9941 > > │ ## ski │
00:08:40 verbose #9942 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:40 verbose #9943 > >
00:08:40 verbose #9944 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:40 verbose #9945 > > union rec ski =
00:08:40 verbose #9946 > > | I
00:08:40 verbose #9947 > > | K
00:08:40 verbose #9948 > > | S
00:08:40 verbose #9949 > > | App : ski * ski
00:08:40 verbose #9950 > >
00:08:40 verbose #9951 > > inl rec eval ski =
00:08:40 verbose #9952 > > match ski with
00:08:40 verbose #9953 > > | App (App (K, x), y) => eval x
00:08:40 verbose #9954 > > | App (App (App (S, x), y), z) => eval (App (App (x, z), App (y, z)))
00:08:40 verbose #9955 > > | App (I, x) => eval x
00:08:40 verbose #9956 > > | App (K, x) => App (K, eval x)
00:08:40 verbose #9957 > > | App (f, x) => eval (App (eval f, x))
00:08:40 verbose #9958 > > | _ => ski
00:08:40 verbose #9959 > >
00:08:40 verbose #9960 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:40 verbose #9961 > > //// test
00:08:40 verbose #9962 > >
00:08:40 verbose #9963 > > eval I
00:08:40 verbose #9964 > > |> _assert_eq I
00:08:40 verbose #9965 > >
00:08:40 verbose #9966 > > eval (App (I, I))
00:08:40 verbose #9967 > > |> _assert_eq I
00:08:40 verbose #9968 > >
00:08:40 verbose #9969 > > eval (App (I, App (I, I)))
00:08:40 verbose #9970 > > |> _assert_eq I
00:08:40 verbose #9971 > >
00:08:40 verbose #9972 > > eval (App (App (I, I), I))
00:08:40 verbose #9973 > > |> _assert_eq I
00:08:40 verbose #9974 > >
00:08:40 verbose #9975 > > eval (App (App (App (I, I), I), I))
00:08:40 verbose #9976 > > |> _assert_eq I
00:08:40 verbose #9977 > >
00:08:40 verbose #9978 > > eval K
00:08:40 verbose #9979 > > |> _assert_eq K
00:08:40 verbose #9980 > >
00:08:40 verbose #9981 > > eval (App (K, I))
00:08:40 verbose #9982 > > |> _assert_eq (App (K, I))
00:08:40 verbose #9983 > >
00:08:40 verbose #9984 > > eval (App (K, K))
00:08:40 verbose #9985 > > |> _assert_eq (App (K, K))
00:08:40 verbose #9986 > >
00:08:40 verbose #9987 > > eval (App (App (K, I), K))
00:08:40 verbose #9988 > > |> _assert_eq I
00:08:40 verbose #9989 > >
00:08:40 verbose #9990 > > eval (App (App (K, K), I))
00:08:40 verbose #9991 > > |> _assert_eq K
00:08:40 verbose #9992 > >
00:08:40 verbose #9993 > > eval (App (App (App (App (K, K), I), S), K))
00:08:40 verbose #9994 > > |> _assert_eq S
00:08:40 verbose #9995 > >
00:08:40 verbose #9996 > > eval S
00:08:40 verbose #9997 > > |> _assert_eq S
00:08:40 verbose #9998 > >
00:08:40 verbose #9999 > > eval (App (App (App (S, I), I), I))
00:08:40 verbose #10000 > > |> _assert_eq I
00:08:40 verbose #10001 > >
00:08:40 verbose #10002 > > eval (App (App (App (S, K), K), I))
00:08:40 verbose #10003 > > |> _assert_eq I
00:08:40 verbose #10004 > >
00:08:40 verbose #10005 > > eval (App (App (App (S, K), I), (App (App (K, I), S))))
00:08:40 verbose #10006 > > |> _assert_eq I
00:08:40 verbose #10007 > >
00:08:40 verbose #10008 > > eval (App (App (K, S), App (I, App (App (App (S, K), S), I))))
00:08:40 verbose #10009 > > |> _assert_eq S
00:08:40 verbose #10010 > >
00:08:40 verbose #10011 > > eval (App (App (App (S, K), I), K))
00:08:40 verbose #10012 > > |> _assert_eq K
00:08:41 verbose #10013 > >
00:08:41 verbose #10014 > > ╭─[ 1.44s - stdout ]───────────────────────────────────────────────────────────╮
00:08:41 verbose #10015 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10016 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10017 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10018 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10019 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10020 > > │ assert_eq / actual: UH0_1 / expected: UH0_1 │
00:08:41 verbose #10021 > > │ assert_eq / actual: UH0_3 (UH0_1, UH0_0) / expected: UH0_3 (UH0_1, UH0_0) │
00:08:41 verbose #10022 > > │ assert_eq / actual: UH0_3 (UH0_1, UH0_1) / expected: UH0_3 (UH0_1, UH0_1) │
00:08:41 verbose #10023 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10024 > > │ assert_eq / actual: UH0_1 / expected: UH0_1 │
00:08:41 verbose #10025 > > │ assert_eq / actual: UH0_2 / expected: UH0_2 │
00:08:41 verbose #10026 > > │ assert_eq / actual: UH0_2 / expected: UH0_2 │
00:08:41 verbose #10027 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10028 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10029 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:08:41 verbose #10030 > > │ assert_eq / actual: UH0_2 / expected: UH0_2 │
00:08:41 verbose #10031 > > │ assert_eq / actual: UH0_1 / expected: UH0_1 │
00:08:41 verbose #10032 > > │ │
00:08:41 verbose #10033 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:41 verbose #10034 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 4096
00:08:41 verbose #10035 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/util.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:08:44 verbose #10036 > 00:00:12 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/util.dib.ipynb to html
00:08:44 verbose #10037 > 00:00:12 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:08:44 verbose #10038 > 00:00:12 verbose #7 ! validate(nb)
00:08:46 verbose #10039 > 00:00:14 verbose #8 ! [NbConvertApp] Writing 284191 bytes to c:\home\git\polyglot\lib\spiral\util.dib.html
00:08:46 verbose #10040 > 00:00:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639
00:08:46 verbose #10041 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639
00:08:46 verbose #10042 > 00:00:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:08:47 verbose #10043 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:08:47 verbose #10044 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:08:48 verbose #10045 > 00:00:16 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 4794
00:08:48 debug #10046 execute_with_options_async / exit_code: 0 / output.Length: 7235
00:08:48 debug #19 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path util.dib --retries 3
00:08:48 debug #10047 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path stream.dib --retries 3",
[||], None, None, true, None)
00:08:48 verbose #10048 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "stream.dib", "--retries", "3"])
00:08:48 verbose #10049 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/stream.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/stream.dib" --output-path "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:08:51 verbose #10050 > >
00:08:51 verbose #10051 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:51 verbose #10052 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:51 verbose #10053 > > │ # stream │
00:08:51 verbose #10054 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:51 verbose #10055 > >
00:08:51 verbose #10056 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:51 verbose #10057 > > open rust_operators
00:08:51 verbose #10058 > >
00:08:51 verbose #10059 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:08:51 verbose #10060 > > #r
00:08:51 verbose #10061 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:08:51 verbose #10062 > > otNet.Interactive.Spiral.dll"
00:08:51 verbose #10063 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:08:51 verbose #10064 > > #r
00:08:51 verbose #10065 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:08:51 verbose #10066 > > otNet.Interactive.dll"
00:08:51 verbose #10067 > > open type Microsoft.DotNet.Interactive.Kernel
00:08:58 verbose #10068 > >
00:08:58 verbose #10069 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10070 > > //// test
00:08:58 verbose #10071 > >
00:08:58 verbose #10072 > > open testing
00:08:58 verbose #10073 > >
00:08:58 verbose #10074 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10075 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10076 > > │ ## types │
00:08:58 verbose #10077 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10078 > >
00:08:58 verbose #10079 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10080 > > inl types () =
00:08:58 verbose #10081 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:08:58 verbose #10082 > > Fable.Core.Emit(\"async_std::io::BufReader<$0>\")>]]\n#endif\ntype
00:08:58 verbose #10083 > > async_std_io_BufReader<'T> = class end"
00:08:58 verbose #10084 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:08:58 verbose #10085 > > Fable.Core.Emit(\"std::io::BufReader<$0>\")>]]\n#endif\ntype
00:08:58 verbose #10086 > > std_io_BufReader<'T> = class end"
00:08:58 verbose #10087 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:08:58 verbose #10088 > > Fable.Core.Emit(\"std::io::Error\")>]]\n#endif\ntype std_io_Error = class end"
00:08:58 verbose #10089 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:08:58 verbose #10090 > > Fable.Core.Emit(\"std::io::Lines<$0>\")>]]\n#endif\ntype std_io_Lines<'T> =
00:08:58 verbose #10091 > > class end"
00:08:58 verbose #10092 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:08:58 verbose #10093 > > Fable.Core.Emit(\"encoding_rs_io::DecodeReaderBytes<$0, $1>\")>]]\n#endif\ntype
00:08:58 verbose #10094 > > encoding_rs_io_DecodeReaderBytes<'T, 'U> = class end"
00:08:58 verbose #10095 > >
00:08:58 verbose #10096 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10097 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10098 > > │ ## io_error │
00:08:58 verbose #10099 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10100 > >
00:08:58 verbose #10101 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10102 > > nominal io_error = $'std_io_Error'
00:08:58 verbose #10103 > >
00:08:58 verbose #10104 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10105 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10106 > > │ ## buf_reader │
00:08:58 verbose #10107 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10108 > >
00:08:58 verbose #10109 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10110 > > nominal buf_reader t = $'std_io_BufReader<`t>'
00:08:58 verbose #10111 > >
00:08:58 verbose #10112 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10113 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10114 > > │ ## async_buf_reader │
00:08:58 verbose #10115 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10116 > >
00:08:58 verbose #10117 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10118 > > nominal async_buf_reader t = $'async_std_io_BufReader<`t>'
00:08:58 verbose #10119 > >
00:08:58 verbose #10120 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10121 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10122 > > │ ## new_buf_reader │
00:08:58 verbose #10123 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10124 > >
00:08:58 verbose #10125 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10126 > > inl new_buf_reader forall t. (x : t) : buf_reader t =
00:08:58 verbose #10127 > > !\($'"std::io::BufReader::new(!x)"')
00:08:58 verbose #10128 > >
00:08:58 verbose #10129 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10130 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10131 > > │ ## lines │
00:08:58 verbose #10132 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10133 > >
00:08:58 verbose #10134 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10135 > > nominal lines t = $'std_io_Lines<`t>'
00:08:58 verbose #10136 > >
00:08:58 verbose #10137 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10138 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10139 > > │ ## buf_read_lines │
00:08:58 verbose #10140 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10141 > >
00:08:58 verbose #10142 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10143 > > inl buf_read_lines forall t. (buf_reader : buf_reader t) : lines (buf_reader t)
00:08:58 verbose #10144 > > =
00:08:58 verbose #10145 > > !\($'"std::io::BufRead::lines(!buf_reader)"')
00:08:58 verbose #10146 > >
00:08:58 verbose #10147 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10148 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10149 > > │ ## decode_reader_bytes │
00:08:58 verbose #10150 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10151 > >
00:08:58 verbose #10152 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10153 > > nominal decode_reader_bytes t u = $'encoding_rs_io_DecodeReaderBytes<`t, `u>'
00:08:58 verbose #10154 > >
00:08:58 verbose #10155 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10156 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10157 > > │ ## decode_reader_bytes_build │
00:08:58 verbose #10158 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10159 > >
00:08:58 verbose #10160 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10161 > > inl decode_reader_bytes_build forall t. (x : t) : decode_reader_bytes t (am'.vec
00:08:58 verbose #10162 > > u8) =
00:08:58 verbose #10163 > >
00:08:58 verbose #10164 > > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs:
00:08:58 verbose #10165 > > :UTF_8)).build(!x)"')
00:08:58 verbose #10166 > >
00:08:58 verbose #10167 > > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs:
00:08:58 verbose #10168 > > :UTF_8)).utf8_passthru(true).build(!x)"')
00:08:58 verbose #10169 > > !\\(x,
00:08:58 verbose #10170 > > $'"encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build($0)
00:08:58 verbose #10171 > > "')
00:08:58 verbose #10172 > > // !\($'"encoding_rs_io::DecodeReaderBytes::new(!x)"')
00:08:58 verbose #10173 > >
00:08:58 verbose #10174 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10175 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10176 > > │ ## buf_reader_read │
00:08:58 verbose #10177 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10178 > >
00:08:58 verbose #10179 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10180 > > inl buf_reader_read forall el dim. (slice : am'.slice' el dim) (buf_reader :
00:08:58 verbose #10181 > > buf_reader el) : resultm.result' unativeint io_error =
00:08:58 verbose #10182 > > (!\($'"true; let mut !slice = !slice"') : bool) |> ignore
00:08:58 verbose #10183 > > !\($'"std::io::Read::read(&mut !buf_reader, &mut !slice)"')
00:08:58 verbose #10184 > >
00:08:58 verbose #10185 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10186 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10187 > > │ ## io_read_by_ref │
00:08:58 verbose #10188 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10189 > >
00:08:58 verbose #10190 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10191 > > inl io_read_by_ref forall t. (lines : lines t) : lines t =
00:08:58 verbose #10192 > > !\\(lines, $'"std::io::Read::by_ref($0)"')
00:08:58 verbose #10193 > >
00:08:58 verbose #10194 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10195 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10196 > > │ ## stream │
00:08:58 verbose #10197 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10198 > >
00:08:58 verbose #10199 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10200 > > union rec stream t =
00:08:58 verbose #10201 > > | StreamCons : t * (() -> stream t)
00:08:58 verbose #10202 > > | StreamNil
00:08:58 verbose #10203 > >
00:08:58 verbose #10204 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10205 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10206 > > │ ## fold │
00:08:58 verbose #10207 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10208 > >
00:08:58 verbose #10209 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10210 > > inl fold fn init s =
00:08:58 verbose #10211 > > inl rec body acc = function
00:08:58 verbose #10212 > > | StreamCons (st, fn') => loop (fn acc st) (fn' ())
00:08:58 verbose #10213 > > | StreamNil => acc
00:08:58 verbose #10214 > > and inl loop acc = join_body body acc
00:08:58 verbose #10215 > > loop init s
00:08:58 verbose #10216 > >
00:08:58 verbose #10217 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10218 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10219 > > │ ## fold_back │
00:08:58 verbose #10220 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10221 > >
00:08:58 verbose #10222 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10223 > > inl fold_back fn s init =
00:08:58 verbose #10224 > > inl rec body acc = function
00:08:58 verbose #10225 > > | StreamCons (st, fn') => fn st (loop acc (fn' ()))
00:08:58 verbose #10226 > > | StreamNil => acc
00:08:58 verbose #10227 > > and inl loop acc = join_body body acc
00:08:58 verbose #10228 > > loop init s
00:08:58 verbose #10229 > >
00:08:58 verbose #10230 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10231 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10232 > > │ ## to_list │
00:08:58 verbose #10233 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10234 > >
00:08:58 verbose #10235 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10236 > > inl to_list s =
00:08:58 verbose #10237 > > (s, [[]])
00:08:58 verbose #10238 > > ||> fold_back fun x acc =>
00:08:58 verbose #10239 > > x :: acc
00:08:58 verbose #10240 > >
00:08:58 verbose #10241 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10242 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10243 > > │ ## rev │
00:08:58 verbose #10244 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10245 > >
00:08:58 verbose #10246 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10247 > > inl rev s =
00:08:58 verbose #10248 > > (StreamNil, s)
00:08:58 verbose #10249 > > ||> fold fun s x =>
00:08:58 verbose #10250 > > StreamCons (x, fun () => s)
00:08:58 verbose #10251 > >
00:08:58 verbose #10252 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:58 verbose #10253 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:58 verbose #10254 > > │ ## from_list │
00:08:58 verbose #10255 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:58 verbose #10256 > >
00:08:58 verbose #10257 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10258 > > inl from_list list =
00:08:58 verbose #10259 > > (list, StreamNil)
00:08:58 verbose #10260 > > ||> listm.foldBack fun x acc =>
00:08:58 verbose #10261 > > StreamCons (x, fun () => acc)
00:08:58 verbose #10262 > >
00:08:58 verbose #10263 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:58 verbose #10264 > > //// test
00:08:58 verbose #10265 > >
00:08:58 verbose #10266 > > listm.init 3i32 id
00:08:58 verbose #10267 > > |> from_list
00:08:58 verbose #10268 > > |> rev
00:08:58 verbose #10269 > > |> to_list
00:08:58 verbose #10270 > > |> _assert_eq [[ 2; 1; 0 ]]
00:08:59 verbose #10271 > >
00:08:59 verbose #10272 > > ╭─[ 1.20s - stdout ]───────────────────────────────────────────────────────────╮
00:08:59 verbose #10273 > > │ assert_eq / actual: UH0_1 (2, UH0_1 (1, UH0_1 (0, UH0_0))) / expected: UH0_1 │
00:08:59 verbose #10274 > > │ (2, UH0_1 (1, UH0_1 (0, UH0_0))) │
00:08:59 verbose #10275 > > │ │
00:08:59 verbose #10276 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:59 verbose #10277 > >
00:08:59 verbose #10278 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:59 verbose #10279 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:59 verbose #10280 > > │ ## try_item │
00:08:59 verbose #10281 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:59 verbose #10282 > >
00:08:59 verbose #10283 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:59 verbose #10284 > > inl try_item i s =
00:08:59 verbose #10285 > > inl rec body i = function
00:08:59 verbose #10286 > > | StreamCons (x, _) when i <= 0 => Some x
00:08:59 verbose #10287 > > | StreamCons (_, fn) => loop (i - 1) (fn ())
00:08:59 verbose #10288 > > | StreamNil => None
00:08:59 verbose #10289 > > and inl loop acc s' =
00:08:59 verbose #10290 > > match var_is acc, var_is s' with
00:08:59 verbose #10291 > > | false, false => body acc s'
00:08:59 verbose #10292 > > | _ =>
00:08:59 verbose #10293 > > inl acc = dyn acc
00:08:59 verbose #10294 > > inl s' = dyn s'
00:08:59 verbose #10295 > > join body acc s'
00:08:59 verbose #10296 > > loop i s
00:08:59 verbose #10297 > >
00:08:59 verbose #10298 > > inl item i =
00:08:59 verbose #10299 > > try_item i >> optionm.value
00:08:59 verbose #10300 > >
00:08:59 verbose #10301 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:59 verbose #10302 > > //// test
00:08:59 verbose #10303 > >
00:08:59 verbose #10304 > > listm.init 10i32 id
00:08:59 verbose #10305 > > |> from_list
00:08:59 verbose #10306 > > |> item 9i32
00:08:59 verbose #10307 > > |> _assert_eq 9
00:08:59 verbose #10308 > >
00:08:59 verbose #10309 > > ╭─[ 34.30ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:59 verbose #10310 > > │ assert_eq / actual: 9 / expected: 9 │
00:08:59 verbose #10311 > > │ │
00:08:59 verbose #10312 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:59 verbose #10313 > >
00:08:59 verbose #10314 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:59 verbose #10315 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:59 verbose #10316 > > │ ## new_infinite_stream │
00:08:59 verbose #10317 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:59 verbose #10318 > >
00:08:59 verbose #10319 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:59 verbose #10320 > > inl new_infinite_stream fn =
00:08:59 verbose #10321 > > inl rec loop n =
00:08:59 verbose #10322 > > StreamCons (fn n, fun () => loop (n + 1))
00:08:59 verbose #10323 > > loop 0
00:08:59 verbose #10324 > >
00:08:59 verbose #10325 > > inl new_infinite_stream_ fn =
00:08:59 verbose #10326 > > let rec loop n =
00:08:59 verbose #10327 > > StreamCons (fn n, fun () => loop (n + 1))
00:08:59 verbose #10328 > > loop 0
00:08:59 verbose #10329 > >
00:08:59 verbose #10330 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:59 verbose #10331 > > //// test
00:08:59 verbose #10332 > >
00:08:59 verbose #10333 > > new_infinite_stream print_and_return
00:08:59 verbose #10334 > > |> item 4i32
00:08:59 verbose #10335 > > |> _assert_eq 4i32
00:08:59 verbose #10336 > >
00:08:59 verbose #10337 > > ╭─[ 73.28ms - stdout ]─────────────────────────────────────────────────────────╮
00:08:59 verbose #10338 > > │ print_and_return / x: 0 │
00:08:59 verbose #10339 > > │ print_and_return / x: 1 │
00:08:59 verbose #10340 > > │ print_and_return / x: 2 │
00:08:59 verbose #10341 > > │ print_and_return / x: 3 │
00:08:59 verbose #10342 > > │ print_and_return / x: 4 │
00:08:59 verbose #10343 > > │ assert_eq / actual: 4 / expected: 4 │
00:08:59 verbose #10344 > > │ │
00:08:59 verbose #10345 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:59 verbose #10346 > >
00:08:59 verbose #10347 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:59 verbose #10348 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:59 verbose #10349 > > │ ## new_finite_stream │
00:08:59 verbose #10350 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:59 verbose #10351 > >
00:08:59 verbose #10352 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:59 verbose #10353 > > inl new_finite_stream fn max =
00:08:59 verbose #10354 > > inl rec loop n =
00:08:59 verbose #10355 > > if n >= max
00:08:59 verbose #10356 > > then StreamNil
00:08:59 verbose #10357 > > else StreamCons (fn n, fun () => loop (n + 1))
00:08:59 verbose #10358 > > loop 0
00:08:59 verbose #10359 > >
00:08:59 verbose #10360 > > ── markdown ────────────────────────────────────────────────────────────────────
00:08:59 verbose #10361 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:08:59 verbose #10362 > > │ ## memoize │
00:08:59 verbose #10363 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:08:59 verbose #10364 > >
00:08:59 verbose #10365 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:59 verbose #10366 > > union memoized_stream t =
00:08:59 verbose #10367 > > | NotComputed : () -> stream t
00:08:59 verbose #10368 > > | Computed : stream t
00:08:59 verbose #10369 > >
00:08:59 verbose #10370 > > inl memoize s =
00:08:59 verbose #10371 > > inl rec body s =
00:08:59 verbose #10372 > > inl state = mut (NotComputed s)
00:08:59 verbose #10373 > > fun () =>
00:08:59 verbose #10374 > > match *state with
00:08:59 verbose #10375 > > | Computed x => x
00:08:59 verbose #10376 > > | NotComputed fn =>
00:08:59 verbose #10377 > > inl new_state =
00:08:59 verbose #10378 > > match fn () with
00:08:59 verbose #10379 > > | StreamNil => StreamNil
00:08:59 verbose #10380 > > | StreamCons (x, fn) => StreamCons (x, loop fn)
00:08:59 verbose #10381 > > state <- Computed new_state
00:08:59 verbose #10382 > > new_state
00:08:59 verbose #10383 > > and inl loop s' = join_body_unit body s s'
00:08:59 verbose #10384 > > loop (fun () => s)
00:08:59 verbose #10385 > >
00:08:59 verbose #10386 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:08:59 verbose #10387 > > //// test
00:08:59 verbose #10388 > >
00:08:59 verbose #10389 > > inl memo_stream = new_finite_stream print_and_return 10 |> memoize
00:08:59 verbose #10390 > >
00:08:59 verbose #10391 > > memo_stream ()
00:08:59 verbose #10392 > > |> item 3i32
00:08:59 verbose #10393 > > |> _assert_eq 3i32
00:08:59 verbose #10394 > >
00:08:59 verbose #10395 > > memo_stream ()
00:08:59 verbose #10396 > > |> item 5i32
00:08:59 verbose #10397 > > |> _assert_eq 5i32
00:09:00 verbose #10398 > >
00:09:00 verbose #10399 > > ╭─[ 579.49ms - stdout ]────────────────────────────────────────────────────────╮
00:09:00 verbose #10400 > > │ print_and_return / x: 0 │
00:09:00 verbose #10401 > > │ print_and_return / x: 1 │
00:09:00 verbose #10402 > > │ print_and_return / x: 2 │
00:09:00 verbose #10403 > > │ print_and_return / x: 3 │
00:09:00 verbose #10404 > > │ assert_eq / actual: 3 / expected: 3 │
00:09:00 verbose #10405 > > │ print_and_return / x: 4 │
00:09:00 verbose #10406 > > │ print_and_return / x: 5 │
00:09:00 verbose #10407 > > │ assert_eq / actual: 5 / expected: 5 │
00:09:00 verbose #10408 > > │ │
00:09:00 verbose #10409 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10410 > >
00:09:00 verbose #10411 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10412 > > //// test
00:09:00 verbose #10413 > >
00:09:00 verbose #10414 > > inl memo_stream = new_infinite_stream_ print_and_return |> memoize
00:09:00 verbose #10415 > >
00:09:00 verbose #10416 > > memo_stream ()
00:09:00 verbose #10417 > > |> item 3i32
00:09:00 verbose #10418 > > |> _assert_eq 3i32
00:09:00 verbose #10419 > >
00:09:00 verbose #10420 > > memo_stream ()
00:09:00 verbose #10421 > > |> item 5i32
00:09:00 verbose #10422 > > |> _assert_eq 5i32
00:09:00 verbose #10423 > >
00:09:00 verbose #10424 > > ╭─[ 171.18ms - stdout ]────────────────────────────────────────────────────────╮
00:09:00 verbose #10425 > > │ print_and_return / x: 0 │
00:09:00 verbose #10426 > > │ print_and_return / x: 1 │
00:09:00 verbose #10427 > > │ print_and_return / x: 2 │
00:09:00 verbose #10428 > > │ print_and_return / x: 3 │
00:09:00 verbose #10429 > > │ assert_eq / actual: 3 / expected: 3 │
00:09:00 verbose #10430 > > │ print_and_return / x: 4 │
00:09:00 verbose #10431 > > │ print_and_return / x: 5 │
00:09:00 verbose #10432 > > │ assert_eq / actual: 5 / expected: 5 │
00:09:00 verbose #10433 > > │ │
00:09:00 verbose #10434 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10435 > >
00:09:00 verbose #10436 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:00 verbose #10437 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:00 verbose #10438 > > │ ## unfold │
00:09:00 verbose #10439 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10440 > >
00:09:00 verbose #10441 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10442 > > inl unfold f x0 =
00:09:00 verbose #10443 > > inl rec body x =
00:09:00 verbose #10444 > > match f x with
00:09:00 verbose #10445 > > | Some (x', y) => StreamCons (x', fun () => loop y)
00:09:00 verbose #10446 > > | None => StreamNil
00:09:00 verbose #10447 > > and inl loop x = join_body_unit body x0 x
00:09:00 verbose #10448 > > loop x0
00:09:00 verbose #10449 > >
00:09:00 verbose #10450 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:00 verbose #10451 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:00 verbose #10452 > > │ ## iterate │
00:09:00 verbose #10453 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10454 > >
00:09:00 verbose #10455 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10456 > > inl iterate f =
00:09:00 verbose #10457 > > unfold (fun x => Some (x, f x))
00:09:00 verbose #10458 > >
00:09:00 verbose #10459 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10460 > > //// test
00:09:00 verbose #10461 > >
00:09:00 verbose #10462 > > iterate ((*) 2) 1i32
00:09:00 verbose #10463 > > |> item 10i32
00:09:00 verbose #10464 > > |> _assert_eq 1024
00:09:00 verbose #10465 > >
00:09:00 verbose #10466 > > ╭─[ 54.32ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:00 verbose #10467 > > │ assert_eq / actual: 1024 / expected: 1024 │
00:09:00 verbose #10468 > > │ │
00:09:00 verbose #10469 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10470 > >
00:09:00 verbose #10471 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:00 verbose #10472 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:00 verbose #10473 > > │ ## take_while │
00:09:00 verbose #10474 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10475 > >
00:09:00 verbose #10476 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10477 > > inl take_while cond s =
00:09:00 verbose #10478 > > inl rec body i = function
00:09:00 verbose #10479 > > | StreamCons (st, fn) when cond st i => StreamCons (st, fun () => loop
00:09:00 verbose #10480 > > (i + 1) (fn ()))
00:09:00 verbose #10481 > > | _ => StreamNil
00:09:00 verbose #10482 > > and inl loop i = join_body body i
00:09:00 verbose #10483 > > loop 0 s
00:09:00 verbose #10484 > >
00:09:00 verbose #10485 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:00 verbose #10486 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:00 verbose #10487 > > │ ## sum │
00:09:00 verbose #10488 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10489 > >
00:09:00 verbose #10490 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10491 > > inl sum seq =
00:09:00 verbose #10492 > > seq |> fold (+) 0
00:09:00 verbose #10493 > >
00:09:00 verbose #10494 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10495 > > //// test
00:09:00 verbose #10496 > >
00:09:00 verbose #10497 > > listm.init 10i32 id
00:09:00 verbose #10498 > > |> from_list
00:09:00 verbose #10499 > > |> sum
00:09:00 verbose #10500 > > |> _assert_eq 45
00:09:00 verbose #10501 > >
00:09:00 verbose #10502 > > ╭─[ 62.53ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:00 verbose #10503 > > │ assert_eq / actual: 45 / expected: 45 │
00:09:00 verbose #10504 > > │ │
00:09:00 verbose #10505 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10506 > >
00:09:00 verbose #10507 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10508 > > //// test
00:09:00 verbose #10509 > >
00:09:00 verbose #10510 > > new_finite_stream print_and_return 10i32
00:09:00 verbose #10511 > > |> take_while (fun n (_ : i32) => n < 5)
00:09:00 verbose #10512 > > |> sum
00:09:00 verbose #10513 > > |> _assert_eq 10
00:09:00 verbose #10514 > >
00:09:00 verbose #10515 > > ╭─[ 77.84ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:00 verbose #10516 > > │ print_and_return / x: 0 │
00:09:00 verbose #10517 > > │ print_and_return / x: 1 │
00:09:00 verbose #10518 > > │ print_and_return / x: 2 │
00:09:00 verbose #10519 > > │ print_and_return / x: 3 │
00:09:00 verbose #10520 > > │ print_and_return / x: 4 │
00:09:00 verbose #10521 > > │ print_and_return / x: 5 │
00:09:00 verbose #10522 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:00 verbose #10523 > > │ │
00:09:00 verbose #10524 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:00 verbose #10525 > >
00:09:00 verbose #10526 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:00 verbose #10527 > > //// test
00:09:00 verbose #10528 > >
00:09:00 verbose #10529 > > new_infinite_stream print_and_return
00:09:00 verbose #10530 > > |> take_while (fun n (_ : i32) => n < 5i32)
00:09:00 verbose #10531 > > |> sum
00:09:00 verbose #10532 > > |> _assert_eq 10
00:09:01 verbose #10533 > >
00:09:01 verbose #10534 > > ╭─[ 65.71ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:01 verbose #10535 > > │ print_and_return / x: 0 │
00:09:01 verbose #10536 > > │ print_and_return / x: 1 │
00:09:01 verbose #10537 > > │ print_and_return / x: 2 │
00:09:01 verbose #10538 > > │ print_and_return / x: 3 │
00:09:01 verbose #10539 > > │ print_and_return / x: 4 │
00:09:01 verbose #10540 > > │ print_and_return / x: 5 │
00:09:01 verbose #10541 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:01 verbose #10542 > > │ │
00:09:01 verbose #10543 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10544 > >
00:09:01 verbose #10545 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10546 > > //// test
00:09:01 verbose #10547 > >
00:09:01 verbose #10548 > > iterate ((*) 6) 1i32
00:09:01 verbose #10549 > > |> take_while (fun _ i => i <= 7i32)
00:09:01 verbose #10550 > > |> to_list
00:09:01 verbose #10551 > > |> _assert_eq [[ 1i32; 6; 36; 216; 1296; 7776; 46656; 279936 ]]
00:09:01 verbose #10552 > >
00:09:01 verbose #10553 > > ╭─[ 169.33ms - stdout ]────────────────────────────────────────────────────────╮
00:09:01 verbose #10554 > > │ assert_eq / actual: UH0_1 │
00:09:01 verbose #10555 > > │ (1, │
00:09:01 verbose #10556 > > │ UH0_1 │
00:09:01 verbose #10557 > > │ (6, │
00:09:01 verbose #10558 > > │ UH0_1 │
00:09:01 verbose #10559 > > │ (36, │
00:09:01 verbose #10560 > > │ UH0_1 │
00:09:01 verbose #10561 > > │ (216, │
00:09:01 verbose #10562 > > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │
00:09:01 verbose #10563 > > │ UH0_0)))))))) / expected: UH0_1 │
00:09:01 verbose #10564 > > │ (1, │
00:09:01 verbose #10565 > > │ UH0_1 │
00:09:01 verbose #10566 > > │ (6, │
00:09:01 verbose #10567 > > │ UH0_1 │
00:09:01 verbose #10568 > > │ (36, │
00:09:01 verbose #10569 > > │ UH0_1 │
00:09:01 verbose #10570 > > │ (216, │
00:09:01 verbose #10571 > > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │
00:09:01 verbose #10572 > > │ UH0_0)))))))) │
00:09:01 verbose #10573 > > │ │
00:09:01 verbose #10574 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10575 > >
00:09:01 verbose #10576 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:01 verbose #10577 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:01 verbose #10578 > > │ ## indexed │
00:09:01 verbose #10579 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10580 > >
00:09:01 verbose #10581 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10582 > > inl indexed s =
00:09:01 verbose #10583 > > ((StreamNil, 0), s)
00:09:01 verbose #10584 > > ||> fold fun (acc, i) x =>
00:09:01 verbose #10585 > > StreamCons ((i, x), fun () => acc), i + 1
00:09:01 verbose #10586 > > |> fst
00:09:01 verbose #10587 > > |> rev
00:09:01 verbose #10588 > >
00:09:01 verbose #10589 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10590 > > //// test
00:09:01 verbose #10591 > >
00:09:01 verbose #10592 > > listm.init 10i32 ((*) 2)
00:09:01 verbose #10593 > > |> from_list
00:09:01 verbose #10594 > > |> indexed
00:09:01 verbose #10595 > > |> item 5i32
00:09:01 verbose #10596 > > |> _assert_eq (5i32, 10i32)
00:09:01 verbose #10597 > >
00:09:01 verbose #10598 > > ╭─[ 67.18ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:01 verbose #10599 > > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │
00:09:01 verbose #10600 > > │ │
00:09:01 verbose #10601 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10602 > >
00:09:01 verbose #10603 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:01 verbose #10604 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:01 verbose #10605 > > │ ## map │
00:09:01 verbose #10606 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10607 > >
00:09:01 verbose #10608 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10609 > > inl map fn s =
00:09:01 verbose #10610 > > (s, StreamNil)
00:09:01 verbose #10611 > > ||> fold_back fun x acc =>
00:09:01 verbose #10612 > > StreamCons (fn x, fun () => acc)
00:09:01 verbose #10613 > >
00:09:01 verbose #10614 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10615 > > //// test
00:09:01 verbose #10616 > >
00:09:01 verbose #10617 > > listm.init 10i32 id
00:09:01 verbose #10618 > > |> from_list
00:09:01 verbose #10619 > > |> map ((*) 2)
00:09:01 verbose #10620 > > |> item 5i32
00:09:01 verbose #10621 > > |> _assert_eq 10i32
00:09:01 verbose #10622 > >
00:09:01 verbose #10623 > > ╭─[ 57.47ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:01 verbose #10624 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:01 verbose #10625 > > │ │
00:09:01 verbose #10626 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10627 > >
00:09:01 verbose #10628 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:01 verbose #10629 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:01 verbose #10630 > > │ ## zip_with │
00:09:01 verbose #10631 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10632 > >
00:09:01 verbose #10633 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10634 > > inl zip_with fn s1 s2 =
00:09:01 verbose #10635 > > inl rec loop s1 s2 =
00:09:01 verbose #10636 > > match s1, s2 with
00:09:01 verbose #10637 > > | StreamCons (st1, fn1), StreamCons (st2, fn2) =>
00:09:01 verbose #10638 > > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ()))
00:09:01 verbose #10639 > > | StreamNil, _ | _, StreamNil => StreamNil
00:09:01 verbose #10640 > > loop s1 s2
00:09:01 verbose #10641 > >
00:09:01 verbose #10642 > > inl zip_with_ fn s1 s2 =
00:09:01 verbose #10643 > > let rec loop s1 s2 =
00:09:01 verbose #10644 > > match s1, s2 with
00:09:01 verbose #10645 > > | StreamCons (st1, fn1), StreamCons (st2, fn2) =>
00:09:01 verbose #10646 > > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ()))
00:09:01 verbose #10647 > > | StreamNil, _ | _, StreamNil => StreamNil
00:09:01 verbose #10648 > > loop s1 s2
00:09:01 verbose #10649 > >
00:09:01 verbose #10650 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10651 > > //// test
00:09:01 verbose #10652 > >
00:09:01 verbose #10653 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:09:01 verbose #10654 > > ||> zip_with (+)
00:09:01 verbose #10655 > > |> item 2i32
00:09:01 verbose #10656 > > |> _assert_eq 6
00:09:01 verbose #10657 > >
00:09:01 verbose #10658 > > ╭─[ 59.19ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:01 verbose #10659 > > │ assert_eq / actual: 6 / expected: 6 │
00:09:01 verbose #10660 > > │ │
00:09:01 verbose #10661 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10662 > >
00:09:01 verbose #10663 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:01 verbose #10664 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:01 verbose #10665 > > │ ## zip │
00:09:01 verbose #10666 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10667 > >
00:09:01 verbose #10668 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10669 > > inl zip s1 s2 =
00:09:01 verbose #10670 > > zip_with pair s1 s2
00:09:01 verbose #10671 > >
00:09:01 verbose #10672 > > inl zip_ s1 s2 =
00:09:01 verbose #10673 > > zip_with_ pair s1 s2
00:09:01 verbose #10674 > >
00:09:01 verbose #10675 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10676 > > //// test
00:09:01 verbose #10677 > >
00:09:01 verbose #10678 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:09:01 verbose #10679 > > ||> zip
00:09:01 verbose #10680 > > |> item 5i32
00:09:01 verbose #10681 > > |> _assert_eq (5, 10)
00:09:01 verbose #10682 > >
00:09:01 verbose #10683 > > ╭─[ 49.17ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:01 verbose #10684 > > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │
00:09:01 verbose #10685 > > │ │
00:09:01 verbose #10686 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10687 > >
00:09:01 verbose #10688 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:01 verbose #10689 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:01 verbose #10690 > > │ ## unzip │
00:09:01 verbose #10691 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10692 > >
00:09:01 verbose #10693 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10694 > > inl unzip s =
00:09:01 verbose #10695 > > inl rec body s =
00:09:01 verbose #10696 > > match s with
00:09:01 verbose #10697 > > | StreamCons ((x, y), fn) =>
00:09:01 verbose #10698 > > inl xs, ys = loop (fn ())
00:09:01 verbose #10699 > > StreamCons (x, fun () => xs), StreamCons (y, fun () => ys)
00:09:01 verbose #10700 > > | StreamNil => pair StreamNil StreamNil
00:09:01 verbose #10701 > > and inl loop x =
00:09:01 verbose #10702 > > if var_is x |> not
00:09:01 verbose #10703 > > then body x
00:09:01 verbose #10704 > > else
00:09:01 verbose #10705 > > inl x = dyn x
00:09:01 verbose #10706 > > join body x
00:09:01 verbose #10707 > > loop s
00:09:01 verbose #10708 > >
00:09:01 verbose #10709 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:01 verbose #10710 > > //// test
00:09:01 verbose #10711 > >
00:09:01 verbose #10712 > > listm.init 10i32 id
00:09:01 verbose #10713 > > |> listm.map (fun x => x, x)
00:09:01 verbose #10714 > > |> from_list
00:09:01 verbose #10715 > > |> unzip
00:09:01 verbose #10716 > > |> fun x, y =>
00:09:01 verbose #10717 > > x |> sum
00:09:01 verbose #10718 > > |> _assert_eq 45
00:09:01 verbose #10719 > >
00:09:01 verbose #10720 > > y |> sum
00:09:01 verbose #10721 > > |> _assert_eq 45
00:09:01 verbose #10722 > >
00:09:01 verbose #10723 > > ╭─[ 54.36ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:01 verbose #10724 > > │ assert_eq / actual: 45 / expected: 45 │
00:09:01 verbose #10725 > > │ assert_eq / actual: 45 / expected: 45 │
00:09:01 verbose #10726 > > │ │
00:09:01 verbose #10727 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:01 verbose #10728 > 00:00:13 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 31221
00:09:01 verbose #10729 > 00:00:13 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:09:04 verbose #10730 > 00:00:16 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/stream.dib.ipynb to html
00:09:04 verbose #10731 > 00:00:16 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:09:04 verbose #10732 > 00:00:16 verbose #7 ! validate(nb)
00:09:06 verbose #10733 > 00:00:18 verbose #8 ! [NbConvertApp] Writing 361139 bytes to c:\home\git\polyglot\lib\spiral\stream.dib.html
00:09:07 verbose #10734 > 00:00:18 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643
00:09:07 verbose #10735 > 00:00:18 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643
00:09:07 verbose #10736 > 00:00:18 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:09:08 verbose #10737 > 00:00:20 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:09:08 verbose #10738 > 00:00:20 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:09:08 verbose #10739 > 00:00:20 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 31923
00:09:08 debug #10740 execute_with_options_async / exit_code: 0 / output.Length: 35508
00:09:08 debug #20 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path stream.dib --retries 3
00:09:08 debug #10741 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path seq.dib --retries 3",
[||], None, None, true, None)
00:09:08 verbose #10742 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "seq.dib", "--retries", "3"])
00:09:08 verbose #10743 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/seq.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/seq.dib" --output-path "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:09:12 verbose #10744 > >
00:09:12 verbose #10745 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:12 verbose #10746 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:12 verbose #10747 > > │ # seq │
00:09:12 verbose #10748 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:12 verbose #10749 > >
00:09:12 verbose #10750 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:12 verbose #10751 > > //// test
00:09:12 verbose #10752 > >
00:09:12 verbose #10753 > > open testing
00:09:12 verbose #10754 > >
00:09:12 verbose #10755 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:09:12 verbose #10756 > > #r
00:09:12 verbose #10757 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:12 verbose #10758 > > otNet.Interactive.Spiral.dll"
00:09:12 verbose #10759 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:09:12 verbose #10760 > > #r
00:09:12 verbose #10761 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:12 verbose #10762 > > otNet.Interactive.dll"
00:09:12 verbose #10763 > > open type Microsoft.DotNet.Interactive.Kernel
00:09:17 verbose #10764 > >
00:09:17 verbose #10765 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:17 verbose #10766 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:17 verbose #10767 > > │ ## types │
00:09:17 verbose #10768 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:17 verbose #10769 > >
00:09:17 verbose #10770 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:17 verbose #10771 > > inl types () =
00:09:17 verbose #10772 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:17 verbose #10773 > > Fable.Core.Emit(\"core::iter::Fuse<$0>\")>]]\n#endif\ntype core_iter_Fuse<'T> =
00:09:17 verbose #10774 > > class end"
00:09:17 verbose #10775 > >
00:09:17 verbose #10776 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:17 verbose #10777 > > nominal fuse t = $'core_iter_Fuse<`t>'
00:09:17 verbose #10778 > >
00:09:17 verbose #10779 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:17 verbose #10780 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:17 verbose #10781 > > │ ## seq' │
00:09:17 verbose #10782 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:17 verbose #10783 > >
00:09:17 verbose #10784 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:17 verbose #10785 > > nominal seq' t = $'`t seq'
00:09:17 verbose #10786 > >
00:09:17 verbose #10787 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:17 verbose #10788 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:17 verbose #10789 > > │ ## of_array' │
00:09:17 verbose #10790 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:17 verbose #10791 > >
00:09:17 verbose #10792 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:17 verbose #10793 > > inl of_array' forall dim t. (items : a dim t) : seq' t =
00:09:17 verbose #10794 > > $'seq { for i = 0 to !items.Length - 1 do yield !items.[[i]] }'
00:09:17 verbose #10795 > >
00:09:17 verbose #10796 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:17 verbose #10797 > > //// test
00:09:17 verbose #10798 > >
00:09:17 verbose #10799 > > (a ;[[ "a"; "b" ]] : _ i32 _)
00:09:17 verbose #10800 > > |> of_array'
00:09:18 verbose #10801 > >
00:09:18 verbose #10802 > > ╭─[ 1.23s - return value ]─────────────────────────────────────────────────────╮
00:09:18 verbose #10803 > > │ <details open="open" class="dni-treeview"><summary><span │
00:09:18 verbose #10804 > > │ class="dni-code-hint"><code>[ a, b │
00:09:18 verbose #10805 > > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │
00:09:18 verbose #10806 > > │ CheckClose</td><td><div │
00:09:18 verbose #10807 > > │ class="dni-plaintext"><pre>False</pre></div></td></tr><tr><td>LastGenerated< │
00:09:18 verbose #10808 > > │ /td><td><div │
00:09:18 verbose #10809 > > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td>v2</td> │
00:09:18 verbose #10810 > > │ <td><div class="dni-plaintext"><pre>[ a, b │
00:09:18 verbose #10811 > > │ ]</pre></div></td></tr><tr><td>enum</td><td><div │
00:09:18 verbose #10812 > > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td>pc</td> │
00:09:18 verbose #10813 > > │ <td><div │
00:09:18 verbose #10814 > > │ class="dni-plaintext"><pre>0</pre></div></td></tr><tr><td>current</td><td><d │
00:09:18 verbose #10815 > > │ iv │
00:09:18 verbose #10816 > > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td><i>(val │
00:09:18 verbose #10817 > > │ ues)</i></td><td><div class="dni-plaintext"><pre>[ a, b │
00:09:18 verbose #10818 > > │ ]</pre></div></td></tr></tbody></table></div></details><style> │
00:09:18 verbose #10819 > > │ .dni-code-hint { │
00:09:18 verbose #10820 > > │ font-style: italic; │
00:09:18 verbose #10821 > > │ overflow: hidden; │
00:09:18 verbose #10822 > > │ white-space: nowrap; │
00:09:18 verbose #10823 > > │ } │
00:09:18 verbose #10824 > > │ .dni-treeview { │
00:09:18 verbose #10825 > > │ white-space: nowrap; │
00:09:18 verbose #10826 > > │ } │
00:09:18 verbose #10827 > > │ .dni-treeview td { │
00:09:18 verbose #10828 > > │ vertical-align: top; │
00:09:18 verbose #10829 > > │ text-align: start; │
00:09:18 verbose #10830 > > │ } │
00:09:18 verbose #10831 > > │ details.dni-treeview { │
00:09:18 verbose #10832 > > │ padding-left: 1em; │
00:09:18 verbose #10833 > > │ } │
00:09:18 verbose #10834 > > │ table td { │
00:09:18 verbose #10835 > > │ text-align: start; │
00:09:18 verbose #10836 > > │ } │
00:09:18 verbose #10837 > > │ table tr { │
00:09:18 verbose #10838 > > │ vertical-align: top; │
00:09:18 verbose #10839 > > │ margin: 0em 0px; │
00:09:18 verbose #10840 > > │ } │
00:09:18 verbose #10841 > > │ table tr td pre │
00:09:18 verbose #10842 > > │ { │
00:09:18 verbose #10843 > > │ vertical-align: top !important; │
00:09:18 verbose #10844 > > │ margin: 0em 0px !important; │
00:09:18 verbose #10845 > > │ } │
00:09:18 verbose #10846 > > │ table th { │
00:09:18 verbose #10847 > > │ text-align: start; │
00:09:18 verbose #10848 > > │ } │
00:09:18 verbose #10849 > > │ </style> │
00:09:18 verbose #10850 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:18 verbose #10851 > >
00:09:18 verbose #10852 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:18 verbose #10853 > > inl of_array forall dim t. (items : a dim t) : seq' t =
00:09:18 verbose #10854 > > items |> $'Seq.ofArray'
00:09:19 verbose #10855 > >
00:09:19 verbose #10856 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:19 verbose #10857 > > //// test
00:09:19 verbose #10858 > >
00:09:19 verbose #10859 > > (a ;[[ "a"; "b" ]] : _ i32 _)
00:09:19 verbose #10860 > > |> of_array
00:09:19 verbose #10861 > >
00:09:19 verbose #10862 > > ╭─[ 138.60ms - return value ]──────────────────────────────────────────────────╮
00:09:19 verbose #10863 > > │ <details open="open" class="dni-treeview"><summary><span │
00:09:19 verbose #10864 > > │ class="dni-code-hint"><code>[ a, b │
00:09:19 verbose #10865 > > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │
00:09:19 verbose #10866 > > │ f</td><td><details class="dni-treeview"><summary><span │
00:09:19 verbose #10867 > > │ class="dni-code-hint"><code>Microsoft.FSharp.Collections.SeqModule+OfArray@1 │
00:09:19 verbose #10868 > > │ 010[ │
00:09:19 verbose #10869 > > │ System.String]</code></span></summary><div><table><thead><tr></tr></thead><t │
00:09:19 verbose #10870 > > │ body><tr><td>source</td><td><div class="dni-plaintext"><pre>[ a, b │
00:09:19 verbose #10871 > > │ ]</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td><i> │
00:09:19 verbose #10872 > > │ (values)</i></td><td><div class="dni-plaintext"><pre>[ a, b │
00:09:19 verbose #10873 > > │ ]</pre></div></td></tr></tbody></table></div></details><style> │
00:09:19 verbose #10874 > > │ .dni-code-hint { │
00:09:19 verbose #10875 > > │ font-style: italic; │
00:09:19 verbose #10876 > > │ overflow: hidden; │
00:09:19 verbose #10877 > > │ white-space: nowrap; │
00:09:19 verbose #10878 > > │ } │
00:09:19 verbose #10879 > > │ .dni-treeview { │
00:09:19 verbose #10880 > > │ white-space: nowrap; │
00:09:19 verbose #10881 > > │ } │
00:09:19 verbose #10882 > > │ .dni-treeview td { │
00:09:19 verbose #10883 > > │ vertical-align: top; │
00:09:19 verbose #10884 > > │ text-align: start; │
00:09:19 verbose #10885 > > │ } │
00:09:19 verbose #10886 > > │ details.dni-treeview { │
00:09:19 verbose #10887 > > │ padding-left: 1em; │
00:09:19 verbose #10888 > > │ } │
00:09:19 verbose #10889 > > │ table td { │
00:09:19 verbose #10890 > > │ text-align: start; │
00:09:19 verbose #10891 > > │ } │
00:09:19 verbose #10892 > > │ table tr { │
00:09:19 verbose #10893 > > │ vertical-align: top; │
00:09:19 verbose #10894 > > │ margin: 0em 0px; │
00:09:19 verbose #10895 > > │ } │
00:09:19 verbose #10896 > > │ table tr td pre │
00:09:19 verbose #10897 > > │ { │
00:09:19 verbose #10898 > > │ vertical-align: top !important; │
00:09:19 verbose #10899 > > │ margin: 0em 0px !important; │
00:09:19 verbose #10900 > > │ } │
00:09:19 verbose #10901 > > │ table th { │
00:09:19 verbose #10902 > > │ text-align: start; │
00:09:19 verbose #10903 > > │ } │
00:09:19 verbose #10904 > > │ </style> │
00:09:19 verbose #10905 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:19 verbose #10906 > >
00:09:19 verbose #10907 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:19 verbose #10908 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:19 verbose #10909 > > │ ## to_array' │
00:09:19 verbose #10910 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:19 verbose #10911 > >
00:09:19 verbose #10912 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:19 verbose #10913 > > inl to_array' forall dim t. (items : seq' t) : a dim t =
00:09:19 verbose #10914 > > items |> $'Seq.toArray'
00:09:19 verbose #10915 > >
00:09:19 verbose #10916 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:19 verbose #10917 > > //// test
00:09:19 verbose #10918 > >
00:09:19 verbose #10919 > > (a ;[[ "a"; "b" ]] : _ i32 _)
00:09:19 verbose #10920 > > |> of_array'
00:09:19 verbose #10921 > > |> to_array'
00:09:19 verbose #10922 > > |> _assert_eq (a ;[[ "a"; "b" ]] : _ i32 _)
00:09:19 verbose #10923 > >
00:09:19 verbose #10924 > > ╭─[ 425.56ms - stdout ]────────────────────────────────────────────────────────╮
00:09:19 verbose #10925 > > │ assert_eq / actual: [|"a"; "b"|] / expected: [|"a"; "b"|] │
00:09:19 verbose #10926 > > │ │
00:09:19 verbose #10927 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:19 verbose #10928 > >
00:09:19 verbose #10929 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:19 verbose #10930 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:19 verbose #10931 > > │ ## of_list' │
00:09:19 verbose #10932 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:19 verbose #10933 > >
00:09:19 verbose #10934 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:19 verbose #10935 > > inl of_list' forall t. (items : listm'.list' t) : seq' t =
00:09:19 verbose #10936 > > $'seq { for i = 0 to !items.Length - 1 do yield !items.[[i]] }'
00:09:19 verbose #10937 > >
00:09:19 verbose #10938 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:19 verbose #10939 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:19 verbose #10940 > > │ ## to_list' │
00:09:19 verbose #10941 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:19 verbose #10942 > >
00:09:19 verbose #10943 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:19 verbose #10944 > > inl to_list' forall t. (items : seq' t) : listm'.list' t =
00:09:19 verbose #10945 > > items |> $'Seq.toList'
00:09:19 verbose #10946 > >
00:09:19 verbose #10947 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:19 verbose #10948 > > //// test
00:09:19 verbose #10949 > >
00:09:19 verbose #10950 > > (a ;[[ "a"; "b" ]] : _ i32 _)
00:09:19 verbose #10951 > > |> of_array
00:09:19 verbose #10952 > > |> to_list'
00:09:19 verbose #10953 > > |> listm'.unbox
00:09:19 verbose #10954 > > |> _assert_eq ([[ "a"; "b" ]])
00:09:20 verbose #10955 > >
00:09:20 verbose #10956 > > ╭─[ 649.61ms - stdout ]────────────────────────────────────────────────────────╮
00:09:20 verbose #10957 > > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │
00:09:20 verbose #10958 > > │ UH0_1 ("b", UH0_0)) │
00:09:20 verbose #10959 > > │ │
00:09:20 verbose #10960 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #10961 > >
00:09:20 verbose #10962 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #10963 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #10964 > > │ ## rev' │
00:09:20 verbose #10965 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #10966 > >
00:09:20 verbose #10967 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #10968 > > inl rev'' forall t u. (items : t) : seq' u =
00:09:20 verbose #10969 > > items |> $'Seq.rev'
00:09:20 verbose #10970 > >
00:09:20 verbose #10971 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #10972 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #10973 > > │ ## seq │
00:09:20 verbose #10974 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #10975 > >
00:09:20 verbose #10976 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #10977 > > type seq dim el = dim -> option el
00:09:20 verbose #10978 > >
00:09:20 verbose #10979 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #10980 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #10981 > > │ ## try_item │
00:09:20 verbose #10982 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #10983 > >
00:09:20 verbose #10984 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #10985 > > inl try_item n s =
00:09:20 verbose #10986 > > n |> s
00:09:20 verbose #10987 > >
00:09:20 verbose #10988 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #10989 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #10990 > > │ ## from_list │
00:09:20 verbose #10991 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #10992 > >
00:09:20 verbose #10993 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #10994 > > inl from_list list =
00:09:20 verbose #10995 > > fun n =>
00:09:20 verbose #10996 > > list
00:09:20 verbose #10997 > > |> listm'.try_item n
00:09:20 verbose #10998 > >
00:09:20 verbose #10999 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11000 > > //// test
00:09:20 verbose #11001 > >
00:09:20 verbose #11002 > > listm.init 10i32 print_and_return
00:09:20 verbose #11003 > > |> from_list
00:09:20 verbose #11004 > > |> try_item 5i32
00:09:20 verbose #11005 > > |> _assert_eq (Some 5i32)
00:09:20 verbose #11006 > >
00:09:20 verbose #11007 > > ╭─[ 131.37ms - stdout ]────────────────────────────────────────────────────────╮
00:09:20 verbose #11008 > > │ print_and_return / x: 0 │
00:09:20 verbose #11009 > > │ print_and_return / x: 1 │
00:09:20 verbose #11010 > > │ print_and_return / x: 2 │
00:09:20 verbose #11011 > > │ print_and_return / x: 3 │
00:09:20 verbose #11012 > > │ print_and_return / x: 4 │
00:09:20 verbose #11013 > > │ print_and_return / x: 5 │
00:09:20 verbose #11014 > > │ print_and_return / x: 6 │
00:09:20 verbose #11015 > > │ print_and_return / x: 7 │
00:09:20 verbose #11016 > > │ print_and_return / x: 8 │
00:09:20 verbose #11017 > > │ print_and_return / x: 9 │
00:09:20 verbose #11018 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:09:20 verbose #11019 > > │ │
00:09:20 verbose #11020 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11021 > >
00:09:20 verbose #11022 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #11023 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #11024 > > │ ## map │
00:09:20 verbose #11025 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11026 > >
00:09:20 verbose #11027 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11028 > > inl map fn s =
00:09:20 verbose #11029 > > fun n =>
00:09:20 verbose #11030 > > n
00:09:20 verbose #11031 > > |> s
00:09:20 verbose #11032 > > |> optionm.map fn
00:09:20 verbose #11033 > >
00:09:20 verbose #11034 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11035 > > //// test
00:09:20 verbose #11036 > >
00:09:20 verbose #11037 > > listm.init 10i32 id
00:09:20 verbose #11038 > > |> from_list
00:09:20 verbose #11039 > > |> map ((*) 2)
00:09:20 verbose #11040 > > |> try_item 5i32
00:09:20 verbose #11041 > > |> _assert_eq (Some 10i32)
00:09:20 verbose #11042 > >
00:09:20 verbose #11043 > > ╭─[ 71.22ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:20 verbose #11044 > > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │
00:09:20 verbose #11045 > > │ │
00:09:20 verbose #11046 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11047 > >
00:09:20 verbose #11048 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #11049 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #11050 > > │ ## mapi │
00:09:20 verbose #11051 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11052 > >
00:09:20 verbose #11053 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11054 > > inl mapi fn s =
00:09:20 verbose #11055 > > fun n =>
00:09:20 verbose #11056 > > n
00:09:20 verbose #11057 > > |> s
00:09:20 verbose #11058 > > |> optionm.map (fn n)
00:09:20 verbose #11059 > >
00:09:20 verbose #11060 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11061 > > //// test
00:09:20 verbose #11062 > >
00:09:20 verbose #11063 > > listm.init 10i32 print_and_return
00:09:20 verbose #11064 > > |> from_list
00:09:20 verbose #11065 > > |> mapi fun i x => i + x
00:09:20 verbose #11066 > > |> try_item 5i32
00:09:20 verbose #11067 > > |> _assert_eq (Some 10i32)
00:09:20 verbose #11068 > >
00:09:20 verbose #11069 > > ╭─[ 89.22ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:20 verbose #11070 > > │ print_and_return / x: 0 │
00:09:20 verbose #11071 > > │ print_and_return / x: 1 │
00:09:20 verbose #11072 > > │ print_and_return / x: 2 │
00:09:20 verbose #11073 > > │ print_and_return / x: 3 │
00:09:20 verbose #11074 > > │ print_and_return / x: 4 │
00:09:20 verbose #11075 > > │ print_and_return / x: 5 │
00:09:20 verbose #11076 > > │ print_and_return / x: 6 │
00:09:20 verbose #11077 > > │ print_and_return / x: 7 │
00:09:20 verbose #11078 > > │ print_and_return / x: 8 │
00:09:20 verbose #11079 > > │ print_and_return / x: 9 │
00:09:20 verbose #11080 > > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │
00:09:20 verbose #11081 > > │ │
00:09:20 verbose #11082 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11083 > >
00:09:20 verbose #11084 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #11085 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #11086 > > │ ## choose │
00:09:20 verbose #11087 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11088 > >
00:09:20 verbose #11089 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11090 > > inl choose forall dim {number} t u. (fn : t -> option u) (s : seq dim t) : seq
00:09:20 verbose #11091 > > dim u =
00:09:20 verbose #11092 > > fun n =>
00:09:20 verbose #11093 > > inl rec body fn s i i' =
00:09:20 verbose #11094 > > match i |> s with
00:09:20 verbose #11095 > > | None => None
00:09:20 verbose #11096 > > | Some x =>
00:09:20 verbose #11097 > > match x |> fn with
00:09:20 verbose #11098 > > | Some x when n = i' => Some x
00:09:20 verbose #11099 > > | Some _ => loop (i + 1) (i' + 1)
00:09:20 verbose #11100 > > | _ => loop (i + 1) i'
00:09:20 verbose #11101 > > and inl loop i i' =
00:09:20 verbose #11102 > > if n |> var_is |> not
00:09:20 verbose #11103 > > then body fn s i i'
00:09:20 verbose #11104 > > else
00:09:20 verbose #11105 > > inl fn = join fn
00:09:20 verbose #11106 > > inl s = join s
00:09:20 verbose #11107 > > join body fn s i i'
00:09:20 verbose #11108 > > loop 0 0
00:09:20 verbose #11109 > >
00:09:20 verbose #11110 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11111 > > //// test
00:09:20 verbose #11112 > >
00:09:20 verbose #11113 > > listm.init 10i32 print_and_return
00:09:20 verbose #11114 > > |> from_list
00:09:20 verbose #11115 > > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:09:20 verbose #11116 > > |> try_item 1i32
00:09:20 verbose #11117 > > |> _assert_eq (Some 2i32)
00:09:20 verbose #11118 > >
00:09:20 verbose #11119 > > ╭─[ 108.11ms - stdout ]────────────────────────────────────────────────────────╮
00:09:20 verbose #11120 > > │ print_and_return / x: 0 │
00:09:20 verbose #11121 > > │ print_and_return / x: 1 │
00:09:20 verbose #11122 > > │ print_and_return / x: 2 │
00:09:20 verbose #11123 > > │ print_and_return / x: 3 │
00:09:20 verbose #11124 > > │ print_and_return / x: 4 │
00:09:20 verbose #11125 > > │ print_and_return / x: 5 │
00:09:20 verbose #11126 > > │ print_and_return / x: 6 │
00:09:20 verbose #11127 > > │ print_and_return / x: 7 │
00:09:20 verbose #11128 > > │ print_and_return / x: 8 │
00:09:20 verbose #11129 > > │ print_and_return / x: 9 │
00:09:20 verbose #11130 > > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │
00:09:20 verbose #11131 > > │ │
00:09:20 verbose #11132 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11133 > >
00:09:20 verbose #11134 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:20 verbose #11135 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:20 verbose #11136 > > │ ## indexed │
00:09:20 verbose #11137 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:20 verbose #11138 > >
00:09:20 verbose #11139 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11140 > > inl indexed s =
00:09:20 verbose #11141 > > s
00:09:20 verbose #11142 > > |> mapi fun i x =>
00:09:20 verbose #11143 > > i, x
00:09:20 verbose #11144 > >
00:09:20 verbose #11145 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:20 verbose #11146 > > //// test
00:09:20 verbose #11147 > >
00:09:20 verbose #11148 > > listm.init 10i32 ((*) 2)
00:09:20 verbose #11149 > > |> from_list
00:09:20 verbose #11150 > > |> indexed
00:09:20 verbose #11151 > > |> try_item 5i32
00:09:20 verbose #11152 > > |> _assert_eq (Some (5i32, 10i32))
00:09:21 verbose #11153 > >
00:09:21 verbose #11154 > > ╭─[ 73.83ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:21 verbose #11155 > > │ assert_eq / actual: US0_0 (5, 10) / expected: US0_0 (5, 10) │
00:09:21 verbose #11156 > > │ │
00:09:21 verbose #11157 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11158 > >
00:09:21 verbose #11159 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11160 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11161 > > │ ## zip │
00:09:21 verbose #11162 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11163 > >
00:09:21 verbose #11164 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11165 > > inl zip n seq1 seq2 =
00:09:21 verbose #11166 > > seq1 n, seq2 n
00:09:21 verbose #11167 > >
00:09:21 verbose #11168 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11169 > > //// test
00:09:21 verbose #11170 > >
00:09:21 verbose #11171 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:09:21 verbose #11172 > > ||> zip 5i32
00:09:21 verbose #11173 > > |> _assert_eq (Some 5, Some 10)
00:09:21 verbose #11174 > >
00:09:21 verbose #11175 > > ╭─[ 107.49ms - stdout ]────────────────────────────────────────────────────────╮
00:09:21 verbose #11176 > > │ assert_eq / actual: struct (US0_0 5, US0_0 10) / expected: struct (US0_0 5, │
00:09:21 verbose #11177 > > │ US0_0 10) │
00:09:21 verbose #11178 > > │ │
00:09:21 verbose #11179 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11180 > >
00:09:21 verbose #11181 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11182 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11183 > > │ ## zip_with │
00:09:21 verbose #11184 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11185 > >
00:09:21 verbose #11186 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11187 > > inl zip_with fn seq1 seq2 =
00:09:21 verbose #11188 > > fun n =>
00:09:21 verbose #11189 > > fn (seq1 n) (seq2 n)
00:09:21 verbose #11190 > >
00:09:21 verbose #11191 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11192 > > //// test
00:09:21 verbose #11193 > >
00:09:21 verbose #11194 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:09:21 verbose #11195 > > ||> zip_with (optionm'.choose (+))
00:09:21 verbose #11196 > > |> try_item 2i32
00:09:21 verbose #11197 > > |> _assert_eq (Some 6)
00:09:21 verbose #11198 > >
00:09:21 verbose #11199 > > ╭─[ 80.94ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:21 verbose #11200 > > │ assert_eq / actual: US0_0 6 / expected: US0_0 6 │
00:09:21 verbose #11201 > > │ │
00:09:21 verbose #11202 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11203 > >
00:09:21 verbose #11204 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11205 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11206 > > │ ## fold │
00:09:21 verbose #11207 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11208 > >
00:09:21 verbose #11209 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11210 > > inl fold fn init seq =
00:09:21 verbose #11211 > > inl rec loop acc n =
00:09:21 verbose #11212 > > match seq n with
00:09:21 verbose #11213 > > | Some x => loop (fn acc x) (n + 1)
00:09:21 verbose #11214 > > | None => acc
00:09:21 verbose #11215 > > loop init 0
00:09:21 verbose #11216 > >
00:09:21 verbose #11217 > > inl fold_ fn init seq =
00:09:21 verbose #11218 > > let rec loop acc n =
00:09:21 verbose #11219 > > match seq n with
00:09:21 verbose #11220 > > | Some x => loop (fn acc x) (n + 1)
00:09:21 verbose #11221 > > | None => acc
00:09:21 verbose #11222 > > loop init 0
00:09:21 verbose #11223 > >
00:09:21 verbose #11224 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11225 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11226 > > │ ## sum │
00:09:21 verbose #11227 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11228 > >
00:09:21 verbose #11229 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11230 > > inl sum seq =
00:09:21 verbose #11231 > > seq |> fold (+) 0
00:09:21 verbose #11232 > >
00:09:21 verbose #11233 > > inl sum_ seq =
00:09:21 verbose #11234 > > seq |> fold_ (+) 0
00:09:21 verbose #11235 > >
00:09:21 verbose #11236 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11237 > > //// test
00:09:21 verbose #11238 > >
00:09:21 verbose #11239 > > listm.init 10i32 id
00:09:21 verbose #11240 > > |> from_list
00:09:21 verbose #11241 > > |> fun f (n : i32) => f n
00:09:21 verbose #11242 > > |> sum
00:09:21 verbose #11243 > > |> _assert_eq 45
00:09:21 verbose #11244 > >
00:09:21 verbose #11245 > > ╭─[ 31.75ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:21 verbose #11246 > > │ assert_eq / actual: 45 / expected: 45 │
00:09:21 verbose #11247 > > │ │
00:09:21 verbose #11248 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11249 > >
00:09:21 verbose #11250 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11251 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11252 > > │ ## to_list │
00:09:21 verbose #11253 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11254 > >
00:09:21 verbose #11255 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11256 > > inl to_list seq =
00:09:21 verbose #11257 > > seq
00:09:21 verbose #11258 > > |> fold (fun acc x => x :: acc) [[]]
00:09:21 verbose #11259 > > |> listm.rev
00:09:21 verbose #11260 > >
00:09:21 verbose #11261 > > inl to_list_ seq =
00:09:21 verbose #11262 > > seq
00:09:21 verbose #11263 > > |> fold_ (fun acc x => x :: acc) [[]]
00:09:21 verbose #11264 > > |> listm.rev
00:09:21 verbose #11265 > >
00:09:21 verbose #11266 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11267 > > //// test
00:09:21 verbose #11268 > >
00:09:21 verbose #11269 > > listm.init 10i32 id
00:09:21 verbose #11270 > > |> from_list
00:09:21 verbose #11271 > > |> fun f (n : i32) => f n
00:09:21 verbose #11272 > > |> to_list
00:09:21 verbose #11273 > > |> _assert_eq (listm.init 10i32 id)
00:09:21 verbose #11274 > >
00:09:21 verbose #11275 > > ╭─[ 88.56ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:21 verbose #11276 > > │ assert_eq / actual: UH0_1 │
00:09:21 verbose #11277 > > │ (0, │
00:09:21 verbose #11278 > > │ UH0_1 │
00:09:21 verbose #11279 > > │ (1, │
00:09:21 verbose #11280 > > │ UH0_1 │
00:09:21 verbose #11281 > > │ (2, │
00:09:21 verbose #11282 > > │ UH0_1 │
00:09:21 verbose #11283 > > │ (3, │
00:09:21 verbose #11284 > > │ UH0_1 │
00:09:21 verbose #11285 > > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │
00:09:21 verbose #11286 > > │ UH0_0)))))))))) / expected: UH0_1 │
00:09:21 verbose #11287 > > │ (0, │
00:09:21 verbose #11288 > > │ UH0_1 │
00:09:21 verbose #11289 > > │ (1, │
00:09:21 verbose #11290 > > │ UH0_1 │
00:09:21 verbose #11291 > > │ (2, │
00:09:21 verbose #11292 > > │ UH0_1 │
00:09:21 verbose #11293 > > │ (3, │
00:09:21 verbose #11294 > > │ UH0_1 │
00:09:21 verbose #11295 > > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │
00:09:21 verbose #11296 > > │ UH0_0)))))))))) │
00:09:21 verbose #11297 > > │ │
00:09:21 verbose #11298 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11299 > >
00:09:21 verbose #11300 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11301 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11302 > > │ ## from_array │
00:09:21 verbose #11303 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11304 > >
00:09:21 verbose #11305 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11306 > > inl from_array forall dim {number; int} el. (array : a dim el) : seq dim el =
00:09:21 verbose #11307 > > fun n =>
00:09:21 verbose #11308 > > if n >= length array
00:09:21 verbose #11309 > > then None
00:09:21 verbose #11310 > > else index array n |> Some
00:09:21 verbose #11311 > >
00:09:21 verbose #11312 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11313 > > //// test
00:09:21 verbose #11314 > >
00:09:21 verbose #11315 > > a ;[[ 1; 2; 3 ]]
00:09:21 verbose #11316 > > |> from_array
00:09:21 verbose #11317 > > |> try_item 1i32
00:09:21 verbose #11318 > > |> _assert_eq (Some 2i32)
00:09:21 verbose #11319 > >
00:09:21 verbose #11320 > > ╭─[ 77.93ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:21 verbose #11321 > > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │
00:09:21 verbose #11322 > > │ │
00:09:21 verbose #11323 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11324 > >
00:09:21 verbose #11325 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11326 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11327 > > │ ## to_array │
00:09:21 verbose #11328 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11329 > >
00:09:21 verbose #11330 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11331 > > inl to_array seq =
00:09:21 verbose #11332 > > inl ar = a ;[[]] |> mut
00:09:21 verbose #11333 > > ((), seq)
00:09:21 verbose #11334 > > ||> fold fun _ x =>
00:09:21 verbose #11335 > > ar <- *ar ++ a ;[[x]]
00:09:21 verbose #11336 > > *ar
00:09:21 verbose #11337 > >
00:09:21 verbose #11338 > > inl to_array_ seq =
00:09:21 verbose #11339 > > inl ar = a ;[[]] |> mut
00:09:21 verbose #11340 > > ((), seq)
00:09:21 verbose #11341 > > ||> fold_ fun _ x =>
00:09:21 verbose #11342 > > ar <- *ar ++ a ;[[x]]
00:09:21 verbose #11343 > > *ar
00:09:21 verbose #11344 > >
00:09:21 verbose #11345 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11346 > > //// test
00:09:21 verbose #11347 > >
00:09:21 verbose #11348 > > listm.init 10i32 id
00:09:21 verbose #11349 > > |> from_list
00:09:21 verbose #11350 > > |> fun (x : i32 -> _) => x
00:09:21 verbose #11351 > > |> to_array
00:09:21 verbose #11352 > > |> _assert_eq (a ;[[ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9 ]] : _ i32 _)
00:09:21 verbose #11353 > >
00:09:21 verbose #11354 > > ╭─[ 346.97ms - stdout ]────────────────────────────────────────────────────────╮
00:09:21 verbose #11355 > > │ assert_eq / actual: [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9|] / expected: [|0; 1; 2; │
00:09:21 verbose #11356 > > │ 3; 4; 5; 6; 7; 8; 9|] │
00:09:21 verbose #11357 > > │ │
00:09:21 verbose #11358 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11359 > >
00:09:21 verbose #11360 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:21 verbose #11361 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:21 verbose #11362 > > │ ## take_while │
00:09:21 verbose #11363 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:21 verbose #11364 > >
00:09:21 verbose #11365 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11366 > > inl take_while cond seq =
00:09:21 verbose #11367 > > inl rec loop acc i =
00:09:21 verbose #11368 > > match seq i with
00:09:21 verbose #11369 > > | Some st when cond st i => loop (st :: acc) (i + 1)
00:09:21 verbose #11370 > > | _ => acc |> listm.rev
00:09:21 verbose #11371 > > loop [[]] 0
00:09:21 verbose #11372 > >
00:09:21 verbose #11373 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:21 verbose #11374 > > //// test
00:09:21 verbose #11375 > >
00:09:21 verbose #11376 > > listm.init 10i32 id
00:09:21 verbose #11377 > > |> from_list
00:09:21 verbose #11378 > > |> take_while (fun n (_ : i32) => n < 5)
00:09:21 verbose #11379 > > |> listm'.sum
00:09:21 verbose #11380 > > |> _assert_eq 10
00:09:22 verbose #11381 > >
00:09:22 verbose #11382 > > ╭─[ 31.36ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:22 verbose #11383 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:22 verbose #11384 > > │ │
00:09:22 verbose #11385 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11386 > >
00:09:22 verbose #11387 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11388 > > //// test
00:09:22 verbose #11389 > >
00:09:22 verbose #11390 > > stream.new_finite_stream print_and_return 10i32
00:09:22 verbose #11391 > > |> flip stream.try_item
00:09:22 verbose #11392 > > |> take_while (fun n (_ : i32) => n < 5)
00:09:22 verbose #11393 > > |> listm'.sum
00:09:22 verbose #11394 > > |> _assert_eq 10
00:09:22 verbose #11395 > >
00:09:22 verbose #11396 > > ╭─[ 97.17ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:22 verbose #11397 > > │ print_and_return / x: 0 │
00:09:22 verbose #11398 > > │ print_and_return / x: 1 │
00:09:22 verbose #11399 > > │ print_and_return / x: 1 │
00:09:22 verbose #11400 > > │ print_and_return / x: 2 │
00:09:22 verbose #11401 > > │ print_and_return / x: 1 │
00:09:22 verbose #11402 > > │ print_and_return / x: 2 │
00:09:22 verbose #11403 > > │ print_and_return / x: 3 │
00:09:22 verbose #11404 > > │ print_and_return / x: 1 │
00:09:22 verbose #11405 > > │ print_and_return / x: 2 │
00:09:22 verbose #11406 > > │ print_and_return / x: 3 │
00:09:22 verbose #11407 > > │ print_and_return / x: 4 │
00:09:22 verbose #11408 > > │ print_and_return / x: 1 │
00:09:22 verbose #11409 > > │ print_and_return / x: 2 │
00:09:22 verbose #11410 > > │ print_and_return / x: 3 │
00:09:22 verbose #11411 > > │ print_and_return / x: 4 │
00:09:22 verbose #11412 > > │ print_and_return / x: 5 │
00:09:22 verbose #11413 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:22 verbose #11414 > > │ │
00:09:22 verbose #11415 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11416 > >
00:09:22 verbose #11417 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:22 verbose #11418 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:22 verbose #11419 > > │ ## take_while_ │
00:09:22 verbose #11420 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11421 > >
00:09:22 verbose #11422 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11423 > > inl take_while_ cond seq =
00:09:22 verbose #11424 > > let rec loop acc i =
00:09:22 verbose #11425 > > match seq i with
00:09:22 verbose #11426 > > | Some st when cond st i => loop (st :: acc) (i + 1)
00:09:22 verbose #11427 > > | _ => acc |> listm.rev
00:09:22 verbose #11428 > > loop [[]] 0
00:09:22 verbose #11429 > >
00:09:22 verbose #11430 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11431 > > //// test
00:09:22 verbose #11432 > >
00:09:22 verbose #11433 > > stream.new_infinite_stream_ print_and_return
00:09:22 verbose #11434 > > |> flip stream.try_item
00:09:22 verbose #11435 > > |> take_while_ (fun n (_ : i32) => n < 5i32)
00:09:22 verbose #11436 > > |> listm'.sum
00:09:22 verbose #11437 > > |> _assert_eq 10
00:09:22 verbose #11438 > >
00:09:22 verbose #11439 > > ╭─[ 156.11ms - stdout ]────────────────────────────────────────────────────────╮
00:09:22 verbose #11440 > > │ print_and_return / x: 0 │
00:09:22 verbose #11441 > > │ print_and_return / x: 1 │
00:09:22 verbose #11442 > > │ print_and_return / x: 1 │
00:09:22 verbose #11443 > > │ print_and_return / x: 2 │
00:09:22 verbose #11444 > > │ print_and_return / x: 1 │
00:09:22 verbose #11445 > > │ print_and_return / x: 2 │
00:09:22 verbose #11446 > > │ print_and_return / x: 3 │
00:09:22 verbose #11447 > > │ print_and_return / x: 1 │
00:09:22 verbose #11448 > > │ print_and_return / x: 2 │
00:09:22 verbose #11449 > > │ print_and_return / x: 3 │
00:09:22 verbose #11450 > > │ print_and_return / x: 4 │
00:09:22 verbose #11451 > > │ print_and_return / x: 1 │
00:09:22 verbose #11452 > > │ print_and_return / x: 2 │
00:09:22 verbose #11453 > > │ print_and_return / x: 3 │
00:09:22 verbose #11454 > > │ print_and_return / x: 4 │
00:09:22 verbose #11455 > > │ print_and_return / x: 5 │
00:09:22 verbose #11456 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:22 verbose #11457 > > │ │
00:09:22 verbose #11458 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11459 > >
00:09:22 verbose #11460 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11461 > > //// test
00:09:22 verbose #11462 > >
00:09:22 verbose #11463 > > stream.new_infinite_stream_ print_and_return
00:09:22 verbose #11464 > > |> stream.memoize
00:09:22 verbose #11465 > > |> fun list =>
00:09:22 verbose #11466 > > inl list = list ()
00:09:22 verbose #11467 > > fun n =>
00:09:22 verbose #11468 > > list |> stream.try_item n
00:09:22 verbose #11469 > > |> take_while_ (fun n (_ : i32) => n < 5i32)
00:09:22 verbose #11470 > > |> listm'.sum
00:09:22 verbose #11471 > > |> _assert_eq 10
00:09:22 verbose #11472 > >
00:09:22 verbose #11473 > > ╭─[ 165.08ms - stdout ]────────────────────────────────────────────────────────╮
00:09:22 verbose #11474 > > │ print_and_return / x: 0 │
00:09:22 verbose #11475 > > │ print_and_return / x: 1 │
00:09:22 verbose #11476 > > │ print_and_return / x: 2 │
00:09:22 verbose #11477 > > │ print_and_return / x: 3 │
00:09:22 verbose #11478 > > │ print_and_return / x: 4 │
00:09:22 verbose #11479 > > │ print_and_return / x: 5 │
00:09:22 verbose #11480 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:22 verbose #11481 > > │ │
00:09:22 verbose #11482 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11483 > >
00:09:22 verbose #11484 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11485 > > //// test
00:09:22 verbose #11486 > >
00:09:22 verbose #11487 > > stream.new_finite_stream print_and_return 10i32
00:09:22 verbose #11488 > > |> stream.memoize
00:09:22 verbose #11489 > > |> fun list =>
00:09:22 verbose #11490 > > inl list = list ()
00:09:22 verbose #11491 > > fun n =>
00:09:22 verbose #11492 > > list |> stream.try_item n
00:09:22 verbose #11493 > > |> take_while_ (fun n (_ : i32) => n < 5)
00:09:22 verbose #11494 > > |> listm'.sum
00:09:22 verbose #11495 > > |> _assert_eq 10
00:09:22 verbose #11496 > >
00:09:22 verbose #11497 > > ╭─[ 207.41ms - stdout ]────────────────────────────────────────────────────────╮
00:09:22 verbose #11498 > > │ print_and_return / x: 0 │
00:09:22 verbose #11499 > > │ print_and_return / x: 1 │
00:09:22 verbose #11500 > > │ print_and_return / x: 2 │
00:09:22 verbose #11501 > > │ print_and_return / x: 3 │
00:09:22 verbose #11502 > > │ print_and_return / x: 4 │
00:09:22 verbose #11503 > > │ print_and_return / x: 5 │
00:09:22 verbose #11504 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:22 verbose #11505 > > │ │
00:09:22 verbose #11506 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11507 > >
00:09:22 verbose #11508 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:22 verbose #11509 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:22 verbose #11510 > > │ ## memoize │
00:09:22 verbose #11511 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11512 > >
00:09:22 verbose #11513 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11514 > > inl memoize seq =
00:09:22 verbose #11515 > > inl state = mut [[]]
00:09:22 verbose #11516 > > fun n =>
00:09:22 verbose #11517 > > match *state |> listm'.try_find (fun (n', _) => n' = n) with
00:09:22 verbose #11518 > > | Some (_, v) => v
00:09:22 verbose #11519 > > | None =>
00:09:22 verbose #11520 > > inl new_state = seq n
00:09:22 verbose #11521 > > state <- (n, new_state) :: *state
00:09:22 verbose #11522 > > new_state
00:09:22 verbose #11523 > >
00:09:22 verbose #11524 > > inl memoize_ seq =
00:09:22 verbose #11525 > > inl state = mut [[]]
00:09:22 verbose #11526 > > fun n =>
00:09:22 verbose #11527 > > match *state |> listm'.try_find_ (fun (n', _) => n' = n) with
00:09:22 verbose #11528 > > | Some (_, v) => v
00:09:22 verbose #11529 > > | None =>
00:09:22 verbose #11530 > > inl new_state = seq n
00:09:22 verbose #11531 > > state <- (n, new_state) :: *state
00:09:22 verbose #11532 > > new_state
00:09:22 verbose #11533 > >
00:09:22 verbose #11534 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11535 > > //// test
00:09:22 verbose #11536 > >
00:09:22 verbose #11537 > > inl seq =
00:09:22 verbose #11538 > > fun n =>
00:09:22 verbose #11539 > > n |> print_and_return |> Some
00:09:22 verbose #11540 > > |> memoize_
00:09:22 verbose #11541 > >
00:09:22 verbose #11542 > > seq
00:09:22 verbose #11543 > > |> take_while_ (fun n (_ : i32) => n < 5)
00:09:22 verbose #11544 > > |> listm'.sum
00:09:22 verbose #11545 > > |> _assert_eq 10
00:09:22 verbose #11546 > >
00:09:22 verbose #11547 > > seq
00:09:22 verbose #11548 > > |> take_while_ (fun n _ => n < 5)
00:09:22 verbose #11549 > > |> listm'.sum
00:09:22 verbose #11550 > > |> _assert_eq 10
00:09:22 verbose #11551 > >
00:09:22 verbose #11552 > > ╭─[ 214.63ms - stdout ]────────────────────────────────────────────────────────╮
00:09:22 verbose #11553 > > │ print_and_return / x: 0 │
00:09:22 verbose #11554 > > │ print_and_return / x: 1 │
00:09:22 verbose #11555 > > │ print_and_return / x: 2 │
00:09:22 verbose #11556 > > │ print_and_return / x: 3 │
00:09:22 verbose #11557 > > │ print_and_return / x: 4 │
00:09:22 verbose #11558 > > │ print_and_return / x: 5 │
00:09:22 verbose #11559 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:22 verbose #11560 > > │ assert_eq / actual: 10 / expected: 10 │
00:09:22 verbose #11561 > > │ │
00:09:22 verbose #11562 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11563 > >
00:09:22 verbose #11564 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:22 verbose #11565 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:22 verbose #11566 > > │ ## iterate │
00:09:22 verbose #11567 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:22 verbose #11568 > >
00:09:22 verbose #11569 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11570 > > inl iterate f x0 num_steps =
00:09:22 verbose #11571 > > inl rec loop x n =
00:09:22 verbose #11572 > > if n <= 0
00:09:22 verbose #11573 > > then x
00:09:22 verbose #11574 > > else loop (f x) (n - 1)
00:09:22 verbose #11575 > > loop x0 num_steps
00:09:22 verbose #11576 > >
00:09:22 verbose #11577 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:22 verbose #11578 > > //// test
00:09:22 verbose #11579 > >
00:09:22 verbose #11580 > > 10i32 |> iterate ((*) 2) 1i32
00:09:22 verbose #11581 > > |> _assert_eq 1024
00:09:23 verbose #11582 > >
00:09:23 verbose #11583 > > ╭─[ 36.40ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:23 verbose #11584 > > │ assert_eq / actual: 1024 / expected: 1024 │
00:09:23 verbose #11585 > > │ │
00:09:23 verbose #11586 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:23 verbose #11587 > >
00:09:23 verbose #11588 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:23 verbose #11589 > > inl iterate_ f x0 num_steps =
00:09:23 verbose #11590 > > let rec loop x n =
00:09:23 verbose #11591 > > if n <= 0
00:09:23 verbose #11592 > > then x
00:09:23 verbose #11593 > > else loop (f x) (n - 1)
00:09:23 verbose #11594 > > loop x0 num_steps
00:09:23 verbose #11595 > >
00:09:23 verbose #11596 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:23 verbose #11597 > > //// test
00:09:23 verbose #11598 > >
00:09:23 verbose #11599 > > 10i32 |> iterate_ ((*) 2) 1i32
00:09:23 verbose #11600 > > |> _assert_eq 1024
00:09:23 verbose #11601 > >
00:09:23 verbose #11602 > > ╭─[ 58.25ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:23 verbose #11603 > > │ assert_eq / actual: 1024 / expected: 1024 │
00:09:23 verbose #11604 > > │ │
00:09:23 verbose #11605 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:23 verbose #11606 > >
00:09:23 verbose #11607 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:23 verbose #11608 > > inl iterate' f x0 num_steps =
00:09:23 verbose #11609 > > listm.init num_steps id
00:09:23 verbose #11610 > > |> listm.fold (fun x _ => f x) x0
00:09:23 verbose #11611 > >
00:09:23 verbose #11612 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:23 verbose #11613 > > //// test
00:09:23 verbose #11614 > >
00:09:23 verbose #11615 > > 10i32 |> iterate' ((*) 2) 1i32
00:09:23 verbose #11616 > > |> _assert_eq 1024
00:09:23 verbose #11617 > >
00:09:23 verbose #11618 > > ╭─[ 48.85ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:23 verbose #11619 > > │ assert_eq / actual: 1024 / expected: 1024 │
00:09:23 verbose #11620 > > │ │
00:09:23 verbose #11621 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:23 verbose #11622 > >
00:09:23 verbose #11623 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:23 verbose #11624 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:23 verbose #11625 > > │ ## find_last │
00:09:23 verbose #11626 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:23 verbose #11627 > >
00:09:23 verbose #11628 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:23 verbose #11629 > > inl find_last forall item result. fold_fn fn target : option result =
00:09:23 verbose #11630 > > fold_fn (fun (item : item) (result : option result) =>
00:09:23 verbose #11631 > > match result with
00:09:23 verbose #11632 > > | None => fn item
00:09:23 verbose #11633 > > | result => result
00:09:23 verbose #11634 > > ) target (None : option result)
00:09:23 verbose #11635 > >
00:09:23 verbose #11636 > > inl array_find_last forall item result. (fn : item -> option result) (target : a
00:09:23 verbose #11637 > > i32 item) : option result =
00:09:23 verbose #11638 > > find_last am.foldBack fn target
00:09:23 verbose #11639 > >
00:09:23 verbose #11640 > > inl list_find_last forall item result. (fn : item -> option result) (target :
00:09:23 verbose #11641 > > list item) : option result =
00:09:23 verbose #11642 > > find_last listm.foldBack fn target
00:09:23 verbose #11643 > 00:00:14 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 44512
00:09:23 verbose #11644 > 00:00:14 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:09:26 verbose #11645 > 00:00:17 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/seq.dib.ipynb to html
00:09:26 verbose #11646 > 00:00:17 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:09:26 verbose #11647 > 00:00:17 verbose #7 ! validate(nb)
00:09:28 verbose #11648 > 00:00:19 verbose #8 ! [NbConvertApp] Writing 376569 bytes to c:\home\git\polyglot\lib\spiral\seq.dib.html
00:09:28 verbose #11649 > 00:00:19 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637
00:09:28 verbose #11650 > 00:00:19 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637
00:09:28 verbose #11651 > 00:00:19 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:09:29 verbose #11652 > 00:00:21 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:09:29 verbose #11653 > 00:00:21 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:09:30 verbose #11654 > 00:00:21 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 45208
00:09:30 debug #11655 execute_with_options_async / exit_code: 0 / output.Length: 49208
00:09:30 debug #21 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path seq.dib --retries 3
00:09:30 debug #11656 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path threading.dib --retries 3",
[||], None, None, true, None)
00:09:30 verbose #11657 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "threading.dib", "--retries", "3"])
00:09:30 verbose #11658 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/threading.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/threading.dib" --output-path "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:09:33 verbose #11659 > >
00:09:33 verbose #11660 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:33 verbose #11661 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:33 verbose #11662 > > │ # threading │
00:09:33 verbose #11663 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:33 verbose #11664 > >
00:09:33 verbose #11665 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:33 verbose #11666 > > open rust_operators
00:09:33 verbose #11667 > >
00:09:33 verbose #11668 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:09:33 verbose #11669 > > #r
00:09:33 verbose #11670 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:33 verbose #11671 > > otNet.Interactive.Spiral.dll"
00:09:33 verbose #11672 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:09:33 verbose #11673 > > #r
00:09:33 verbose #11674 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:33 verbose #11675 > > otNet.Interactive.dll"
00:09:33 verbose #11676 > > open type Microsoft.DotNet.Interactive.Kernel
00:09:38 verbose #11677 > >
00:09:38 verbose #11678 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:38 verbose #11679 > > //// test
00:09:38 verbose #11680 > >
00:09:38 verbose #11681 > > open testing
00:09:38 verbose #11682 > >
00:09:38 verbose #11683 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:38 verbose #11684 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:38 verbose #11685 > > │ ## types │
00:09:38 verbose #11686 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:38 verbose #11687 > >
00:09:38 verbose #11688 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:38 verbose #11689 > > inl types () =
00:09:38 verbose #11690 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11691 > > Fable.Core.Emit(\"std::thread::JoinHandle<$0>\")>]]\n#endif\ntype
00:09:38 verbose #11692 > > std_thread_JoinHandle<'T> = class end"
00:09:38 verbose #11693 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11694 > > Fable.Core.Emit(\"std::sync::Arc<$0>\")>]]\n#endif\ntype std_sync_Arc<'T> =
00:09:38 verbose #11695 > > class end"
00:09:38 verbose #11696 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11697 > > Fable.Core.Emit(\"std::sync::Mutex<$0>\")>]]\n#endif\ntype std_sync_Mutex<'T> =
00:09:38 verbose #11698 > > class end"
00:09:38 verbose #11699 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11700 > > Fable.Core.Emit(\"std::sync::MutexGuard<$0>\")>]]\n#endif\ntype
00:09:38 verbose #11701 > > std_sync_MutexGuard<'T> = class end"
00:09:38 verbose #11702 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11703 > > Fable.Core.Emit(\"std::sync::PoisonError<$0>\")>]]\n#endif\ntype
00:09:38 verbose #11704 > > std_sync_PoisonError<'T> = class end"
00:09:38 verbose #11705 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11706 > > Fable.Core.Emit(\"std::sync::mpsc::Receiver<$0>\")>]]\n#endif\ntype
00:09:38 verbose #11707 > > std_sync_mpsc_Receiver<'T> = class end"
00:09:38 verbose #11708 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11709 > > Fable.Core.Emit(\"std::sync::mpsc::SendError<$0>\")>]]\n#endif\ntype
00:09:38 verbose #11710 > > std_sync_mpsc_SendError<'T> = class end"
00:09:38 verbose #11711 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:09:38 verbose #11712 > > Fable.Core.Emit(\"std::sync::mpsc::Sender<$0>\")>]]\n#endif\ntype
00:09:38 verbose #11713 > > std_sync_mpsc_Sender<'T> = class end"
00:09:38 verbose #11714 > >
00:09:38 verbose #11715 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:38 verbose #11716 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:38 verbose #11717 > > │ ## join_handle │
00:09:38 verbose #11718 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:38 verbose #11719 > >
00:09:38 verbose #11720 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:38 verbose #11721 > > nominal join_handle t = $'std_thread_JoinHandle<`t>'
00:09:38 verbose #11722 > >
00:09:38 verbose #11723 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:38 verbose #11724 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:38 verbose #11725 > > │ ## spawn │
00:09:38 verbose #11726 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:38 verbose #11727 > >
00:09:38 verbose #11728 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:38 verbose #11729 > > inl spawn forall t. depth flag (x : () -> t) : join_handle t =
00:09:38 verbose #11730 > > if flag = 1u8
00:09:38 verbose #11731 > > then (!\($'"true; let __result = std::thread::spawn(move || { //"') : bool)
00:09:38 verbose #11732 > > |> ignore
00:09:38 verbose #11733 > > else (!\($'"true; let __result = std::thread::spawn(|| { //"') : bool) |>
00:09:38 verbose #11734 > > ignore
00:09:38 verbose #11735 > >
00:09:38 verbose #11736 > > let x' = x ()
00:09:38 verbose #11737 > > inl x' = join x'
00:09:38 verbose #11738 > >
00:09:38 verbose #11739 > > x' |> rust.fix_closure depth
00:09:38 verbose #11740 > >
00:09:38 verbose #11741 > > !\($'"__result"')
00:09:38 verbose #11742 > >
00:09:38 verbose #11743 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:38 verbose #11744 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:38 verbose #11745 > > │ ## join' │
00:09:38 verbose #11746 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:38 verbose #11747 > >
00:09:38 verbose #11748 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:38 verbose #11749 > > inl join' forall t.
00:09:38 verbose #11750 > > (x : join_handle t)
00:09:38 verbose #11751 > > : resultm.result'
00:09:38 verbose #11752 > > t
00:09:38 verbose #11753 > > (
00:09:38 verbose #11754 > > rust.box (
00:09:38 verbose #11755 > > rust.lifetime_join'
00:09:38 verbose #11756 > > rust.dyn'
00:09:38 verbose #11757 > > (
00:09:38 verbose #11758 > > rust.lifetime_join
00:09:38 verbose #11759 > > rust.any
00:09:38 verbose #11760 > > (
00:09:38 verbose #11761 > > rust.lifetime_join'
00:09:38 verbose #11762 > > rust.send
00:09:38 verbose #11763 > > rust.static_lifetime
00:09:38 verbose #11764 > > )
00:09:38 verbose #11765 > > )
00:09:38 verbose #11766 > > )
00:09:38 verbose #11767 > > ) =
00:09:38 verbose #11768 > > !\\(x, $'"std::thread::JoinHandle::join($0)"')
00:09:38 verbose #11769 > >
00:09:38 verbose #11770 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:38 verbose #11771 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:38 verbose #11772 > > │ ## cancellation_token │
00:09:38 verbose #11773 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:38 verbose #11774 > >
00:09:38 verbose #11775 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:38 verbose #11776 > > nominal cancellation_token = $'System.Threading.CancellationToken'
00:09:39 verbose #11777 > >
00:09:39 verbose #11778 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11779 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11780 > > │ ## cancellation_token_source │
00:09:39 verbose #11781 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11782 > >
00:09:39 verbose #11783 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11784 > > nominal cancellation_token_source = $'System.Threading.CancellationTokenSource'
00:09:39 verbose #11785 > >
00:09:39 verbose #11786 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11787 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11788 > > │ ## cancellation_token_registration │
00:09:39 verbose #11789 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11790 > >
00:09:39 verbose #11791 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11792 > > nominal cancellation_token_registration =
00:09:39 verbose #11793 > > $'System.Threading.CancellationTokenRegistration'
00:09:39 verbose #11794 > >
00:09:39 verbose #11795 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11796 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11797 > > │ ## cancellation_source_token │
00:09:39 verbose #11798 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11799 > >
00:09:39 verbose #11800 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11801 > > inl cancellation_source_token (x : cancellation_token_source) :
00:09:39 verbose #11802 > > cancellation_token =
00:09:39 verbose #11803 > > $'!x.Token'
00:09:39 verbose #11804 > >
00:09:39 verbose #11805 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11806 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11807 > > │ ## cancellation_source_cancel │
00:09:39 verbose #11808 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11809 > >
00:09:39 verbose #11810 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11811 > > inl cancellation_source_cancel (x : cancellation_token_source) : () =
00:09:39 verbose #11812 > > run_target function
00:09:39 verbose #11813 > > | Fsharp (Native) => fun () =>
00:09:39 verbose #11814 > > $'!x.Cancel' ()
00:09:39 verbose #11815 > > | _ => fun () => null ()
00:09:39 verbose #11816 > >
00:09:39 verbose #11817 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11818 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11819 > > │ ## create_linked_token_source │
00:09:39 verbose #11820 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11821 > >
00:09:39 verbose #11822 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11823 > > inl create_linked_token_source (x : array_base cancellation_token) :
00:09:39 verbose #11824 > > cancellation_token_source =
00:09:39 verbose #11825 > > x |> $'System.Threading.CancellationTokenSource.CreateLinkedTokenSource'
00:09:39 verbose #11826 > >
00:09:39 verbose #11827 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11828 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11829 > > │ ## sleep │
00:09:39 verbose #11830 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11831 > >
00:09:39 verbose #11832 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11833 > > inl sleep (duration : date_time.duration) : () =
00:09:39 verbose #11834 > > inl duration = join duration
00:09:39 verbose #11835 > > !\($'"std::thread::sleep(!duration)"')
00:09:39 verbose #11836 > >
00:09:39 verbose #11837 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11838 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11839 > > │ ## concurrent_stack │
00:09:39 verbose #11840 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11841 > >
00:09:39 verbose #11842 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11843 > > nominal concurrent_stack t =
00:09:39 verbose #11844 > > $'System.Collections.Concurrent.ConcurrentStack<`t>'
00:09:39 verbose #11845 > >
00:09:39 verbose #11846 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11847 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11848 > > │ ## concurrent_stack_push │
00:09:39 verbose #11849 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11850 > >
00:09:39 verbose #11851 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11852 > > inl concurrent_stack_push forall t. (item : t) (stack : concurrent_stack t) : ()
00:09:39 verbose #11853 > > =
00:09:39 verbose #11854 > > $'!stack.Push' item
00:09:39 verbose #11855 > >
00:09:39 verbose #11856 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11857 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11858 > > │ ## token_none │
00:09:39 verbose #11859 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11860 > >
00:09:39 verbose #11861 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11862 > > inl token_none () : cancellation_token =
00:09:39 verbose #11863 > > $'`cancellation_token.None'
00:09:39 verbose #11864 > >
00:09:39 verbose #11865 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11866 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11867 > > │ ## new_concurrent_stack │
00:09:39 verbose #11868 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11869 > >
00:09:39 verbose #11870 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11871 > > inl new_concurrent_stack forall t. () : concurrent_stack t =
00:09:39 verbose #11872 > > $'System.Collections.Concurrent.ConcurrentStack<`t>' ()
00:09:39 verbose #11873 > >
00:09:39 verbose #11874 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11875 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11876 > > │ ## token_register │
00:09:39 verbose #11877 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11878 > >
00:09:39 verbose #11879 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11880 > > inl token_register (fn : () -> ()) (ct : cancellation_token) :
00:09:39 verbose #11881 > > cancellation_token_registration =
00:09:39 verbose #11882 > > fn |> $'!ct.Register'
00:09:39 verbose #11883 > >
00:09:39 verbose #11884 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11885 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11886 > > │ ## new_cancellation_token_source │
00:09:39 verbose #11887 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11888 > >
00:09:39 verbose #11889 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11890 > > inl new_cancellation_token_source () : cancellation_token_source =
00:09:39 verbose #11891 > > $'new `cancellation_token_source ()'
00:09:39 verbose #11892 > >
00:09:39 verbose #11893 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11894 > > inl token_cancellation_requested (ct : cancellation_token) : bool =
00:09:39 verbose #11895 > > $'!ct.IsCancellationRequested'
00:09:39 verbose #11896 > >
00:09:39 verbose #11897 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:39 verbose #11898 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:39 verbose #11899 > > │ ## new_disposable_token │
00:09:39 verbose #11900 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:39 verbose #11901 > >
00:09:39 verbose #11902 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11903 > > inl new_disposable_token (merge_token : optionm'.option' cancellation_token) =
00:09:39 verbose #11904 > > run_target function
00:09:39 verbose #11905 > > | Fsharp (Native) => fun () =>
00:09:39 verbose #11906 > > inl cts = new_cancellation_token_source ()
00:09:39 verbose #11907 > > inl cts =
00:09:39 verbose #11908 > > match merge_token |> optionm'.unbox with
00:09:39 verbose #11909 > > | None => cts
00:09:39 verbose #11910 > > | Some merge_token =>
00:09:39 verbose #11911 > > create_linked_token_source ;[[ cts |>
00:09:39 verbose #11912 > > cancellation_source_token; merge_token ]]
00:09:39 verbose #11913 > > inl disposable : _ () = new_disposable fun () =>
00:09:39 verbose #11914 > > cts |> cancellation_source_cancel
00:09:39 verbose #11915 > > cts |> cancellation_source_token, disposable
00:09:39 verbose #11916 > > | _ => fun () => null ()
00:09:39 verbose #11917 > >
00:09:39 verbose #11918 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:39 verbose #11919 > > //// test
00:09:39 verbose #11920 > >
00:09:39 verbose #11921 > > inl run fn =
00:09:39 verbose #11922 > > inl token, disposable = new_disposable_token (None |> optionm'.box)
00:09:39 verbose #11923 > > disposable |> use |> ignore
00:09:39 verbose #11924 > > fn token
00:09:39 verbose #11925 > > fun () =>
00:09:39 verbose #11926 > > fn token
00:09:39 verbose #11927 > > |> async.new_async
00:09:39 verbose #11928 > > |> async.start
00:09:39 verbose #11929 > >
00:09:39 verbose #11930 > > fun () =>
00:09:39 verbose #11931 > > inl counter = mut 0i32
00:09:39 verbose #11932 > >
00:09:39 verbose #11933 > > inl fn (token : cancellation_token) =
00:09:39 verbose #11934 > > counter <- *counter + (if token |> token_cancellation_requested then 10
00:09:39 verbose #11935 > > else 1)
00:09:39 verbose #11936 > >
00:09:39 verbose #11937 > > join run fn
00:09:39 verbose #11938 > > async.sleep 10 |> async.do
00:09:39 verbose #11939 > > return *counter
00:09:39 verbose #11940 > > |> async.new_async_unit
00:09:39 verbose #11941 > > |> async.run_synchronously
00:09:39 verbose #11942 > > |> _assert_eq 11i32
00:09:41 verbose #11943 > >
00:09:41 verbose #11944 > > ╭─[ 2.18s - stdout ]───────────────────────────────────────────────────────────╮
00:09:41 verbose #11945 > > │ assert_eq / actual: 11 / expected: 11 │
00:09:41 verbose #11946 > > │ │
00:09:41 verbose #11947 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #11948 > >
00:09:41 verbose #11949 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #11950 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #11951 > > │ ## arc │
00:09:41 verbose #11952 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #11953 > >
00:09:41 verbose #11954 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #11955 > > nominal arc t = $'std_sync_Arc<`t>'
00:09:41 verbose #11956 > >
00:09:41 verbose #11957 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #11958 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #11959 > > │ ## new_arc │
00:09:41 verbose #11960 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #11961 > >
00:09:41 verbose #11962 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #11963 > > inl new_arc forall t. (x : t) : arc t =
00:09:41 verbose #11964 > > !\\(x, $'"std::sync::Arc::new($0)"')
00:09:41 verbose #11965 > >
00:09:41 verbose #11966 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #11967 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #11968 > > │ ## mutex │
00:09:41 verbose #11969 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #11970 > >
00:09:41 verbose #11971 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #11972 > > nominal mutex t = $'std_sync_Mutex<`t>'
00:09:41 verbose #11973 > >
00:09:41 verbose #11974 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #11975 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #11976 > > │ ## new_mutex │
00:09:41 verbose #11977 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #11978 > >
00:09:41 verbose #11979 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #11980 > > inl new_mutex forall t. (x : t) : mutex t =
00:09:41 verbose #11981 > > !\\(x, $'"std::sync::Mutex::new($0)"')
00:09:41 verbose #11982 > >
00:09:41 verbose #11983 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #11984 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #11985 > > │ ## new_arc_mutex │
00:09:41 verbose #11986 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #11987 > >
00:09:41 verbose #11988 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #11989 > > inl new_arc_mutex forall t. (x : t) : arc (mutex t) =
00:09:41 verbose #11990 > > x |> new_mutex |> new_arc
00:09:41 verbose #11991 > >
00:09:41 verbose #11992 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #11993 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #11994 > > │ ## arc_clone │
00:09:41 verbose #11995 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #11996 > >
00:09:41 verbose #11997 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #11998 > > inl arc_clone forall t. (x : arc t) : arc t =
00:09:41 verbose #11999 > > inl x = join x
00:09:41 verbose #12000 > > !\($'"std::sync::Arc::clone(&!x)"')
00:09:41 verbose #12001 > >
00:09:41 verbose #12002 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12003 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12004 > > │ ## mutex_guard │
00:09:41 verbose #12005 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12006 > >
00:09:41 verbose #12007 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12008 > > nominal mutex_guard t = $'std_sync_MutexGuard<`t>'
00:09:41 verbose #12009 > >
00:09:41 verbose #12010 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12011 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12012 > > │ ## poison_error │
00:09:41 verbose #12013 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12014 > >
00:09:41 verbose #12015 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12016 > > nominal poison_error t = $'std_sync_PoisonError<`t>'
00:09:41 verbose #12017 > >
00:09:41 verbose #12018 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12019 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12020 > > │ ## arc_mutex_lock │
00:09:41 verbose #12021 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12022 > >
00:09:41 verbose #12023 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12024 > > inl arc_mutex_lock forall t. (x : arc (mutex t)) : resultm.result' (mutex_guard
00:09:41 verbose #12025 > > t) (poison_error (mutex_guard t)) =
00:09:41 verbose #12026 > > inl x = join x
00:09:41 verbose #12027 > > !\($'"!x.lock()"')
00:09:41 verbose #12028 > >
00:09:41 verbose #12029 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12030 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12031 > > │ ## mutex_guard_ref │
00:09:41 verbose #12032 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12033 > >
00:09:41 verbose #12034 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12035 > > inl mutex_guard_ref forall t. (x : mutex_guard t) : rust.ref' t =
00:09:41 verbose #12036 > > !\\(x, $'"&$0"')
00:09:41 verbose #12037 > >
00:09:41 verbose #12038 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12039 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12040 > > │ ## mutex_guard_ref_mut │
00:09:41 verbose #12041 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12042 > >
00:09:41 verbose #12043 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12044 > > inl mutex_guard_ref_mut forall t. (x : mutex_guard t) : rust.ref' (rust.mut' t)
00:09:41 verbose #12045 > > =
00:09:41 verbose #12046 > > (!\($'"true; let mut !x = !x"') : bool) |> ignore
00:09:41 verbose #12047 > > !\\(x, $'"&mut $0"')
00:09:41 verbose #12048 > >
00:09:41 verbose #12049 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12050 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12051 > > │ ## mutex_guard_as_mut │
00:09:41 verbose #12052 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12053 > >
00:09:41 verbose #12054 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12055 > > inl mutex_guard_as_mut forall (t : * -> *) u. (x : mutex_guard (t u)) : t
00:09:41 verbose #12056 > > (rust.ref' (rust.mut' u)) =
00:09:41 verbose #12057 > > (!\($'"true; let mut !x = !x"') : bool) |> ignore
00:09:41 verbose #12058 > > !\\(x, $'"$0.as_mut()"')
00:09:41 verbose #12059 > >
00:09:41 verbose #12060 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12061 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12062 > > │ ## channel_receiver │
00:09:41 verbose #12063 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12064 > >
00:09:41 verbose #12065 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12066 > > nominal channel_receiver t = $'std_sync_mpsc_Receiver<`t>'
00:09:41 verbose #12067 > >
00:09:41 verbose #12068 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12069 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12070 > > │ ## channel_sender │
00:09:41 verbose #12071 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12072 > >
00:09:41 verbose #12073 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12074 > > nominal channel_sender t = $'std_sync_mpsc_Sender<`t>'
00:09:41 verbose #12075 > >
00:09:41 verbose #12076 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12077 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12078 > > │ ## new_channel │
00:09:41 verbose #12079 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12080 > >
00:09:41 verbose #12081 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12082 > > inl new_channel () : channel_sender sm'.std_string * arc (channel_receiver
00:09:41 verbose #12083 > > sm'.std_string) =
00:09:41 verbose #12084 > > !\($'"{ let (sender, receiver) = std::sync::mpsc::channel(); (sender,
00:09:41 verbose #12085 > > std::sync::Arc::new(receiver)) }"')
00:09:41 verbose #12086 > >
00:09:41 verbose #12087 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12088 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12089 > > │ ## send_error │
00:09:41 verbose #12090 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12091 > >
00:09:41 verbose #12092 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12093 > > nominal send_error t = $'std_sync_mpsc_SendError<`t>'
00:09:41 verbose #12094 > >
00:09:41 verbose #12095 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12096 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12097 > > │ ## channel_send │
00:09:41 verbose #12098 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12099 > >
00:09:41 verbose #12100 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12101 > > inl channel_send forall t. (line : t) (sender : rust.ref' (channel_sender t)) :
00:09:41 verbose #12102 > > resultm.result' () (send_error sm'.std_string) =
00:09:41 verbose #12103 > > !\\((sender, line), $'"$0.send($1)"')
00:09:41 verbose #12104 > >
00:09:41 verbose #12105 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:41 verbose #12106 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:41 verbose #12107 > > │ ## main │
00:09:41 verbose #12108 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:41 verbose #12109 > >
00:09:41 verbose #12110 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:41 verbose #12111 > > inl main () =
00:09:41 verbose #12112 > > types ()
00:09:41 verbose #12113 > > $'let new_disposable_token x = !new_disposable_token x' : ()
00:09:42 verbose #12114 > 00:00:11 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 22840
00:09:42 verbose #12115 > 00:00:11 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:09:45 verbose #12116 > 00:00:14 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/threading.dib.ipynb to html
00:09:45 verbose #12117 > 00:00:14 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:09:45 verbose #12118 > 00:00:14 verbose #7 ! validate(nb)
00:09:47 verbose #12119 > 00:00:16 verbose #8 ! [NbConvertApp] Writing 339406 bytes to c:\home\git\polyglot\lib\spiral\threading.dib.html
00:09:47 verbose #12120 > 00:00:16 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649
00:09:47 verbose #12121 > 00:00:16 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649
00:09:47 verbose #12122 > 00:00:16 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:09:48 verbose #12123 > 00:00:18 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:09:48 verbose #12124 > 00:00:18 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:09:49 verbose #12125 > 00:00:18 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 23548
00:09:49 debug #12126 execute_with_options_async / exit_code: 0 / output.Length: 26714
00:09:49 debug #22 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path threading.dib --retries 3
00:09:49 debug #12127 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path physics.dib --retries 3",
[||], None, None, true, None)
00:09:49 verbose #12128 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "physics.dib", "--retries", "3"])
00:09:49 verbose #12129 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/physics.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/physics.dib" --output-path "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:09:53 verbose #12130 > >
00:09:53 verbose #12131 > > ── markdown ────────────────────────────────────────────────────────────────────
00:09:53 verbose #12132 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:53 verbose #12133 > > │ # physics │
00:09:53 verbose #12134 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:53 verbose #12135 > >
00:09:53 verbose #12136 > > ── fsharp ──────────────────────────────────────────────────────────────────────
00:09:53 verbose #12137 > > #!import ../../lib/fsharp/Plotting.dib
00:09:53 verbose #12138 > >
00:09:53 verbose #12139 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:09:53 verbose #12140 > > #r
00:09:53 verbose #12141 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:09:53 verbose #12142 > > spNetCore.Html.Abstractions.dll"
00:09:53 verbose #12143 > > #r
00:09:53 verbose #12144 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:53 verbose #12145 > > otNet.Interactive.dll"
00:09:53 verbose #12146 > > #r
00:09:53 verbose #12147 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:53 verbose #12148 > > otNet.Interactive.FSharp.dll"
00:09:53 verbose #12149 > > #r
00:09:53 verbose #12150 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:53 verbose #12151 > > otNet.Interactive.Formatting.dll"
00:09:53 verbose #12152 > > open System
00:09:53 verbose #12153 > > open System.IO
00:09:53 verbose #12154 > > open System.Text
00:09:53 verbose #12155 > > open Microsoft.DotNet.Interactive.Formatting
00:09:57 verbose #12156 > >
00:09:57 verbose #12157 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:09:57 verbose #12158 > > #r
00:09:57 verbose #12159 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:57 verbose #12160 > > otNet.Interactive.FSharp.dll"
00:09:57 verbose #12161 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:09:57 verbose #12162 > > #r
00:09:57 verbose #12163 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:57 verbose #12164 > > otNet.Interactive.dll"
00:09:57 verbose #12165 > > open type Microsoft.DotNet.Interactive.Kernel
00:09:58 verbose #12166 > >
00:09:58 verbose #12167 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:09:58 verbose #12168 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:09:59 verbose #12169 > >
00:09:59 verbose #12170 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:09:59 verbose #12171 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:09:59 verbose #12172 > > TextWriter)->fprintfn writer "%120A" x)
00:09:59 verbose #12173 > >
00:09:59 verbose #12174 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:09:59 verbose #12175 > > #r
00:09:59 verbose #12176 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:09:59 verbose #12177 > > dard2.1/FSharp.Control.AsyncSeq.dll"
00:09:59 verbose #12178 > > #r
00:09:59 verbose #12179 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:09:59 verbose #12180 > > 0/System.Reactive.dll"
00:09:59 verbose #12181 > > #r
00:09:59 verbose #12182 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:09:59 verbose #12183 > > netstandard2.0/System.Reactive.Linq.dll"
00:09:59 verbose #12184 > > #r
00:09:59 verbose #12185 > > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:09:59 verbose #12186 > > #r
00:09:59 verbose #12187 > > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha
00:09:59 verbose #12188 > > rp.Json.dll"
00:09:59 verbose #12189 > >
00:09:59 verbose #12190 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:09:59 verbose #12191 > > //// test
00:09:59 verbose #12192 > >
00:09:59 verbose #12193 > > Formatter.ListExpansionLimit <- 100
00:09:59 verbose #12194 > >
00:09:59 verbose #12195 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:09:59 verbose #12196 > > #if FABLE_COMPILER
00:09:59 verbose #12197 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:09:59 verbose #12198 > > #endif
00:09:59 verbose #12199 > > type std_env_VarError = class end
00:09:59 verbose #12200 > > #if FABLE_COMPILER
00:09:59 verbose #12201 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:09:59 verbose #12202 > > #endif
00:09:59 verbose #12203 > > type core_any_Any = class end
00:09:59 verbose #12204 > > #if FABLE_COMPILER
00:09:59 verbose #12205 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:09:59 verbose #12206 > > #endif
00:09:59 verbose #12207 > > type core_ops_Try<'T> = class end
00:09:59 verbose #12208 > > #if FABLE_COMPILER
00:09:59 verbose #12209 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:09:59 verbose #12210 > > #endif
00:09:59 verbose #12211 > > type Func0<'T> = class end
00:09:59 verbose #12212 > > #if FABLE_COMPILER
00:09:59 verbose #12213 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:09:59 verbose #12214 > > #endif
00:09:59 verbose #12215 > > type Func0<'T, 'U> = class end
00:09:59 verbose #12216 > > #if FABLE_COMPILER
00:09:59 verbose #12217 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:09:59 verbose #12218 > > #endif
00:09:59 verbose #12219 > > type Box<'T> = class end
00:09:59 verbose #12220 > > #if FABLE_COMPILER
00:09:59 verbose #12221 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:09:59 verbose #12222 > > #endif
00:09:59 verbose #12223 > > type Dyn<'T> = class end
00:09:59 verbose #12224 > > #if FABLE_COMPILER
00:09:59 verbose #12225 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:09:59 verbose #12226 > > #endif
00:09:59 verbose #12227 > > type Send<'T> = class end
00:09:59 verbose #12228 > > #if FABLE_COMPILER
00:09:59 verbose #12229 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:09:59 verbose #12230 > > #endif
00:09:59 verbose #12231 > > type Fn<'T> = class end
00:09:59 verbose #12232 > > #if FABLE_COMPILER
00:09:59 verbose #12233 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:09:59 verbose #12234 > > #endif
00:09:59 verbose #12235 > > type FnUnit = class end
00:09:59 verbose #12236 > > #if FABLE_COMPILER
00:09:59 verbose #12237 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:09:59 verbose #12238 > > #endif
00:09:59 verbose #12239 > > type FnOnce<'T> = class end
00:09:59 verbose #12240 > > #if FABLE_COMPILER
00:09:59 verbose #12241 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:09:59 verbose #12242 > > #endif
00:09:59 verbose #12243 > > type ActionFn<'T> = class end
00:09:59 verbose #12244 > > #if FABLE_COMPILER
00:09:59 verbose #12245 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:09:59 verbose #12246 > > #endif
00:09:59 verbose #12247 > > type ActionFn2<'T, 'U> = class end
00:09:59 verbose #12248 > > #if FABLE_COMPILER
00:09:59 verbose #12249 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:09:59 verbose #12250 > > #endif
00:09:59 verbose #12251 > > type Impl<'T> = class end
00:09:59 verbose #12252 > > #if FABLE_COMPILER
00:09:59 verbose #12253 > > [[<Fable...
00:10:01 verbose #12254 > >
00:10:01 verbose #12255 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:01 verbose #12256 > > #if FABLE_COMPILER
00:10:01 verbose #12257 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:10:01 verbose #12258 > > #endif
00:10:01 verbose #12259 > > type core_any_Any = class end
00:10:01 verbose #12260 > > #if FABLE_COMPILER
00:10:01 verbose #12261 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:10:01 verbose #12262 > > #endif
00:10:01 verbose #12263 > > type core_ops_Try<'T> = class end
00:10:01 verbose #12264 > > #if FABLE_COMPILER
00:10:01 verbose #12265 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:10:01 verbose #12266 > > #endif
00:10:01 verbose #12267 > > type Func0<'T> = class end
00:10:01 verbose #12268 > > #if FABLE_COMPILER
00:10:01 verbose #12269 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:10:01 verbose #12270 > > #endif
00:10:01 verbose #12271 > > type Func0<'T, 'U> = class end
00:10:01 verbose #12272 > > #if FABLE_COMPILER
00:10:01 verbose #12273 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:10:01 verbose #12274 > > #endif
00:10:01 verbose #12275 > > type Box<'T> = class end
00:10:01 verbose #12276 > > #if FABLE_COMPILER
00:10:01 verbose #12277 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:10:01 verbose #12278 > > #endif
00:10:01 verbose #12279 > > type Dyn<'T> = class end
00:10:01 verbose #12280 > > #if FABLE_COMPILER
00:10:01 verbose #12281 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:10:01 verbose #12282 > > #endif
00:10:01 verbose #12283 > > type Send<'T> = class end
00:10:01 verbose #12284 > > #if FABLE_COMPILER
00:10:01 verbose #12285 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:10:01 verbose #12286 > > #endif
00:10:01 verbose #12287 > > type Fn<'T> = class end
00:10:01 verbose #12288 > > #if FABLE_COMPILER
00:10:01 verbose #12289 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:10:01 verbose #12290 > > #endif
00:10:01 verbose #12291 > > type FnUnit = class end
00:10:01 verbose #12292 > > #if FABLE_COMPILER
00:10:01 verbose #12293 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:10:01 verbose #12294 > > #endif
00:10:01 verbose #12295 > > type FnOnce<'T> = class end
00:10:01 verbose #12296 > > #if FABLE_COMPILER
00:10:01 verbose #12297 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:10:01 verbose #12298 > > #endif
00:10:01 verbose #12299 > > type ActionFn<'T> = class end
00:10:01 verbose #12300 > > #if FABLE_COMPILER
00:10:01 verbose #12301 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:10:01 verbose #12302 > > #endif
00:10:01 verbose #12303 > > type ActionFn2<'T, 'U> = class end
00:10:01 verbose #12304 > > #if FABLE_COMPILER
00:10:01 verbose #12305 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:10:01 verbose #12306 > > #endif
00:10:01 verbose #12307 > > type Impl<'T> = class end
00:10:01 verbose #12308 > > #if FABLE_COMPILER
00:10:01 verbose #12309 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:10:01 verbose #12310 > > #endif
00:10:01 verbose #12311 > > type Mut<'T> = class end
00:10:01 verbose #12312 > > #if FABLE_COMPILER
00:10:01 verbose #12313 > > [[<Fable.Core.Erase; Fable.Co...
00:10:02 verbose #12314 > >
00:10:02 verbose #12315 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:02 verbose #12316 > > #if FABLE_COMPILER
00:10:02 verbose #12317 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]]
00:10:02 verbose #12318 > > #endif
00:10:02 verbose #12319 > > type async_std_task_JoinHandle<'T> = class end
00:10:02 verbose #12320 > > #if FABLE_COMPILER
00:10:02 verbose #12321 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:10:02 verbose #12322 > > #endif
00:10:02 verbose #12323 > > type std_future_Future<'T> = class end
00:10:02 verbose #12324 > > #if FABLE_COMPILER
00:10:02 verbose #12325 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:10:02 verbose #12326 > > #endif
00:10:02 verbose #12327 > > type rayon_vec_IntoIter<'T> = class end
00:10:02 verbose #12328 > > #if FABLE_COMPILER
00:10:02 verbose #12329 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:10:02 verbose #12330 > > #endif
00:10:02 verbose #12331 > > type rayon_iter_Map<'T> = class end
00:10:02 verbose #12332 > > #if FABLE_COMPILER
00:10:02 verbose #12333 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:10:02 verbose #12334 > > #endif
00:10:02 verbose #12335 > > type futures_lite_stream_StreamExt = class end
00:10:02 verbose #12336 > > #if FABLE_COMPILER
00:10:02 verbose #12337 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:10:02 verbose #12338 > > #endif
00:10:02 verbose #12339 > > type futures_future_TryJoinAll<'T> = class end
00:10:02 verbose #12340 > > #if FABLE_COMPILER
00:10:02 verbose #12341 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]]
00:10:02 verbose #12342 > > #endif
00:10:02 verbose #12343 > > type futures_future_Fuse<'T> = class end
00:10:02 verbose #12344 > > #if FABLE_COMPILER
00:10:02 verbose #12345 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]]
00:10:02 verbose #12346 > > #endif
00:10:02 verbose #12347 > > type futures_future_JoinAll<'T> = class end
00:10:02 verbose #12348 > > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:10:02 verbose #12349 > > Async<System.Threading.CancellationToken> =
00:10:02 verbose #12350 > > let v1 : bool = true
00:10:02 verbose #12351 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:10:02 verbose #12352 > >
00:10:02 verbose #12353 > > #if FABLE_COMPILER || WASM || CONTRACT
00:10:02 verbose #12354 > >
00:10:02 verbose #12355 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:10:02 verbose #12356 > > let v2 : Async<System.Threading.CancellationToken> = null |>
00:10:02 verbose #12357 > > unbox<Async<System...
00:10:02 verbose #12358 > >
00:10:02 verbose #12359 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:02 verbose #12360 > > #if FABLE_COMPILER
00:10:02 verbose #12361 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:10:02 verbose #12362 > > #endif
00:10:02 verbose #12363 > > type std_thread_JoinHandle<'T> = class end
00:10:02 verbose #12364 > > #if FABLE_COMPILER
00:10:02 verbose #12365 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:10:02 verbose #12366 > > #endif
00:10:02 verbose #12367 > > type std_sync_Arc<'T> = class end
00:10:02 verbose #12368 > > #if FABLE_COMPILER
00:10:02 verbose #12369 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:10:02 verbose #12370 > > #endif
00:10:02 verbose #12371 > > type std_sync_Mutex<'T> = class end
00:10:02 verbose #12372 > > #if FABLE_COMPILER
00:10:02 verbose #12373 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:10:02 verbose #12374 > > #endif
00:10:02 verbose #12375 > > type std_sync_MutexGuard<'T> = class end
00:10:02 verbose #12376 > > #if FABLE_COMPILER
00:10:02 verbose #12377 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:10:02 verbose #12378 > > #endif
00:10:02 verbose #12379 > > type std_sync_PoisonError<'T> = class end
00:10:02 verbose #12380 > > #if FABLE_COMPILER
00:10:02 verbose #12381 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]]
00:10:02 verbose #12382 > > #endif
00:10:02 verbose #12383 > > type std_sync_mpsc_Receiver<'T> = class end
00:10:02 verbose #12384 > > #if FABLE_COMPILER
00:10:02 verbose #12385 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]]
00:10:02 verbose #12386 > > #endif
00:10:02 verbose #12387 > > type std_sync_mpsc_SendError<'T> = class end
00:10:02 verbose #12388 > > #if FABLE_COMPILER
00:10:02 verbose #12389 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]]
00:10:02 verbose #12390 > > #endif
00:10:02 verbose #12391 > > type std_sync_mpsc_Sender<'T> = class end
00:10:02 verbose #12392 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:10:02 verbose #12393 > > _.Dispose () = f ()
00:10:02 verbose #12394 > > type [[<Struct>]] US0 =
00:10:02 verbose #12395 > > | US0_0 of f0_0 : System.Threading.CancellationToken
00:10:02 verbose #12396 > > | US0_1
00:10:02 verbose #12397 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:10:02 verbose #12398 > > let v1 : bool = true
00:10:02 verbose #12399 > > let mutable _v1 : unit option = None
00:10:02 verbose #12400 > >
00:10:02 verbose #12401 > > #if FABLE_COMPILER || WASM || CONTRACT
00:10:02 verbose #12402 > >
00:10:02 verbose #12403 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT...
00:10:02 verbose #12404 > >
00:10:02 verbose #12405 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:02 verbose #12406 > > #if FABLE_COMPILER
00:10:02 verbose #12407 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:10:02 verbose #12408 > > #endif
00:10:02 verbose #12409 > > type reqwest_Error = class end
00:10:02 verbose #12410 > > #if FABLE_COMPILER
00:10:02 verbose #12411 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:10:02 verbose #12412 > > #endif
00:10:02 verbose #12413 > > type reqwest_RequestBuilder = class end
00:10:02 verbose #12414 > > #if FABLE_COMPILER
00:10:02 verbose #12415 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:10:02 verbose #12416 > > #endif
00:10:02 verbose #12417 > > type reqwest_Response = class end
00:10:02 verbose #12418 > > #if FABLE_COMPILER
00:10:02 verbose #12419 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:10:02 verbose #12420 > > #endif
00:10:02 verbose #12421 > > type std_env_VarError = class end
00:10:02 verbose #12422 > > #if FABLE_COMPILER
00:10:02 verbose #12423 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:10:02 verbose #12424 > > #endif
00:10:02 verbose #12425 > > type core_any_Any = class end
00:10:02 verbose #12426 > > #if FABLE_COMPILER
00:10:02 verbose #12427 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:10:02 verbose #12428 > > #endif
00:10:02 verbose #12429 > > type core_ops_Try<'T> = class end
00:10:02 verbose #12430 > > #if FABLE_COMPILER
00:10:02 verbose #12431 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:10:02 verbose #12432 > > #endif
00:10:02 verbose #12433 > > type Func0<'T> = class end
00:10:02 verbose #12434 > > #if FABLE_COMPILER
00:10:02 verbose #12435 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:10:02 verbose #12436 > > #endif
00:10:02 verbose #12437 > > type Func0<'T, 'U> = class end
00:10:02 verbose #12438 > > #if FABLE_COMPILER
00:10:02 verbose #12439 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:10:02 verbose #12440 > > #endif
00:10:02 verbose #12441 > > type Box<'T> = class end
00:10:02 verbose #12442 > > #if FABLE_COMPILER
00:10:02 verbose #12443 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:10:02 verbose #12444 > > #endif
00:10:02 verbose #12445 > > type Dyn<'T> = class end
00:10:02 verbose #12446 > > #if FABLE_COMPILER
00:10:02 verbose #12447 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]]
00:10:02 verbose #12448 > > #endif
00:10:02 verbose #12449 > > type Send<'T> = class end
00:10:02 verbose #12450 > > #if FABLE_COMPILER
00:10:02 verbose #12451 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:10:02 verbose #12452 > > #endif
00:10:02 verbose #12453 > > type Fn<'T> = class end
00:10:02 verbose #12454 > > #if FABLE_COMPILER
00:10:02 verbose #12455 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:10:02 verbose #12456 > > #endif
00:10:02 verbose #12457 > > type FnUnit = class end
00:10:02 verbose #12458 > > #if FABLE_COMPILER
00:10:02 verbose #12459 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:10:02 verbose #12460 > > #...
00:10:04 verbose #12461 > >
00:10:04 verbose #12462 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:04 verbose #12463 > > #if FABLE_COMPILER
00:10:04 verbose #12464 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:10:04 verbose #12465 > > #endif
00:10:04 verbose #12466 > > type clap_Arg = class end
00:10:04 verbose #12467 > > #if FABLE_COMPILER
00:10:04 verbose #12468 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:10:04 verbose #12469 > > #endif
00:10:04 verbose #12470 > > type clap_ArgAction = class end
00:10:04 verbose #12471 > > #if FABLE_COMPILER
00:10:04 verbose #12472 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:10:04 verbose #12473 > > #endif
00:10:04 verbose #12474 > > type clap_Command = class end
00:10:04 verbose #12475 > > #if FABLE_COMPILER
00:10:04 verbose #12476 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:10:04 verbose #12477 > > #endif
00:10:04 verbose #12478 > > type clap_ArgMatches = class end
00:10:04 verbose #12479 > > #if FABLE_COMPILER
00:10:04 verbose #12480 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:10:04 verbose #12481 > > #endif
00:10:04 verbose #12482 > > type clap_builder_ValueRange = class end
00:10:04 verbose #12483 > > #if FABLE_COMPILER
00:10:04 verbose #12484 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:10:04 verbose #12485 > > #endif
00:10:04 verbose #12486 > > type clap_builder_ValueParser = class end
00:10:04 verbose #12487 > > #if FABLE_COMPILER
00:10:04 verbose #12488 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:10:04 verbose #12489 > > #endif
00:10:04 verbose #12490 > > type clap_builder_PossibleValue = class end
00:10:04 verbose #12491 > > #if FABLE_COMPILER
00:10:04 verbose #12492 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:10:04 verbose #12493 > > #endif
00:10:04 verbose #12494 > > type std_process_Child = class end
00:10:04 verbose #12495 > > #if FABLE_COMPILER
00:10:04 verbose #12496 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:10:04 verbose #12497 > > #endif
00:10:04 verbose #12498 > > type std_process_ChildStderr = class end
00:10:04 verbose #12499 > > #if FABLE_COMPILER
00:10:04 verbose #12500 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:10:04 verbose #12501 > > #endif
00:10:04 verbose #12502 > > type std_process_ChildStdout = class end
00:10:04 verbose #12503 > > #if FABLE_COMPILER
00:10:04 verbose #12504 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:10:04 verbose #12505 > > #endif
00:10:04 verbose #12506 > > type std_process_ChildStdin = class end
00:10:04 verbose #12507 > > #if FABLE_COMPILER
00:10:04 verbose #12508 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:10:04 verbose #12509 > > #endif
00:10:04 verbose #12510 > > type std_process_Command = class ...
00:10:07 verbose #12511 > >
00:10:07 verbose #12512 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:07 verbose #12513 > > #if FABLE_COMPILER
00:10:07 verbose #12514 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:10:07 verbose #12515 > > #endif
00:10:07 verbose #12516 > > type std_fs_File = class end
00:10:07 verbose #12517 > > #if FABLE_COMPILER
00:10:07 verbose #12518 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:10:07 verbose #12519 > > #endif
00:10:07 verbose #12520 > > type std_fs_FileType = class end
00:10:07 verbose #12521 > > #if FABLE_COMPILER
00:10:07 verbose #12522 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:10:07 verbose #12523 > > #endif
00:10:07 verbose #12524 > > type std_path_Display = class end
00:10:07 verbose #12525 > > #if FABLE_COMPILER
00:10:07 verbose #12526 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:10:07 verbose #12527 > > #endif
00:10:07 verbose #12528 > > type std_path_Path = class end
00:10:07 verbose #12529 > > #if FABLE_COMPILER
00:10:07 verbose #12530 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:10:07 verbose #12531 > > #endif
00:10:07 verbose #12532 > > type std_path_PathBuf = class end
00:10:07 verbose #12533 > > #if FABLE_COMPILER
00:10:07 verbose #12534 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:10:07 verbose #12535 > > #endif
00:10:07 verbose #12536 > > type async_walkdir_DirEntry = class end
00:10:07 verbose #12537 > > #if FABLE_COMPILER
00:10:07 verbose #12538 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:10:07 verbose #12539 > > #endif
00:10:07 verbose #12540 > > type async_walkdir_Filtering = class end
00:10:07 verbose #12541 > > #if FABLE_COMPILER
00:10:07 verbose #12542 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:10:07 verbose #12543 > > #endif
00:10:07 verbose #12544 > > type async_walkdir_WalkDir = class end
00:10:07 verbose #12545 > > #if FABLE_COMPILER
00:10:07 verbose #12546 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]]
00:10:07 verbose #12547 > > #endif
00:10:07 verbose #12548 > > type core_any_Any = class end
00:10:07 verbose #12549 > > #if FABLE_COMPILER
00:10:07 verbose #12550 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:10:07 verbose #12551 > > #endif
00:10:07 verbose #12552 > > type core_ops_Try<'T> = class end
00:10:07 verbose #12553 > > #if FABLE_COMPILER
00:10:07 verbose #12554 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:10:07 verbose #12555 > > #endif
00:10:07 verbose #12556 > > type Func0<'T> = class end
00:10:07 verbose #12557 > > #if FABLE_COMPILER
00:10:07 verbose #12558 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:10:07 verbose #12559 > > #endif
00:10:07 verbose #12560 > > type Func0<'T, 'U> = class end
00:10:07 verbose #12561 > > #if FABLE_COMPILER
00:10:07 verbose #12562 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:10:07 verbose #12563 > > #endif
00:10:07 verbose #12564 > > type Box<'T> = clas...
00:10:11 verbose #12565 > >
00:10:11 verbose #12566 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:11 verbose #12567 > > module SpiralTrace =
00:10:11 verbose #12568 > > let trace x =
00:10:11 verbose #12569 > > #if !INTERACTIVE
00:10:11 verbose #12570 > > Trace.trace x
00:10:11 verbose #12571 > > #else
00:10:11 verbose #12572 > > trace x
00:10:11 verbose #12573 > > #endif
00:10:11 verbose #12574 > >
00:10:11 verbose #12575 > > type TraceLevel =
00:10:11 verbose #12576 > > #if !INTERACTIVE
00:10:11 verbose #12577 > > Trace.US0
00:10:11 verbose #12578 > > #else
00:10:11 verbose #12579 > > US0
00:10:11 verbose #12580 > > #endif
00:10:11 verbose #12581 > >
00:10:11 verbose #12582 > > module SpiralCrypto =
00:10:11 verbose #12583 > > let hash_text x =
00:10:11 verbose #12584 > > #if !INTERACTIVE
00:10:11 verbose #12585 > > Crypto.hash_text x
00:10:11 verbose #12586 > > #else
00:10:11 verbose #12587 > > hash_text x
00:10:11 verbose #12588 > > #endif
00:10:11 verbose #12589 > >
00:10:11 verbose #12590 > > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:10:11 verbose #12591 > >
00:10:11 verbose #12592 > > module SpiralAsync =
00:10:11 verbose #12593 > > let merge_cancellation_token_with_default_async x =
00:10:11 verbose #12594 > > #if !INTERACTIVE
00:10:11 verbose #12595 > > Async_.merge_cancellation_token_with_default_async x
00:10:11 verbose #12596 > > #else
00:10:11 verbose #12597 > > merge_cancellation_token_with_default_async x
00:10:11 verbose #12598 > > #endif
00:10:11 verbose #12599 > >
00:10:11 verbose #12600 > > module SpiralThreading =
00:10:11 verbose #12601 > > let new_disposable_token x =
00:10:11 verbose #12602 > > #if !INTERACTIVE
00:10:11 verbose #12603 > > Threading.new_disposable_token x
00:10:11 verbose #12604 > > #else
00:10:11 verbose #12605 > > new_disposable_token x
00:10:11 verbose #12606 > > #endif
00:10:11 verbose #12607 > >
00:10:11 verbose #12608 > > module SpiralNetworking =
00:10:11 verbose #12609 > > let test_port_open x =
00:10:11 verbose #12610 > > #if !INTERACTIVE
00:10:11 verbose #12611 > > Networking.test_port_open x
00:10:11 verbose #12612 > > #else
00:10:11 verbose #12613 > > test_port_open x
00:10:11 verbose #12614 > > #endif
00:10:11 verbose #12615 > >
00:10:11 verbose #12616 > > let test_port_open_timeout x =
00:10:11 verbose #12617 > > #if !INTERACTIVE
00:10:11 verbose #12618 > > Networking.test_port_open_timeout x
00:10:11 verbose #12619 > > #else
00:10:11 verbose #12620 > > test_port_open_timeout x
00:10:11 verbose #12621 > > #endif
00:10:11 verbose #12622 > >
00:10:11 verbose #12623 > > let wait_for_port_access x =
00:10:11 verbose #12624 > > #if !INTERACTIVE
00:10:11 verbose #12625 > > Networking.wait_for_port_access x
00:10:11 verbose #12626 > > #else
00:10:11 verbose #12627 > > wait_for_port_access x
00:10:11 verbose #12628 > > #endif
00:10:11 verbose #12629 > >
00:10:11 verbose #12630 > > let get_available_port x =
00:10:11 verbose #12631 > > #if !INTERACTIVE
00:10:11 verbose #12632 > > Networking.get_available_port x
00:10:11 verbose #12633 > > #else
00:10:11 verbose #12634 > > get_available_port x
00:10:11 verbose #12635 > > #endif
00:10:11 verbose #12636 > >
00:10:11 verbose #12637 > > module SpiralRuntime =
00:10:11 verbose #12638 > > let get_executable_suffix () =
00:10:11 verbose #12639 > > #if !INTERACTIVE
00:10:11 verbose #12640 > > Runtime.get_executable_suffix ()
00:10:11 verbose #12641 > > #else
00:10:11 verbose #12642 > > get_executable_suffix ()
00:10:11 verbose #12643 > > #endif
00:10:11 verbose #12644 > >
00:10:11 verbose #12645 > > let is_windows () =
00:10:11 verbose #12646 > > #if !INTERACTIVE
00:10:11 verbose #12647 > > ...
00:10:11 verbose #12648 > >
00:10:11 verbose #12649 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:11 verbose #12650 > > #if !INTERACTIVE
00:10:11 verbose #12651 > > namespace Polyglot
00:10:11 verbose #12652 > > #endif
00:10:11 verbose #12653 > >
00:10:11 verbose #12654 > > module Common =
00:10:11 verbose #12655 > >
00:10:11 verbose #12656 > > #if !INTERACTIVE
00:10:11 verbose #12657 > > open Lib
00:10:11 verbose #12658 > > #endif
00:10:11 verbose #12659 > >
00:10:11 verbose #12660 > > let nl = System.Environment.NewLine
00:10:11 verbose #12661 > > let q = @""""
00:10:11 verbose #12662 > >
00:10:11 verbose #12663 > > let inline cons head tail = head :: tail
00:10:11 verbose #12664 > >
00:10:11 verbose #12665 > > /// ## memoize
00:10:11 verbose #12666 > > let inline memoize fn =
00:10:11 verbose #12667 > > let result = lazy fn ()
00:10:11 verbose #12668 > > fun () -> result.Value
00:10:11 verbose #12669 > >
00:10:11 verbose #12670 > > /// ## TraceLevel
00:10:11 verbose #12671 > > type TraceLevel =
00:10:11 verbose #12672 > > | Verbose
00:10:11 verbose #12673 > > | Debug
00:10:11 verbose #12674 > > | Info
00:10:11 verbose #12675 > > | Warning
00:10:11 verbose #12676 > > | Critical
00:10:11 verbose #12677 > >
00:10:11 verbose #12678 > > let inline _locals () = ""
00:10:11 verbose #12679 > >
00:10:11 verbose #12680 > > /// ## trace
00:10:11 verbose #12681 > > let to_trace_level = function
00:10:11 verbose #12682 > > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:10:11 verbose #12683 > > | Debug -> SpiralTrace.TraceLevel.US0_1
00:10:11 verbose #12684 > > | Info -> SpiralTrace.TraceLevel.US0_2
00:10:11 verbose #12685 > > | Warning -> SpiralTrace.TraceLevel.US0_3
00:10:11 verbose #12686 > > | Critical -> SpiralTrace.TraceLevel.US0_4
00:10:11 verbose #12687 > >
00:10:11 verbose #12688 > > let trace level fn locals =
00:10:11 verbose #12689 > > let level = level |> to_trace_level
00:10:11 verbose #12690 > > SpiralTrace.trace level fn locals
00:10:11 verbose #12691 > >
00:10:11 verbose #12692 > >
00:10:11 verbose #12693 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:11 verbose #12694 > > #if !INTERACTIVE
00:10:11 verbose #12695 > > namespace Polyglot
00:10:11 verbose #12696 > > #endif
00:10:11 verbose #12697 > >
00:10:11 verbose #12698 > > module CommonFSharp =
00:10:11 verbose #12699 > >
00:10:11 verbose #12700 > > open Common
00:10:11 verbose #12701 > >
00:10:11 verbose #12702 > > /// ## getUnionCaseName
00:10:11 verbose #12703 > > let inline getUnionCaseName<'T> (x: 'T) =
00:10:11 verbose #12704 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:10:11 verbose #12705 > > | case, _ -> case.Name
00:10:11 verbose #12706 > >
00:10:11 verbose #12707 > >
00:10:11 verbose #12708 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:11 verbose #12709 > > #if !INTERACTIVE
00:10:11 verbose #12710 > > namespace Polyglot
00:10:11 verbose #12711 > > #endif
00:10:11 verbose #12712 > >
00:10:11 verbose #12713 > > module Async =
00:10:11 verbose #12714 > >
00:10:11 verbose #12715 > > #if !INTERACTIVE
00:10:11 verbose #12716 > > open Lib
00:10:11 verbose #12717 > > #endif
00:10:11 verbose #12718 > >
00:10:11 verbose #12719 > > open Common
00:10:11 verbose #12720 > >
00:10:11 verbose #12721 > > /// ## choice
00:10:11 verbose #12722 > > let inline choice asyncs = async {
00:10:11 verbose #12723 > > let e = Event<_> ()
00:10:11 verbose #12724 > > use cts = new System.Threading.CancellationTokenSource ()
00:10:11 verbose #12725 > > let fn =
00:10:11 verbose #12726 > > asyncs
00:10:11 verbose #12727 > > |> Seq.map (fun a -> async {
00:10:11 verbose #12728 > > let! x = a
00:10:11 verbose #12729 > > e.Trigger x
00:10:11 verbose #12730 > > })
00:10:11 verbose #12731 > > |> Async.Parallel
00:10:11 verbose #12732 > > |> Async.Ignore
00:10:11 verbose #12733 > > Async.Start (fn, cts.Token)
00:10:11 verbose #12734 > > let! result = Async.AwaitEvent e.Publish
00:10:11 verbose #12735 > > cts.Cancel ()
00:10:11 verbose #12736 > > return result
00:10:11 verbose #12737 > > }
00:10:11 verbose #12738 > >
00:10:11 verbose #12739 > > /// ## map
00:10:11 verbose #12740 > > let inline map fn a = async {
00:10:11 verbose #12741 > > let! x = a
00:10:11 verbose #12742 > > return fn x
00:10:11 verbose #12743 > > }
00:10:11 verbose #12744 > >
00:10:11 verbose #12745 > > /// ## catch
00:10:11 verbose #12746 > > let inline catch a =
00:10:11 verbose #12747 > > a
00:10:11 verbose #12748 > > |> Async.Catch
00:10:11 verbose #12749 > > |> map (function
00:10:11 verbose #12750 > > | Choice1Of2 result -> Ok result
00:10:11 verbose #12751 > > | Choice2Of2 ex -> Error ex
00:10:11 verbose #12752 > > )
00:10:11 verbose #12753 > >
00:10:11 verbose #12754 > > /// ## runWithTimeoutChoiceAsync
00:10:11 verbose #12755 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:10:11 verbose #12756 > > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:10:11 verbose #12757 > >
00:10:11 verbose #12758 > > let timeoutTask = async {
00:10:11 verbose #12759 > > do! Async.Sleep timeout
00:10:11 verbose #12760 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:10:11 verbose #12761 > > return None
00:10:11 verbose #12762 > > }
00:10:11 verbose #12763 > >
00:10:11 verbose #12764 > > let task = async {
00:10:11 verbose #12765 > > try
00:10:11 verbose #12766 > > let! result = fn
00:10:11 verbose #12767 > > return Some result
00:10:11 verbose #12768 > > with
00:10:11 verbose #12769 > > | :? System.AggregateException as ex when
00:10:11 verbose #12770 > > ex.InnerExceptions
00:10:11 verbose #12771 > > |> Seq.exists (function :? Sys...
00:10:12 verbose #12772 > >
00:10:12 verbose #12773 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:12 verbose #12774 > > #if !INTERACTIVE
00:10:12 verbose #12775 > > namespace Polyglot
00:10:12 verbose #12776 > > #endif
00:10:12 verbose #12777 > >
00:10:12 verbose #12778 > > module AsyncSeq =
00:10:12 verbose #12779 > >
00:10:12 verbose #12780 > > #if !INTERACTIVE
00:10:12 verbose #12781 > > open Lib
00:10:12 verbose #12782 > > #endif
00:10:12 verbose #12783 > >
00:10:12 verbose #12784 > > open Common
00:10:12 verbose #12785 > >
00:10:12 verbose #12786 > > /// ## subscribeEvent
00:10:12 verbose #12787 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:10:12 verbose #12788 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:10:12 verbose #12789 > > 'A>(event.AddHandler, event.RemoveHandler)
00:10:12 verbose #12790 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:10:12 verbose #12791 > > event.EventArgs)
00:10:12 verbose #12792 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:10:12 verbose #12793 > >
00:10:12 verbose #12794 > > /// ## subscribeToken
00:10:12 verbose #12795 > > let subscribeToken (token : System.Threading.CancellationToken) =
00:10:12 verbose #12796 > > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:10:12 verbose #12797 > > System.Action tcs.SetResult |> token.Register |> ignore
00:10:12 verbose #12798 > > let start = System.DateTime.Now.Ticks
00:10:12 verbose #12799 > > FSharp.Control.AsyncSeq.unfoldAsync
00:10:12 verbose #12800 > > (fun () -> async {
00:10:12 verbose #12801 > > do! tcs.Task |> Async.AwaitTask
00:10:12 verbose #12802 > > return Some (System.DateTime.Now.Ticks - start, ())
00:10:12 verbose #12803 > > })
00:10:12 verbose #12804 > > ()
00:10:12 verbose #12805 > >
00:10:12 verbose #12806 > >
00:10:12 verbose #12807 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:12 verbose #12808 > > #if !INTERACTIVE
00:10:12 verbose #12809 > > namespace Polyglot
00:10:12 verbose #12810 > > #endif
00:10:12 verbose #12811 > >
00:10:12 verbose #12812 > > module Runtime =
00:10:12 verbose #12813 > >
00:10:12 verbose #12814 > > #if !INTERACTIVE
00:10:12 verbose #12815 > > open Lib
00:10:12 verbose #12816 > > #endif
00:10:12 verbose #12817 > >
00:10:12 verbose #12818 > > open Common
00:10:12 verbose #12819 > >
00:10:12 verbose #12820 > > /// ## parseArgs
00:10:12 verbose #12821 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:10:12 verbose #12822 > > let assemblyName =
00:10:12 verbose #12823 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:10:12 verbose #12824 > > let errorHandler : Argu.IExiter =
00:10:12 verbose #12825 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:10:12 verbose #12826 > > List.contains assemblyName
00:10:12 verbose #12827 > > then Argu.ExceptionExiter ()
00:10:12 verbose #12828 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:10:12 verbose #12829 > > _ -> Some System.ConsoleColor.Red)
00:10:12 verbose #12830 > >
00:10:12 verbose #12831 > > let parser =
00:10:12 verbose #12832 > > Argu.ArgumentParser.Create<'T> (
00:10:12 verbose #12833 > > programName =
00:10:12 verbose #12834 > > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:10:12 verbose #12835 > > errorHandler = errorHandler
00:10:12 verbose #12836 > > )
00:10:12 verbose #12837 > >
00:10:12 verbose #12838 > > parser.ParseCommandLine args
00:10:12 verbose #12839 > >
00:10:12 verbose #12840 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:10:12 verbose #12841 > > args
00:10:12 verbose #12842 > > |> parseArgs<'T>
00:10:12 verbose #12843 > > |> fun results -> results.GetAllResults ()
00:10:12 verbose #12844 > >
00:10:12 verbose #12845 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:10:12 verbose #12846 > > args
00:10:12 verbose #12847 > > |> parseAllArgs<'T>
00:10:12 verbose #12848 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:10:12 verbose #12849 > > |> Map.ofList
00:10:12 verbose #12850 > >
00:10:12 verbose #12851 > >
00:10:12 verbose #12852 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:12 verbose #12853 > > #if !INTERACTIVE
00:10:12 verbose #12854 > > namespace Polyglot
00:10:12 verbose #12855 > > #endif
00:10:12 verbose #12856 > >
00:10:12 verbose #12857 > > module FileSystem =
00:10:12 verbose #12858 > >
00:10:12 verbose #12859 > > #if !INTERACTIVE
00:10:12 verbose #12860 > > open Lib
00:10:12 verbose #12861 > > #endif
00:10:12 verbose #12862 > >
00:10:12 verbose #12863 > > open Common
00:10:12 verbose #12864 > > open SpiralFileSystem.Operators
00:10:12 verbose #12865 > >
00:10:12 verbose #12866 > > /// ## watchDirectory
00:10:12 verbose #12867 > > [[<RequireQualifiedAccess>]]
00:10:12 verbose #12868 > > type FileSystemChangeType =
00:10:12 verbose #12869 > > | Failure
00:10:12 verbose #12870 > > | Changed
00:10:12 verbose #12871 > > | Created
00:10:12 verbose #12872 > > | Deleted
00:10:12 verbose #12873 > > | Renamed
00:10:12 verbose #12874 > >
00:10:12 verbose #12875 > > [[<RequireQualifiedAccess>]]
00:10:12 verbose #12876 > > type FileSystemChange =
00:10:12 verbose #12877 > > | Failure of exn: exn
00:10:12 verbose #12878 > > | Changed of path: string * content: string option
00:10:12 verbose #12879 > > | Created of path: string * content: string option
00:10:12 verbose #12880 > > | Deleted of path: string
00:10:12 verbose #12881 > > | Renamed of oldPath: string * (string * string option)
00:10:12 verbose #12882 > >
00:10:12 verbose #12883 > >
00:10:12 verbose #12884 > > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:10:12 verbose #12885 > > let fullPath = path |> System.IO.Path.GetFullPath
00:10:12 verbose #12886 > > let _locals () = $"filter: {filter} / {_locals ()}"
00:10:12 verbose #12887 > >
00:10:12 verbose #12888 > > let watcher =
00:10:12 verbose #12889 > > new System.IO.FileSystemWatcher (
00:10:12 verbose #12890 > > Path = fullPath,
00:10:12 verbose #12891 > > NotifyFilter = filter,
00:10:12 verbose #12892 > > EnableRaisingEvents = true,
00:10:12 verbose #12893 > > IncludeSubdirectories = true
00:10:12 verbose #12894 > > )
00:10:12 verbose #12895 > >
00:10:12 verbose #12896 > > let inline getEventPath (path : string) =
00:10:12 verbose #12897 > > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:10:12 verbose #12898 > > SpiralSm.trim_start [[| '/'; '\\' |]]
00:10:12 verbose #12899 > >
00:10:12 verbose #12900 > > let inline ticks () =
00:10:12 verbose #12901 > > System.DateTime.UtcNow.Ticks
00:10:12 verbose #12902 > >
00:10:12 verbose #12903 > > let changedStream =
00:10:12 verbose #12904 > > AsyncSeq.subscribeEvent
00:10:12 verbose #12905 > > watcher.Changed
00:10:12 verbose #12906 > > (fun event ->
00:10:12 verbose #12907 > > ticks (),
00:10:12 verbose #12908 > > [[ FileSystemChange...
00:10:13 verbose #12909 > >
00:10:13 verbose #12910 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:13 verbose #12911 > > #if !INTERACTIVE
00:10:13 verbose #12912 > > open Lib
00:10:13 verbose #12913 > > #endif
00:10:13 verbose #12914 > >
00:10:13 verbose #12915 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:13 verbose #12916 > > open Common
00:10:13 verbose #12917 > > open SpiralFileSystem.Operators
00:10:13 verbose #12918 > >
00:10:13 verbose #12919 > > ── fsharp - import ─────────────────────────────────────────────────────────────
00:10:13 verbose #12920 > > let workspaceRoot = SpiralFileSystem.get_workspace_root ()
00:10:13 verbose #12921 > > let tmpSpiralPath = workspaceRoot </> "target/polyglot/plotting"
00:10:13 verbose #12922 > > let linePlotsDataPath = tmpSpiralPath </> "line_data"
00:10:13 verbose #12923 > > let linePlotsSvgPath = tmpSpiralPath </> "line_svg"
00:10:13 verbose #12924 > >
00:10:13 verbose #12925 > > [[ tmpSpiralPath; linePlotsDataPath; linePlotsSvgPath ]]
00:10:13 verbose #12926 > > |> List.iter (fun dir -> if Directory.Exists dir |> not then
00:10:13 verbose #12927 > > Directory.CreateDirectory dir |> ignore)
00:10:13 verbose #12928 > >
00:10:13 verbose #12929 > > Formatter.Register<struct (string * string * string * struct (string * float
00:10:13 verbose #12930 > > array * float array) array)> (
00:10:13 verbose #12931 > > (fun struct (caption, x_desc, y_desc, ys) ->
00:10:13 verbose #12932 > > let json = (caption, x_desc, y_desc, ys) |> FSharp.Json.Json.serialize
00:10:13 verbose #12933 > > async {
00:10:13 verbose #12934 > > let hashHex = json |> SpiralCrypto.hash_text
00:10:13 verbose #12935 > > let svgPath = linePlotsSvgPath </> $"{hashHex}.svg"
00:10:13 verbose #12936 > >
00:10:13 verbose #12937 > > if System.IO.File.Exists svgPath |> not then
00:10:13 verbose #12938 > > do! json |> SpiralFileSystem.write_all_text_async
00:10:13 verbose #12939 > > $"{linePlotsDataPath </> hashHex}.json"
00:10:13 verbose #12940 > >
00:10:13 verbose #12941 > > let ct =
00:10:13 verbose #12942 > > Microsoft.DotNet.Interactive.KernelInvocationContext.Current.CancellationToken
00:10:13 verbose #12943 > >
00:10:13 verbose #12944 > > let oldLevel = get_trace_level ()
00:10:13 verbose #12945 > > SpiralTrace.TraceLevel.US0_2
00:10:13 verbose #12946 > > |> set_trace_level
00:10:13 verbose #12947 > > use _ = (new_disposable (fun () ->
00:10:13 verbose #12948 > > oldLevel |> set_trace_level
00:10:13 verbose #12949 > > ))
00:10:13 verbose #12950 > >
00:10:13 verbose #12951 > > let plotExePath = workspaceRoot </>
00:10:13 verbose #12952 > > $"workspace/target/release/plot{SpiralRuntime.get_executable_suffix ()}"
00:10:13 verbose #12953 > > let! exitCode, result =
00:10:13 verbose #12954 > > SpiralRuntime.execution_options (f...
00:10:13 verbose #12955 > >
00:10:13 verbose #12956 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:13 verbose #12957 > > //// test
00:10:13 verbose #12958 > >
00:10:13 verbose #12959 > > open testing
00:10:13 verbose #12960 > >
00:10:13 verbose #12961 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:10:13 verbose #12962 > > #r
00:10:13 verbose #12963 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:10:13 verbose #12964 > > otNet.Interactive.Spiral.dll"
00:10:13 verbose #12965 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:10:13 verbose #12966 > > #r
00:10:13 verbose #12967 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:10:13 verbose #12968 > > otNet.Interactive.dll"
00:10:13 verbose #12969 > > open type Microsoft.DotNet.Interactive.Kernel
00:10:15 verbose #12970 > >
00:10:15 verbose #12971 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:15 verbose #12972 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:15 verbose #12973 > > │ ## init_series │
00:10:15 verbose #12974 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:15 verbose #12975 > >
00:10:15 verbose #12976 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:15 verbose #12977 > > //// test
00:10:15 verbose #12978 > >
00:10:15 verbose #12979 > > inl x : a _ f64 = am'.init_series -3 3 0.01
00:10:15 verbose #12980 > > inl y = x |> am.map math.square
00:10:15 verbose #12981 > > "square", "x", "y", ;[[ "square", x, y ]]
00:10:15 verbose #12982 > >
00:10:15 verbose #12983 > > ╭─[ 145.39ms - return value ]──────────────────────────────────────────────────╮
00:10:15 verbose #12984 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:15 verbose #12985 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:15 verbose #12986 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:15 verbose #12987 > > │ stroke="none"/> │
00:10:15 verbose #12988 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:15 verbose #12989 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:15 verbose #12990 > > │ fill="#FFFFFF"> │
00:10:15 verbose #12991 > > │ square │
00:10:15 verbose #12992 > > │ </text> │
00:10:15 verbose #12993 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:10:15 verbose #12994 > > │ y2="75"/> │
00:10:15 verbose #12995 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:15 verbose #12996 > > │ y2="75"/> │
00:10:15 verbose #12997 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:10:15 verbose #12998 > > │ y2="75"/> │
00:10:15 verbose #12999 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:10:15 verbose #13000 > > │ y2="75"/> │
00:10:15 verbose #13001 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:10:15 verbose #13002 > > │ y2="75"/> │
00:10:15 verbose #13003 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:10:15 verbose #13004 > > │ x2="103" y2="75"/> │
00:10:15 verbose #13005 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:10:15 verbose #13006 > > │ x2="111" y2="75"/> │
00:10:15 verbose #13007 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:15 verbose #13008 > > │ x2="119" y2="75"/> │
00:10:15 verbose #13009 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:10:15 verbose #13010 > > │ x2="128" y2="75"/> │
00:10:15 verbose #13011 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:10:15 verbose #13012 > > │ x2="136" y2="75"/> │
00:10:15 verbose #13013 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:10:15 verbose #13014 > > │ x2="144" y2="75"/> │
00:10:15 verbose #13015 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:10:15 verbose #13016 > > │ x2="153" y2="75"/> │
00:10:15 verbose #13017 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:10:15 verbose #13018 > > │ x2="161" y2="75"/> │
00:10:15 verbose #13019 > > │ <line opacity="1" stroke="#3... │
00:10:15 verbose #13020 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:15 verbose #13021 > >
00:10:15 verbose #13022 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:15 verbose #13023 > > //// test
00:10:15 verbose #13024 > >
00:10:15 verbose #13025 > > inl x : a _ f64 = am'.init_series -10 10 0.1
00:10:15 verbose #13026 > > inl y_sin = x |> am.map sin
00:10:15 verbose #13027 > > inl y_cos = x |> am.map cos
00:10:15 verbose #13028 > > "sin cos", "x", "y", ;[[ "sin", x, y_sin; "cos", x, y_cos ]]
00:10:15 verbose #13029 > >
00:10:15 verbose #13030 > > ╭─[ 128.05ms - return value ]──────────────────────────────────────────────────╮
00:10:15 verbose #13031 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:15 verbose #13032 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:15 verbose #13033 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:15 verbose #13034 > > │ stroke="none"/> │
00:10:15 verbose #13035 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:15 verbose #13036 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:15 verbose #13037 > > │ fill="#FFFFFF"> │
00:10:15 verbose #13038 > > │ sin cos │
00:10:15 verbose #13039 > > │ </text> │
00:10:15 verbose #13040 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │
00:10:15 verbose #13041 > > │ y2="75"/> │
00:10:15 verbose #13042 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:15 verbose #13043 > > │ y2="75"/> │
00:10:15 verbose #13044 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │
00:10:15 verbose #13045 > > │ y2="75"/> │
00:10:15 verbose #13046 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:10:15 verbose #13047 > > │ y2="75"/> │
00:10:15 verbose #13048 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │
00:10:15 verbose #13049 > > │ x2="107" y2="75"/> │
00:10:15 verbose #13050 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:15 verbose #13051 > > │ x2="119" y2="75"/> │
00:10:15 verbose #13052 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │
00:10:15 verbose #13053 > > │ x2="132" y2="75"/> │
00:10:15 verbose #13054 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:10:15 verbose #13055 > > │ x2="144" y2="75"/> │
00:10:15 verbose #13056 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │
00:10:15 verbose #13057 > > │ x2="157" y2="75"/> │
00:10:15 verbose #13058 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:15 verbose #13059 > > │ x2="169" y2="75"/> │
00:10:15 verbose #13060 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │
00:10:15 verbose #13061 > > │ x2="182" y2="75"/> │
00:10:15 verbose #13062 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │
00:10:15 verbose #13063 > > │ x2="194" y2="75"/> │
00:10:15 verbose #13064 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │
00:10:15 verbose #13065 > > │ x2="207" y2="75"/> │
00:10:15 verbose #13066 > > │ <line opacity="1" stroke=... │
00:10:15 verbose #13067 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:15 verbose #13068 > >
00:10:15 verbose #13069 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:15 verbose #13070 > > //// test
00:10:15 verbose #13071 > >
00:10:15 verbose #13072 > > inl y_pos y0 vy0 ay t =
00:10:15 verbose #13073 > > y0 + vy0 * t + ay * (t |> math.square) / 2
00:10:15 verbose #13074 > >
00:10:15 verbose #13075 > > inl x : a _ f64 = am'.init_series 0 5 0.01
00:10:15 verbose #13076 > > inl y = x |> am.map (y_pos 0 20 -9.8)
00:10:15 verbose #13077 > > "projectile motion", "time (s)", "", ;[[ "height of projectile (m)", x, y ]]
00:10:15 verbose #13078 > >
00:10:15 verbose #13079 > > ╭─[ 63.66ms - return value ]───────────────────────────────────────────────────╮
00:10:15 verbose #13080 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:15 verbose #13081 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:15 verbose #13082 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:15 verbose #13083 > > │ stroke="none"/> │
00:10:15 verbose #13084 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:15 verbose #13085 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:15 verbose #13086 > > │ fill="#FFFFFF"> │
00:10:15 verbose #13087 > > │ projectile motion │
00:10:15 verbose #13088 > > │ </text> │
00:10:15 verbose #13089 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:10:15 verbose #13090 > > │ y2="75"/> │
00:10:15 verbose #13091 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:15 verbose #13092 > > │ y2="75"/> │
00:10:15 verbose #13093 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:10:15 verbose #13094 > > │ y2="75"/> │
00:10:15 verbose #13095 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:10:15 verbose #13096 > > │ y2="75"/> │
00:10:15 verbose #13097 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:10:15 verbose #13098 > > │ y2="75"/> │
00:10:15 verbose #13099 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:10:15 verbose #13100 > > │ x2="109" y2="75"/> │
00:10:15 verbose #13101 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:15 verbose #13102 > > │ x2="119" y2="75"/> │
00:10:15 verbose #13103 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:15 verbose #13104 > > │ x2="129" y2="75"/> │
00:10:15 verbose #13105 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:15 verbose #13106 > > │ x2="139" y2="75"/> │
00:10:15 verbose #13107 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:10:15 verbose #13108 > > │ x2="149" y2="75"/> │
00:10:15 verbose #13109 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:10:15 verbose #13110 > > │ x2="159" y2="75"/> │
00:10:15 verbose #13111 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:15 verbose #13112 > > │ x2="169" y2="75"/> │
00:10:15 verbose #13113 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:10:15 verbose #13114 > > │ x2="179" y2="75"/> │
00:10:15 verbose #13115 > > │ <line opacity="1"... │
00:10:15 verbose #13116 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:15 verbose #13117 > >
00:10:15 verbose #13118 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:15 verbose #13119 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:15 verbose #13120 > > │ ## velocity_cf │
00:10:15 verbose #13121 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:15 verbose #13122 > >
00:10:15 verbose #13123 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:15 verbose #13124 > > type mass = f64
00:10:15 verbose #13125 > > type time = f64
00:10:15 verbose #13126 > > type position = f64
00:10:15 verbose #13127 > > type velocity = f64
00:10:15 verbose #13128 > > type force = f64
00:10:15 verbose #13129 > >
00:10:15 verbose #13130 > > type velocity_cf = mass -> velocity -> list force -> (time -> velocity)
00:10:15 verbose #13131 > >
00:10:15 verbose #13132 > > inl velocity_cf m v0 fs =
00:10:15 verbose #13133 > > inl f_net = fs |> listm'.sum
00:10:15 verbose #13134 > > inl a0 = f_net / m
00:10:15 verbose #13135 > > inl v t = v0 + a0 * t
00:10:15 verbose #13136 > > v
00:10:15 verbose #13137 > >
00:10:15 verbose #13138 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:15 verbose #13139 > > //// test
00:10:15 verbose #13140 > >
00:10:15 verbose #13141 > > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 0
00:10:15 verbose #13142 > > |> _assert_eq 0.6
00:10:15 verbose #13143 > >
00:10:15 verbose #13144 > > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 1
00:10:15 verbose #13145 > > |> _assert_eq 0.2
00:10:16 verbose #13146 > >
00:10:16 verbose #13147 > > ╭─[ 57.33ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:16 verbose #13148 > > │ assert_eq / actual: 0.6 / expected: 0.6 │
00:10:16 verbose #13149 > > │ assert_eq / actual: 0.2 / expected: 0.2 │
00:10:16 verbose #13150 > > │ │
00:10:16 verbose #13151 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13152 > >
00:10:16 verbose #13153 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13154 > > //// test
00:10:16 verbose #13155 > >
00:10:16 verbose #13156 > > inl x = am'.init_series 0 4 0.1
00:10:16 verbose #13157 > > inl y = x |> am.map (velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]])
00:10:16 verbose #13158 > > "car on an air track", "time (s)", "", ;[[ "velocity of car (m/s)", x, y ]]
00:10:16 verbose #13159 > >
00:10:16 verbose #13160 > > ╭─[ 79.65ms - return value ]───────────────────────────────────────────────────╮
00:10:16 verbose #13161 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:16 verbose #13162 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:16 verbose #13163 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:16 verbose #13164 > > │ stroke="none"/> │
00:10:16 verbose #13165 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:16 verbose #13166 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:16 verbose #13167 > > │ fill="#FFFFFF"> │
00:10:16 verbose #13168 > > │ car on an air track │
00:10:16 verbose #13169 > > │ </text> │
00:10:16 verbose #13170 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │
00:10:16 verbose #13171 > > │ y2="75"/> │
00:10:16 verbose #13172 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:16 verbose #13173 > > │ y2="75"/> │
00:10:16 verbose #13174 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │
00:10:16 verbose #13175 > > │ y2="75"/> │
00:10:16 verbose #13176 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:10:16 verbose #13177 > > │ y2="75"/> │
00:10:16 verbose #13178 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │
00:10:16 verbose #13179 > > │ x2="107" y2="75"/> │
00:10:16 verbose #13180 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:16 verbose #13181 > > │ x2="119" y2="75"/> │
00:10:16 verbose #13182 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │
00:10:16 verbose #13183 > > │ x2="132" y2="75"/> │
00:10:16 verbose #13184 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:10:16 verbose #13185 > > │ x2="144" y2="75"/> │
00:10:16 verbose #13186 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │
00:10:16 verbose #13187 > > │ x2="157" y2="75"/> │
00:10:16 verbose #13188 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:16 verbose #13189 > > │ x2="169" y2="75"/> │
00:10:16 verbose #13190 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │
00:10:16 verbose #13191 > > │ x2="182" y2="75"/> │
00:10:16 verbose #13192 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │
00:10:16 verbose #13193 > > │ x2="194" y2="75"/> │
00:10:16 verbose #13194 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │
00:10:16 verbose #13195 > > │ x2="207" y2="75"/> │
00:10:16 verbose #13196 > > │ <line opacity... │
00:10:16 verbose #13197 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13198 > >
00:10:16 verbose #13199 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:16 verbose #13200 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:16 verbose #13201 > > │ ## derivative │
00:10:16 verbose #13202 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13203 > >
00:10:16 verbose #13204 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13205 > > type derivative = (f64 -> f64) -> f64 -> f64
00:10:16 verbose #13206 > >
00:10:16 verbose #13207 > > inl derivative dt : derivative =
00:10:16 verbose #13208 > > fun x t =>
00:10:16 verbose #13209 > > (x (t + dt / 2) - x (t - dt / 2)) / dt
00:10:16 verbose #13210 > >
00:10:16 verbose #13211 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13212 > > //// test
00:10:16 verbose #13213 > >
00:10:16 verbose #13214 > > derivative 1 (fun x => x ** 4 / 4) 1 - 1
00:10:16 verbose #13215 > > |> _assert_approx_eq None 0.25
00:10:16 verbose #13216 > >
00:10:16 verbose #13217 > > derivative 0.001 (fun x => x ** 4 / 4) 1 - 1
00:10:16 verbose #13218 > > |> _assert_approx_eq None 0.0000002499998827953931
00:10:16 verbose #13219 > >
00:10:16 verbose #13220 > > derivative 0.000001 (fun x => x ** 4 / 4) 1 - 1
00:10:16 verbose #13221 > > |> _assert_approx_eq None 0.000000000001000088900582341
00:10:16 verbose #13222 > >
00:10:16 verbose #13223 > > derivative 0.000000001 (fun x => x ** 4 / 4) 1 - 1
00:10:16 verbose #13224 > > |> _assert_approx_eq None 0.00000008274037099909037
00:10:16 verbose #13225 > >
00:10:16 verbose #13226 > > derivative 0.000000000001 (fun x => x ** 4 / 4) 1 - 1
00:10:16 verbose #13227 > > |> _assert_approx_eq None 0.00008890058234101161
00:10:16 verbose #13228 > >
00:10:16 verbose #13229 > > derivative 0.000000000000001 (fun x => x ** 4 / 4) 1 - 1
00:10:16 verbose #13230 > > |> _assert_approx_eq None -0.0007992778373592246
00:10:16 verbose #13231 > >
00:10:16 verbose #13232 > > derivative 0.000000000000000001 (fun x => x ** 4 / 4) 1 - 1
00:10:16 verbose #13233 > > |> _assert_approx_eq None -1
00:10:16 verbose #13234 > >
00:10:16 verbose #13235 > > ╭─[ 61.78ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:16 verbose #13236 > > │ assert_approx_eq / actual: 0.25 / expected: 0.25 │
00:10:16 verbose #13237 > > │ assert_approx_eq / actual: 2.499998828e-07 / expected: 2.499998828e-07 │
00:10:16 verbose #13238 > > │ assert_approx_eq / actual: 1.000088901e-12 / expected: 1.000088901e-12 │
00:10:16 verbose #13239 > > │ assert_approx_eq / actual: 8.2740371e-08 / expected: 8.2740371e-08 │
00:10:16 verbose #13240 > > │ assert_approx_eq / actual: 8.890058234e-05 / expected: 8.890058234e-05 │
00:10:16 verbose #13241 > > │ assert_approx_eq / actual: -0.0007992778374 / expected: -0.0007992778374 │
00:10:16 verbose #13242 > > │ assert_approx_eq / actual: -1.0 / expected: -1.0 │
00:10:16 verbose #13243 > > │ │
00:10:16 verbose #13244 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13245 > >
00:10:16 verbose #13246 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:16 verbose #13247 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:16 verbose #13248 > > │ ## integration │
00:10:16 verbose #13249 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13250 > >
00:10:16 verbose #13251 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13252 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64
00:10:16 verbose #13253 > >
00:10:16 verbose #13254 > > inl integral dt : integration =
00:10:16 verbose #13255 > > fun f a b =>
00:10:16 verbose #13256 > > inl rec loop t y =
00:10:16 verbose #13257 > > if t < b
00:10:16 verbose #13258 > > then loop (t + dt) (y + f t * dt)
00:10:16 verbose #13259 > > else t, y
00:10:16 verbose #13260 > > loop (a + dt / 2) 0
00:10:16 verbose #13261 > > |> snd
00:10:16 verbose #13262 > >
00:10:16 verbose #13263 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13264 > > //// test
00:10:16 verbose #13265 > >
00:10:16 verbose #13266 > > integral 0.01 math.square 0 1
00:10:16 verbose #13267 > > |> _assert_approx_eq None 0.33332500000000004
00:10:16 verbose #13268 > >
00:10:16 verbose #13269 > > ╭─[ 32.32ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:16 verbose #13270 > > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │
00:10:16 verbose #13271 > > │ │
00:10:16 verbose #13272 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13273 > >
00:10:16 verbose #13274 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13275 > > inl integral' dt : integration =
00:10:16 verbose #13276 > > fun f a b =>
00:10:16 verbose #13277 > > listm'.init_series (a + dt / 2) (b - dt / 2) dt
00:10:16 verbose #13278 > > |> listm.map (f >> (*) dt)
00:10:16 verbose #13279 > > |> listm'.sum
00:10:16 verbose #13280 > >
00:10:16 verbose #13281 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13282 > > //// test
00:10:16 verbose #13283 > >
00:10:16 verbose #13284 > > integral' 0.1 math.square 0 1
00:10:16 verbose #13285 > > |> _assert_approx_eq None (integral 0.1 math.square 0 1)
00:10:16 verbose #13286 > >
00:10:16 verbose #13287 > > ╭─[ 38.08ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:16 verbose #13288 > > │ assert_approx_eq / actual: 0.3325 / expected: 0.3325 │
00:10:16 verbose #13289 > > │ │
00:10:16 verbose #13290 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13291 > >
00:10:16 verbose #13292 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13293 > > inl integral'' dt : integration =
00:10:16 verbose #13294 > > fun f a b =>
00:10:16 verbose #13295 > > am'.init_series (a + dt / 2) (b - dt / 2) dt
00:10:16 verbose #13296 > > |> am.map (f >> (*) dt)
00:10:16 verbose #13297 > > |> am'.sum
00:10:16 verbose #13298 > >
00:10:16 verbose #13299 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13300 > > //// test
00:10:16 verbose #13301 > >
00:10:16 verbose #13302 > > integral'' 0.01 math.square 0 1
00:10:16 verbose #13303 > > |> _assert_approx_eq None (integral 0.01 math.square 0 1)
00:10:16 verbose #13304 > >
00:10:16 verbose #13305 > > ╭─[ 106.86ms - stdout ]────────────────────────────────────────────────────────╮
00:10:16 verbose #13306 > > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │
00:10:16 verbose #13307 > > │ │
00:10:16 verbose #13308 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13309 > >
00:10:16 verbose #13310 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:16 verbose #13311 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:16 verbose #13312 > > │ ## anti_derivative │
00:10:16 verbose #13313 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13314 > >
00:10:16 verbose #13315 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13316 > > inl anti_derivative dt v0 a t =
00:10:16 verbose #13317 > > v0 + integral' dt a 0 t
00:10:16 verbose #13318 > >
00:10:16 verbose #13319 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:16 verbose #13320 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:16 verbose #13321 > > │ ## velocity_ft │
00:10:16 verbose #13322 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13323 > >
00:10:16 verbose #13324 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13325 > > type velocity_ft = mass -> velocity -> list (time -> force) -> (time ->
00:10:16 verbose #13326 > > velocity)
00:10:16 verbose #13327 > >
00:10:16 verbose #13328 > > inl velocity_ft dt : velocity_ft =
00:10:16 verbose #13329 > > fun m v0 fs =>
00:10:16 verbose #13330 > > inl f_net t = fs |> listm.map (fun f => f t) |> listm'.sum
00:10:16 verbose #13331 > > inl a t = f_net t / m
00:10:16 verbose #13332 > > anti_derivative dt v0 a
00:10:16 verbose #13333 > >
00:10:16 verbose #13334 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:16 verbose #13335 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:16 verbose #13336 > > │ ## position_ft │
00:10:16 verbose #13337 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13338 > >
00:10:16 verbose #13339 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13340 > > type position_ft = mass -> position -> velocity -> list (time -> force) -> (time
00:10:16 verbose #13341 > > -> position)
00:10:16 verbose #13342 > >
00:10:16 verbose #13343 > > inl position_ft dt : position_ft =
00:10:16 verbose #13344 > > fun m x0 v0 fs =>
00:10:16 verbose #13345 > > velocity_ft dt m v0 fs
00:10:16 verbose #13346 > > |> anti_derivative dt x0
00:10:16 verbose #13347 > >
00:10:16 verbose #13348 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13349 > > //// test
00:10:16 verbose #13350 > >
00:10:16 verbose #13351 > > inl pedal_coast (t : time) : force =
00:10:16 verbose #13352 > > inl t_cycle = 20
00:10:16 verbose #13353 > > inl n_complete : i32 = t / t_cycle |> conv
00:10:16 verbose #13354 > > inl remainder = t - conv n_complete * t_cycle
00:10:16 verbose #13355 > > if remainder > 0 && remainder < 10
00:10:16 verbose #13356 > > then 10
00:10:16 verbose #13357 > > else 0
00:10:16 verbose #13358 > >
00:10:16 verbose #13359 > > inl x = am'.init_series -5 45 0.1
00:10:16 verbose #13360 > > inl y = x |> am.map pedal_coast
00:10:16 verbose #13361 > > "child pedaling then coasting", "time (s)", "", ;[[ "force on bike (N)", x, y ]]
00:10:16 verbose #13362 > >
00:10:16 verbose #13363 > > ╭─[ 87.51ms - return value ]───────────────────────────────────────────────────╮
00:10:16 verbose #13364 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:16 verbose #13365 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:16 verbose #13366 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:16 verbose #13367 > > │ stroke="none"/> │
00:10:16 verbose #13368 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:16 verbose #13369 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:16 verbose #13370 > > │ fill="#FFFFFF"> │
00:10:16 verbose #13371 > > │ child pedaling then coasting │
00:10:16 verbose #13372 > > │ </text> │
00:10:16 verbose #13373 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:10:16 verbose #13374 > > │ y2="75"/> │
00:10:16 verbose #13375 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:16 verbose #13376 > > │ y2="75"/> │
00:10:16 verbose #13377 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:10:16 verbose #13378 > > │ y2="75"/> │
00:10:16 verbose #13379 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:10:16 verbose #13380 > > │ y2="75"/> │
00:10:16 verbose #13381 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:10:16 verbose #13382 > > │ y2="75"/> │
00:10:16 verbose #13383 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:10:16 verbose #13384 > > │ x2="109" y2="75"/> │
00:10:16 verbose #13385 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:16 verbose #13386 > > │ x2="119" y2="75"/> │
00:10:16 verbose #13387 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:16 verbose #13388 > > │ x2="129" y2="75"/> │
00:10:16 verbose #13389 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:16 verbose #13390 > > │ x2="139" y2="75"/> │
00:10:16 verbose #13391 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:10:16 verbose #13392 > > │ x2="149" y2="75"/> │
00:10:16 verbose #13393 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:10:16 verbose #13394 > > │ x2="159" y2="75"/> │
00:10:16 verbose #13395 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:16 verbose #13396 > > │ x2="169" y2="75"/> │
00:10:16 verbose #13397 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:10:16 verbose #13398 > > │ x2="179" y2="75"/> │
00:10:16 verbose #13399 > > │ <line ... │
00:10:16 verbose #13400 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13401 > >
00:10:16 verbose #13402 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13403 > > //// test
00:10:16 verbose #13404 > >
00:10:16 verbose #13405 > > inl x = am'.init_series -5 45 1
00:10:16 verbose #13406 > > inl y = x |> am.map (position_ft 0.1f64 20 0 0 [[ pedal_coast ]])
00:10:16 verbose #13407 > > "child pedaling then coasting", "time (s)", "", ;[[ "position of bike (m)", x, y
00:10:16 verbose #13408 > > ]]
00:10:16 verbose #13409 > >
00:10:16 verbose #13410 > > ╭─[ 382.51ms - return value ]──────────────────────────────────────────────────╮
00:10:16 verbose #13411 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:16 verbose #13412 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:16 verbose #13413 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:16 verbose #13414 > > │ stroke="none"/> │
00:10:16 verbose #13415 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:16 verbose #13416 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:16 verbose #13417 > > │ fill="#FFFFFF"> │
00:10:16 verbose #13418 > > │ child pedaling then coasting │
00:10:16 verbose #13419 > > │ </text> │
00:10:16 verbose #13420 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:10:16 verbose #13421 > > │ y2="75"/> │
00:10:16 verbose #13422 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:16 verbose #13423 > > │ y2="75"/> │
00:10:16 verbose #13424 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:10:16 verbose #13425 > > │ y2="75"/> │
00:10:16 verbose #13426 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:10:16 verbose #13427 > > │ y2="75"/> │
00:10:16 verbose #13428 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:10:16 verbose #13429 > > │ y2="75"/> │
00:10:16 verbose #13430 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:10:16 verbose #13431 > > │ x2="109" y2="75"/> │
00:10:16 verbose #13432 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:16 verbose #13433 > > │ x2="119" y2="75"/> │
00:10:16 verbose #13434 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:16 verbose #13435 > > │ x2="129" y2="75"/> │
00:10:16 verbose #13436 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:16 verbose #13437 > > │ x2="139" y2="75"/> │
00:10:16 verbose #13438 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:10:16 verbose #13439 > > │ x2="149" y2="75"/> │
00:10:16 verbose #13440 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:10:16 verbose #13441 > > │ x2="159" y2="75"/> │
00:10:16 verbose #13442 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:16 verbose #13443 > > │ x2="169" y2="75"/> │
00:10:16 verbose #13444 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:10:16 verbose #13445 > > │ x2="179" y2="75"/> │
00:10:16 verbose #13446 > > │ <line ... │
00:10:16 verbose #13447 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13448 > >
00:10:16 verbose #13449 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:16 verbose #13450 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:16 verbose #13451 > > │ ## velocity_fv │
00:10:16 verbose #13452 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:16 verbose #13453 > >
00:10:16 verbose #13454 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:16 verbose #13455 > > inl newton_second_v m fs v0 =
00:10:16 verbose #13456 > > fs |> listm.map (fun f => f v0) |> listm'.sum |> fun x => x / m
00:10:16 verbose #13457 > >
00:10:16 verbose #13458 > > inl update_velocity dt m fs v0 =
00:10:16 verbose #13459 > > v0 + newton_second_v m fs v0 * dt
00:10:16 verbose #13460 > >
00:10:16 verbose #13461 > > inl velocity_fv dt m v0 fs t =
00:10:16 verbose #13462 > > stream.iterate (update_velocity dt m fs) v0
00:10:16 verbose #13463 > > |> stream.try_item (t / dt |> math.round |> abs)
00:10:16 verbose #13464 > > |> optionm'.default_value 0
00:10:17 verbose #13465 > >
00:10:17 verbose #13466 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13467 > > inl f_air drag rho area v =
00:10:17 verbose #13468 > > -drag * rho * area * abs v * v / 2
00:10:17 verbose #13469 > >
00:10:17 verbose #13470 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13471 > > //// test
00:10:17 verbose #13472 > >
00:10:17 verbose #13473 > > inl x = am'.init_series 0 60 0.5
00:10:17 verbose #13474 > > inl y = x |> am.map (velocity_fv 1 70 0f64 [[ fun _ => 100; f_air 2 1.225 0.6
00:10:17 verbose #13475 > > ]])
00:10:17 verbose #13476 > > "bike velocity", "time (s)", "", ;[[ "velocity of bike (m/s)", x, y ]]
00:10:17 verbose #13477 > >
00:10:17 verbose #13478 > > ╭─[ 337.89ms - return value ]──────────────────────────────────────────────────╮
00:10:17 verbose #13479 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:17 verbose #13480 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:17 verbose #13481 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:17 verbose #13482 > > │ stroke="none"/> │
00:10:17 verbose #13483 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:17 verbose #13484 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:17 verbose #13485 > > │ fill="#FFFFFF"> │
00:10:17 verbose #13486 > > │ bike velocity │
00:10:17 verbose #13487 > > │ </text> │
00:10:17 verbose #13488 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:10:17 verbose #13489 > > │ y2="75"/> │
00:10:17 verbose #13490 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:17 verbose #13491 > > │ y2="75"/> │
00:10:17 verbose #13492 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:10:17 verbose #13493 > > │ y2="75"/> │
00:10:17 verbose #13494 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:10:17 verbose #13495 > > │ y2="75"/> │
00:10:17 verbose #13496 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:10:17 verbose #13497 > > │ y2="75"/> │
00:10:17 verbose #13498 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:10:17 verbose #13499 > > │ x2="103" y2="75"/> │
00:10:17 verbose #13500 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:10:17 verbose #13501 > > │ x2="111" y2="75"/> │
00:10:17 verbose #13502 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:17 verbose #13503 > > │ x2="119" y2="75"/> │
00:10:17 verbose #13504 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:10:17 verbose #13505 > > │ x2="128" y2="75"/> │
00:10:17 verbose #13506 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:10:17 verbose #13507 > > │ x2="136" y2="75"/> │
00:10:17 verbose #13508 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:10:17 verbose #13509 > > │ x2="144" y2="75"/> │
00:10:17 verbose #13510 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:10:17 verbose #13511 > > │ x2="153" y2="75"/> │
00:10:17 verbose #13512 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:10:17 verbose #13513 > > │ x2="161" y2="75"/> │
00:10:17 verbose #13514 > > │ <line opacity="1" str... │
00:10:17 verbose #13515 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:17 verbose #13516 > >
00:10:17 verbose #13517 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:17 verbose #13518 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:17 verbose #13519 > > │ ## velocity_ftv │
00:10:17 verbose #13520 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:17 verbose #13521 > >
00:10:17 verbose #13522 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13523 > > inl newton_second_tv m fs (t, v0) =
00:10:17 verbose #13524 > > inl f_net = fs |> listm.map (fun f => f (t, v0)) |> listm'.sum
00:10:17 verbose #13525 > > inl acc = f_net / m
00:10:17 verbose #13526 > > 1, acc
00:10:17 verbose #13527 > >
00:10:17 verbose #13528 > > inl update_tv dt m fs (t, v0) =
00:10:17 verbose #13529 > > inl dtdt, dvdt = newton_second_tv m fs (t, v0)
00:10:17 verbose #13530 > > t + dtdt * dt, v0 + dvdt * dt
00:10:17 verbose #13531 > >
00:10:17 verbose #13532 > > inl velocity_ftv dt m tv0 fs t =
00:10:17 verbose #13533 > > stream.iterate (join update_tv dt m fs) tv0
00:10:17 verbose #13534 > > |> stream.try_item (t / dt |> math.round |> abs)
00:10:17 verbose #13535 > > |> optionm.map snd
00:10:17 verbose #13536 > > |> optionm'.default_value 0
00:10:17 verbose #13537 > >
00:10:17 verbose #13538 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13539 > > //// test
00:10:17 verbose #13540 > >
00:10:17 verbose #13541 > > inl x = am'.init_series 0 100 0.1
00:10:17 verbose #13542 > > inl y =
00:10:17 verbose #13543 > > x
00:10:17 verbose #13544 > > |> am.map (
00:10:17 verbose #13545 > > velocity_ftv 0.1 20 (dyn (0, 0)) [[ fun (t, _) => pedal_coast t; fun (_,
00:10:17 verbose #13546 > > v) => f_air 2 1.225 0.5 v ]]
00:10:17 verbose #13547 > > )
00:10:17 verbose #13548 > > "pedaling and coasting with air", "time (s)", "", ;[[ "velocity of bike (m/s)",
00:10:17 verbose #13549 > > x, y ]]
00:10:17 verbose #13550 > >
00:10:17 verbose #13551 > > ╭─[ 340.42ms - return value ]──────────────────────────────────────────────────╮
00:10:17 verbose #13552 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:17 verbose #13553 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:17 verbose #13554 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:17 verbose #13555 > > │ stroke="none"/> │
00:10:17 verbose #13556 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:17 verbose #13557 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:17 verbose #13558 > > │ fill="#FFFFFF"> │
00:10:17 verbose #13559 > > │ pedaling and coasting with air │
00:10:17 verbose #13560 > > │ </text> │
00:10:17 verbose #13561 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:10:17 verbose #13562 > > │ y2="75"/> │
00:10:17 verbose #13563 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:17 verbose #13564 > > │ y2="75"/> │
00:10:17 verbose #13565 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:10:17 verbose #13566 > > │ y2="75"/> │
00:10:17 verbose #13567 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:10:17 verbose #13568 > > │ y2="75"/> │
00:10:17 verbose #13569 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:10:17 verbose #13570 > > │ y2="75"/> │
00:10:17 verbose #13571 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:10:17 verbose #13572 > > │ x2="109" y2="75"/> │
00:10:17 verbose #13573 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:17 verbose #13574 > > │ x2="119" y2="75"/> │
00:10:17 verbose #13575 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:17 verbose #13576 > > │ x2="129" y2="75"/> │
00:10:17 verbose #13577 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:17 verbose #13578 > > │ x2="139" y2="75"/> │
00:10:17 verbose #13579 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:10:17 verbose #13580 > > │ x2="149" y2="75"/> │
00:10:17 verbose #13581 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:10:17 verbose #13582 > > │ x2="159" y2="75"/> │
00:10:17 verbose #13583 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:17 verbose #13584 > > │ x2="169" y2="75"/> │
00:10:17 verbose #13585 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:10:17 verbose #13586 > > │ x2="179" y2="75"/> │
00:10:17 verbose #13587 > > │ <lin... │
00:10:17 verbose #13588 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:17 verbose #13589 > >
00:10:17 verbose #13590 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:17 verbose #13591 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:17 verbose #13592 > > │ ## velocity_ftxv │
00:10:17 verbose #13593 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:17 verbose #13594 > >
00:10:17 verbose #13595 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13596 > > nominal state_1d = time * position * velocity
00:10:17 verbose #13597 > > nominal rrr = f64 * f64 * f64
00:10:17 verbose #13598 > >
00:10:17 verbose #13599 > > inl newton_second_1d m fs (state_1d (t, x0, v0)) =
00:10:17 verbose #13600 > > inl f_net = fs |> listm.map (fun f => f (state_1d (t, x0, v0))) |>
00:10:17 verbose #13601 > > listm'.sum
00:10:17 verbose #13602 > > inl acc = f_net / m
00:10:17 verbose #13603 > > rrr (1f64, v0, acc)
00:10:17 verbose #13604 > >
00:10:17 verbose #13605 > > inl euler_1d dt deriv (state_1d (t0, x0, v0) as t) =
00:10:17 verbose #13606 > > inl (rrr (_, _, dvdt)) = deriv t
00:10:17 verbose #13607 > > inl t1 = t0 + dt
00:10:17 verbose #13608 > > inl x1 = x0 + v0 * dt
00:10:17 verbose #13609 > > inl v1 = v0 + dvdt * dt
00:10:17 verbose #13610 > > state_1d (t1, x1, v1)
00:10:17 verbose #13611 > >
00:10:17 verbose #13612 > > inl update_txv dt m fs =
00:10:17 verbose #13613 > > newton_second_1d m fs |> euler_1d dt
00:10:17 verbose #13614 > >
00:10:17 verbose #13615 > > inl states_txv dt m txv0 fs =
00:10:17 verbose #13616 > > seq.iterate_ (update_txv dt m fs) txv0
00:10:17 verbose #13617 > >
00:10:17 verbose #13618 > > inl velocity_1d sts t =
00:10:17 verbose #13619 > > inl (state_1d (t0, _, _)) = sts 0
00:10:17 verbose #13620 > > inl (state_1d (t1, _, _)) = sts 1
00:10:17 verbose #13621 > > inl dt = t1 - t0
00:10:17 verbose #13622 > > inl num_steps = t / dt |> math.round |> abs
00:10:17 verbose #13623 > > inl (state_1d (_, _, v0)) = sts num_steps
00:10:17 verbose #13624 > > v0
00:10:17 verbose #13625 > >
00:10:17 verbose #13626 > > inl velocity_ftxv dt m txv0 fs =
00:10:17 verbose #13627 > > states_txv dt m txv0 fs |> velocity_1d
00:10:17 verbose #13628 > >
00:10:17 verbose #13629 > > inl position_1d sts t =
00:10:17 verbose #13630 > > inl (state_1d (t0, _, _)) = sts 0
00:10:17 verbose #13631 > > inl (state_1d (t1, _, _)) = sts 1
00:10:17 verbose #13632 > > inl dt = t1 - t0
00:10:17 verbose #13633 > > inl num_steps = t / dt |> math.round |> abs
00:10:17 verbose #13634 > > inl (state_1d (_, x0, _)) = sts num_steps
00:10:17 verbose #13635 > > x0
00:10:17 verbose #13636 > >
00:10:17 verbose #13637 > > inl position_ftxv dt m txv0 fs =
00:10:17 verbose #13638 > > states_txv dt m txv0 fs |> position_1d
00:10:17 verbose #13639 > >
00:10:17 verbose #13640 > > inl spring_force k (state_1d (_, x0, _)) =
00:10:17 verbose #13641 > > -k * x0
00:10:17 verbose #13642 > >
00:10:17 verbose #13643 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13644 > > //// test
00:10:17 verbose #13645 > >
00:10:17 verbose #13646 > > inl damped_ho_forces () =
00:10:17 verbose #13647 > > [[
00:10:17 verbose #13648 > > spring_force 0.8
00:10:17 verbose #13649 > > fun (state_1d (_, _, v0)) => f_air 2 1.225 (pi * math.square 0.02) v0
00:10:17 verbose #13650 > > fun _ => -0.0027 * 9.80665
00:10:17 verbose #13651 > > ]]
00:10:17 verbose #13652 > >
00:10:17 verbose #13653 > > inl damped_ho_states () =
00:10:17 verbose #13654 > > states_txv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ())
00:10:17 verbose #13655 > >
00:10:17 verbose #13656 > > inl pingpong_position t =
00:10:17 verbose #13657 > > position_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t
00:10:17 verbose #13658 > >
00:10:17 verbose #13659 > > inl x : a _ f64 = am'.init_series 0 3 0.01
00:10:17 verbose #13660 > > inl y = x |> am.map pingpong_position
00:10:17 verbose #13661 > > "ping pong ball on a slinky", "time (s)", "", ;[[ "position (m)", x, y ]]
00:10:17 verbose #13662 > >
00:10:17 verbose #13663 > > ╭─[ 104.14ms - return value ]──────────────────────────────────────────────────╮
00:10:17 verbose #13664 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:17 verbose #13665 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:17 verbose #13666 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:17 verbose #13667 > > │ stroke="none"/> │
00:10:17 verbose #13668 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:17 verbose #13669 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:17 verbose #13670 > > │ fill="#FFFFFF"> │
00:10:17 verbose #13671 > > │ ping pong ball on a slinky │
00:10:17 verbose #13672 > > │ </text> │
00:10:17 verbose #13673 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:10:17 verbose #13674 > > │ y2="75"/> │
00:10:17 verbose #13675 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:17 verbose #13676 > > │ y2="75"/> │
00:10:17 verbose #13677 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:10:17 verbose #13678 > > │ y2="75"/> │
00:10:17 verbose #13679 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:10:17 verbose #13680 > > │ y2="75"/> │
00:10:17 verbose #13681 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:10:17 verbose #13682 > > │ y2="75"/> │
00:10:17 verbose #13683 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:10:17 verbose #13684 > > │ x2="103" y2="75"/> │
00:10:17 verbose #13685 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:10:17 verbose #13686 > > │ x2="111" y2="75"/> │
00:10:17 verbose #13687 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:17 verbose #13688 > > │ x2="119" y2="75"/> │
00:10:17 verbose #13689 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:10:17 verbose #13690 > > │ x2="128" y2="75"/> │
00:10:17 verbose #13691 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:10:17 verbose #13692 > > │ x2="136" y2="75"/> │
00:10:17 verbose #13693 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:10:17 verbose #13694 > > │ x2="144" y2="75"/> │
00:10:17 verbose #13695 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:10:17 verbose #13696 > > │ x2="153" y2="75"/> │
00:10:17 verbose #13697 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:10:17 verbose #13698 > > │ x2="161" y2="75"/> │
00:10:17 verbose #13699 > > │ <line op... │
00:10:17 verbose #13700 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:17 verbose #13701 > >
00:10:17 verbose #13702 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13703 > > //// test
00:10:17 verbose #13704 > >
00:10:17 verbose #13705 > > inl pingpong_velocity t =
00:10:17 verbose #13706 > > velocity_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t
00:10:17 verbose #13707 > >
00:10:17 verbose #13708 > > inl x = am'.init_series 0 3 0.01
00:10:17 verbose #13709 > > inl y = x |> am.map pingpong_velocity
00:10:17 verbose #13710 > > "ping pong ball on a slinky", "time (s)", "", ;[[ "velocity (m/s)", x, y ]]
00:10:17 verbose #13711 > >
00:10:17 verbose #13712 > > ╭─[ 101.15ms - return value ]──────────────────────────────────────────────────╮
00:10:17 verbose #13713 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:17 verbose #13714 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:17 verbose #13715 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:17 verbose #13716 > > │ stroke="none"/> │
00:10:17 verbose #13717 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:17 verbose #13718 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:17 verbose #13719 > > │ fill="#FFFFFF"> │
00:10:17 verbose #13720 > > │ ping pong ball on a slinky │
00:10:17 verbose #13721 > > │ </text> │
00:10:17 verbose #13722 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:10:17 verbose #13723 > > │ y2="75"/> │
00:10:17 verbose #13724 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:17 verbose #13725 > > │ y2="75"/> │
00:10:17 verbose #13726 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:10:17 verbose #13727 > > │ y2="75"/> │
00:10:17 verbose #13728 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:10:17 verbose #13729 > > │ y2="75"/> │
00:10:17 verbose #13730 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:10:17 verbose #13731 > > │ y2="75"/> │
00:10:17 verbose #13732 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:10:17 verbose #13733 > > │ x2="103" y2="75"/> │
00:10:17 verbose #13734 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:10:17 verbose #13735 > > │ x2="111" y2="75"/> │
00:10:17 verbose #13736 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:17 verbose #13737 > > │ x2="119" y2="75"/> │
00:10:17 verbose #13738 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:10:17 verbose #13739 > > │ x2="128" y2="75"/> │
00:10:17 verbose #13740 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:10:17 verbose #13741 > > │ x2="136" y2="75"/> │
00:10:17 verbose #13742 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:10:17 verbose #13743 > > │ x2="144" y2="75"/> │
00:10:17 verbose #13744 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:10:17 verbose #13745 > > │ x2="153" y2="75"/> │
00:10:17 verbose #13746 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:10:17 verbose #13747 > > │ x2="161" y2="75"/> │
00:10:17 verbose #13748 > > │ <line op... │
00:10:17 verbose #13749 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:17 verbose #13750 > >
00:10:17 verbose #13751 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:17 verbose #13752 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:17 verbose #13753 > > │ ## shift │
00:10:17 verbose #13754 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:17 verbose #13755 > >
00:10:17 verbose #13756 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:17 verbose #13757 > > type update_function s = s -> s
00:10:17 verbose #13758 > >
00:10:17 verbose #13759 > > type differential_equation s ds = s -> ds
00:10:17 verbose #13760 > >
00:10:17 verbose #13761 > > type numerical_method s ds = differential_equation s ds -> update_function s
00:10:17 verbose #13762 > >
00:10:17 verbose #13763 > >
00:10:17 verbose #13764 > > inl solver method =
00:10:17 verbose #13765 > > method >> seq.iterate
00:10:17 verbose #13766 > > inl solver' method =
00:10:17 verbose #13767 > > method >> seq.iterate'
00:10:17 verbose #13768 > > inl solver_ method =
00:10:17 verbose #13769 > > method >> seq.iterate_
00:10:17 verbose #13770 > >
00:10:17 verbose #13771 > >
00:10:17 verbose #13772 > > inl euler_cromer_1d dt deriv (state_1d (t0, x0, v0) as t) =
00:10:17 verbose #13773 > > inl (rrr (_, _, dvdt)) = deriv t
00:10:17 verbose #13774 > > inl t1 = t0 + dt
00:10:17 verbose #13775 > > inl v1 = v0 + dvdt * dt
00:10:17 verbose #13776 > > inl x1 = x0 + v1 * dt
00:10:17 verbose #13777 > > state_1d (t1, x1, v1)
00:10:17 verbose #13778 > >
00:10:17 verbose #13779 > > inl update_txv_ec dt m fs =
00:10:17 verbose #13780 > > euler_cromer_1d dt (newton_second_1d m fs)
00:10:17 verbose #13781 > >
00:10:17 verbose #13782 > > prototype (+++) ds : ds -> ds -> ds
00:10:17 verbose #13783 > > prototype scale ds : f64 -> ds -> ds
00:10:17 verbose #13784 > >
00:10:17 verbose #13785 > > instance (+++) rrr = fun (rrr (dtdt0, dxdt0, dvdt0)) (rrr (dtdt1, dxdt1, dvdt1))
00:10:17 verbose #13786 > > =>
00:10:17 verbose #13787 > > rrr (dtdt0 + dtdt1, dxdt0 + dxdt1, dvdt0 + dvdt1)
00:10:17 verbose #13788 > >
00:10:17 verbose #13789 > > instance scale rrr = fun w (rrr (dtdt0, dxdt0, dvdt0)) =>
00:10:17 verbose #13790 > > rrr (w * dtdt0, w * dxdt0, w * dvdt0)
00:10:17 verbose #13791 > >
00:10:17 verbose #13792 > > prototype shift s : forall ds. f64 -> ds -> s -> s
00:10:17 verbose #13793 > >
00:10:17 verbose #13794 > > instance shift state_1d = fun dt ds (state_1d (t, x, v)) =>
00:10:17 verbose #13795 > > inl dtdt, dxdt, dvdt =
00:10:17 verbose #13796 > > real
00:10:17 verbose #13797 > > match ds with
00:10:17 verbose #13798 > > | rrr x => x
00:10:17 verbose #13799 > > | state_1d x => x
00:10:17 verbose #13800 > > state_1d (t + dtdt * dt, x + dxdt * dt, v + dvdt * dt)
00:10:17 verbose #13801 > >
00:10:17 verbose #13802 > > inl euler dt deriv st0 =
00:10:17 verbose #13803 > > shift dt (deriv st0) st0
00:10:17 verbose #13804 > >
00:10:17 verbose #13805 > > inl runge_kutta_4 dt deriv st0 =
00:10:17 verbose #13806 > > inl m0 = deriv st0
00:10:17 verbose #13807 > > inl m1 = deriv (shift (dt / 2) m0 st0)
00:10:17 verbose #13808 > > inl m2 = deriv (shift (dt / 2) m1 st0)
00:10:17 verbose #13809 > > inl m3 = deriv (shift dt m2 st0)
00:10:17 verbose #13810 > > shift (dt / 6) (m0 +++ m1 +++ m1 +++ m2 +++ m2 +++ m3) st0
00:10:17 verbose #13811 > >
00:10:17 verbose #13812 > > inl exponential (_, x0, v0) =
00:10:17 verbose #13813 > > 1f64, v0, x0
00:10:17 verbose #13814 > >
00:10:17 verbose #13815 > > inl of_state_1d (state_1d (t, x, v)) =
00:10:17 verbose #13816 > > t, x, v
00:10:18 verbose #13817 > >
00:10:18 verbose #13818 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13819 > > //// test
00:10:18 verbose #13820 > >
00:10:18 verbose #13821 > > solver (euler 0.01) (of_state_1d >> exponential >> state_1d) (state_1d (0, 1,
00:10:18 verbose #13822 > > 1)) 800i32
00:10:18 verbose #13823 > > |> _assert_eq (state_1d (7.999999999999874, 2864.8311229272326,
00:10:18 verbose #13824 > > 2864.8311229272326))
00:10:18 verbose #13825 > >
00:10:18 verbose #13826 > > solver (euler_cromer_1d 0.1) (of_state_1d >> exponential >> rrr) (state_1d (0,
00:10:18 verbose #13827 > > 1, 1)) 80i32
00:10:18 verbose #13828 > > |> _assert_eq (state_1d (7.999999999999988, 3043.379244966009,
00:10:18 verbose #13829 > > 2895.0121485099035))
00:10:18 verbose #13830 > >
00:10:18 verbose #13831 > > solver (runge_kutta_4 1) (of_state_1d >> exponential >> rrr) (state_1d (0, 1,
00:10:18 verbose #13832 > > 1)) 8i32
00:10:18 verbose #13833 > > |> _assert_eq (state_1d (8.0, 2894.789038540849, 2894.789038540849))
00:10:18 verbose #13834 > >
00:10:18 verbose #13835 > > ╭─[ 55.40ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13836 > > │ assert_eq / actual: struct (8.0, 2864.831123, 2864.831123) / expected: │
00:10:18 verbose #13837 > > │ struct (8.0, 2864.831123, 2864.831123) │
00:10:18 verbose #13838 > > │ assert_eq / actual: struct (8.0, 3043.379245, 2895.012149) / expected: │
00:10:18 verbose #13839 > > │ struct (8.0, 3043.379245, 2895.012149) │
00:10:18 verbose #13840 > > │ assert_eq / actual: struct (8.0, 2894.789039, 2894.789039) / expected: │
00:10:18 verbose #13841 > > │ struct (8.0, 2894.789039, 2894.789039) │
00:10:18 verbose #13842 > > │ │
00:10:18 verbose #13843 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13844 > >
00:10:18 verbose #13845 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #13846 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #13847 > > │ ## vec │
00:10:18 verbose #13848 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13849 > >
00:10:18 verbose #13850 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13851 > > type vec =
00:10:18 verbose #13852 > > {
00:10:18 verbose #13853 > > x : f64
00:10:18 verbose #13854 > > y : f64
00:10:18 verbose #13855 > > z : f64
00:10:18 verbose #13856 > > }
00:10:18 verbose #13857 > >
00:10:18 verbose #13858 > > inl vec x y z : vec =
00:10:18 verbose #13859 > > { x y z }
00:10:18 verbose #13860 > >
00:10:18 verbose #13861 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13862 > > //// test
00:10:18 verbose #13863 > >
00:10:18 verbose #13864 > > vec 1 2 3 .z
00:10:18 verbose #13865 > > |> _assert_eq 3
00:10:18 verbose #13866 > >
00:10:18 verbose #13867 > > ╭─[ 45.06ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13868 > > │ assert_eq / actual: 3.0 / expected: 3.0 │
00:10:18 verbose #13869 > > │ │
00:10:18 verbose #13870 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13871 > >
00:10:18 verbose #13872 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #13873 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #13874 > > │ ### consts │
00:10:18 verbose #13875 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13876 > >
00:10:18 verbose #13877 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13878 > > inl i_hat () = vec 1 0 0
00:10:18 verbose #13879 > > inl j_hat () = vec 0 1 0
00:10:18 verbose #13880 > > inl k_hat () = vec 0 0 1
00:10:18 verbose #13881 > > inl zero_vec () = vec 0 0 0
00:10:18 verbose #13882 > >
00:10:18 verbose #13883 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #13884 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #13885 > > │ ### ^+^ │
00:10:18 verbose #13886 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13887 > >
00:10:18 verbose #13888 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13889 > > inl (^+^) (a : vec) (b : vec) =
00:10:18 verbose #13890 > > vec (a.x + b.x) (a.y + b.y) (a.z + b.z)
00:10:18 verbose #13891 > >
00:10:18 verbose #13892 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13893 > > //// test
00:10:18 verbose #13894 > >
00:10:18 verbose #13895 > > vec 1 2 3 ^+^ vec 4 5 6
00:10:18 verbose #13896 > > |> _assert_eq (vec 5 7 9)
00:10:18 verbose #13897 > >
00:10:18 verbose #13898 > > ╭─[ 40.47ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13899 > > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │
00:10:18 verbose #13900 > > │ 9.0) │
00:10:18 verbose #13901 > > │ │
00:10:18 verbose #13902 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13903 > >
00:10:18 verbose #13904 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #13905 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #13906 > > │ ### sum_vec │
00:10:18 verbose #13907 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13908 > >
00:10:18 verbose #13909 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13910 > > inl sum_vec vs =
00:10:18 verbose #13911 > > vs |> listm.fold (^+^) (zero_vec ())
00:10:18 verbose #13912 > >
00:10:18 verbose #13913 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13914 > > //// test
00:10:18 verbose #13915 > >
00:10:18 verbose #13916 > > [[ vec 1 2 3; vec 4 5 6 ]]
00:10:18 verbose #13917 > > |> sum_vec
00:10:18 verbose #13918 > > |> _assert_eq (vec 5 7 9)
00:10:18 verbose #13919 > >
00:10:18 verbose #13920 > > ╭─[ 34.18ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13921 > > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │
00:10:18 verbose #13922 > > │ 9.0) │
00:10:18 verbose #13923 > > │ │
00:10:18 verbose #13924 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13925 > >
00:10:18 verbose #13926 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #13927 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #13928 > > │ ### *^ │
00:10:18 verbose #13929 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13930 > >
00:10:18 verbose #13931 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13932 > > inl (*^) c { x y z } =
00:10:18 verbose #13933 > > vec (c * x) (c * y) (c * z)
00:10:18 verbose #13934 > >
00:10:18 verbose #13935 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13936 > > //// test
00:10:18 verbose #13937 > >
00:10:18 verbose #13938 > > 5 *^ vec 1 2 3
00:10:18 verbose #13939 > > |> _assert_eq (vec 5 10 15)
00:10:18 verbose #13940 > >
00:10:18 verbose #13941 > > ╭─[ 42.87ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13942 > > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │
00:10:18 verbose #13943 > > │ 15.0) │
00:10:18 verbose #13944 > > │ │
00:10:18 verbose #13945 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13946 > >
00:10:18 verbose #13947 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13948 > > //// test
00:10:18 verbose #13949 > >
00:10:18 verbose #13950 > > 3 *^ i_hat () ^+^ 4 *^ k_hat ()
00:10:18 verbose #13951 > > |> _assert_eq (vec 3 0 4)
00:10:18 verbose #13952 > >
00:10:18 verbose #13953 > > ╭─[ 44.96ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13954 > > │ assert_eq / actual: struct (3.0, 0.0, 4.0) / expected: struct (3.0, 0.0, │
00:10:18 verbose #13955 > > │ 4.0) │
00:10:18 verbose #13956 > > │ │
00:10:18 verbose #13957 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13958 > >
00:10:18 verbose #13959 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #13960 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #13961 > > │ ### ^* │
00:10:18 verbose #13962 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13963 > >
00:10:18 verbose #13964 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13965 > > inl (^*) v c =
00:10:18 verbose #13966 > > (*^) c v
00:10:18 verbose #13967 > >
00:10:18 verbose #13968 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13969 > > //// test
00:10:18 verbose #13970 > >
00:10:18 verbose #13971 > > vec 1 2 3 ^* 5
00:10:18 verbose #13972 > > |> _assert_eq (vec 5 10 15)
00:10:18 verbose #13973 > >
00:10:18 verbose #13974 > > ╭─[ 42.62ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13975 > > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │
00:10:18 verbose #13976 > > │ 15.0) │
00:10:18 verbose #13977 > > │ │
00:10:18 verbose #13978 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13979 > >
00:10:18 verbose #13980 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #13981 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #13982 > > │ ### ^/ │
00:10:18 verbose #13983 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #13984 > >
00:10:18 verbose #13985 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13986 > > inl (^/) { x y z } c =
00:10:18 verbose #13987 > > vec (x / c) (y / c) (z / c)
00:10:18 verbose #13988 > >
00:10:18 verbose #13989 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #13990 > > //// test
00:10:18 verbose #13991 > >
00:10:18 verbose #13992 > > vec 1 2 3 ^/ 5
00:10:18 verbose #13993 > > |> _assert_eq (vec 0.2 0.4 0.6)
00:10:18 verbose #13994 > >
00:10:18 verbose #13995 > > ╭─[ 43.11ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #13996 > > │ assert_eq / actual: struct (0.2, 0.4, 0.6) / expected: struct (0.2, 0.4, │
00:10:18 verbose #13997 > > │ 0.6) │
00:10:18 verbose #13998 > > │ │
00:10:18 verbose #13999 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14000 > >
00:10:18 verbose #14001 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #14002 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #14003 > > │ ### negate_vec │
00:10:18 verbose #14004 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14005 > >
00:10:18 verbose #14006 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14007 > > inl negate_vec v =
00:10:18 verbose #14008 > > v ^* -1
00:10:18 verbose #14009 > >
00:10:18 verbose #14010 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14011 > > //// test
00:10:18 verbose #14012 > >
00:10:18 verbose #14013 > > vec 1 2 3
00:10:18 verbose #14014 > > |> negate_vec
00:10:18 verbose #14015 > > |> _assert_eq (vec -1 -2 -3)
00:10:18 verbose #14016 > >
00:10:18 verbose #14017 > > ╭─[ 44.47ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #14018 > > │ assert_eq / actual: struct (-1.0, -2.0, -3.0) / expected: struct (-1.0, │
00:10:18 verbose #14019 > > │ -2.0, -3.0) │
00:10:18 verbose #14020 > > │ │
00:10:18 verbose #14021 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14022 > >
00:10:18 verbose #14023 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #14024 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #14025 > > │ ### ^-^ │
00:10:18 verbose #14026 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14027 > >
00:10:18 verbose #14028 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14029 > > inl (^-^) a b =
00:10:18 verbose #14030 > > a ^+^ (negate_vec b)
00:10:18 verbose #14031 > >
00:10:18 verbose #14032 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14033 > > //// test
00:10:18 verbose #14034 > >
00:10:18 verbose #14035 > > vec 1 2 3 ^-^ vec 4 5 6
00:10:18 verbose #14036 > > |> _assert_eq (vec -3 -3 -3)
00:10:18 verbose #14037 > >
00:10:18 verbose #14038 > > ╭─[ 71.83ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #14039 > > │ assert_eq / actual: struct (-3.0, -3.0, -3.0) / expected: struct (-3.0, │
00:10:18 verbose #14040 > > │ -3.0, -3.0) │
00:10:18 verbose #14041 > > │ │
00:10:18 verbose #14042 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14043 > >
00:10:18 verbose #14044 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #14045 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #14046 > > │ ### <.> │
00:10:18 verbose #14047 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14048 > >
00:10:18 verbose #14049 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14050 > > inl (<.>) { x = ax y = ay z = az } { x = bx y = by z = bz } =
00:10:18 verbose #14051 > > ax * bx + ay * by + az * bz
00:10:18 verbose #14052 > >
00:10:18 verbose #14053 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14054 > > //// test
00:10:18 verbose #14055 > >
00:10:18 verbose #14056 > > vec 1 2 3 <.> vec 4 5 6
00:10:18 verbose #14057 > > |> _assert_eq 32
00:10:18 verbose #14058 > >
00:10:18 verbose #14059 > > ╭─[ 56.25ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #14060 > > │ assert_eq / actual: 32.0 / expected: 32.0 │
00:10:18 verbose #14061 > > │ │
00:10:18 verbose #14062 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14063 > >
00:10:18 verbose #14064 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #14065 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #14066 > > │ ### \>\< │
00:10:18 verbose #14067 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14068 > >
00:10:18 verbose #14069 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14070 > > inl (><) (a : vec) (b : vec) =
00:10:18 verbose #14071 > > vec
00:10:18 verbose #14072 > > (a.y * b.z - a.z * b.y)
00:10:18 verbose #14073 > > (a.z * b.x - a.x * b.z)
00:10:18 verbose #14074 > > (a.x * b.y - a.y * b.x)
00:10:18 verbose #14075 > >
00:10:18 verbose #14076 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14077 > > //// test
00:10:18 verbose #14078 > >
00:10:18 verbose #14079 > > vec 1 2 3 >< vec 4 5 6
00:10:18 verbose #14080 > > |> _assert_eq (vec -3 6 -3)
00:10:18 verbose #14081 > >
00:10:18 verbose #14082 > > ╭─[ 44.65ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #14083 > > │ assert_eq / actual: struct (-3.0, 6.0, -3.0) / expected: struct (-3.0, 6.0, │
00:10:18 verbose #14084 > > │ -3.0) │
00:10:18 verbose #14085 > > │ │
00:10:18 verbose #14086 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14087 > >
00:10:18 verbose #14088 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:18 verbose #14089 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:18 verbose #14090 > > │ ### magnitude │
00:10:18 verbose #14091 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14092 > >
00:10:18 verbose #14093 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14094 > > inl magnitude v =
00:10:18 verbose #14095 > > v <.> v |> sqrt
00:10:18 verbose #14096 > >
00:10:18 verbose #14097 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:18 verbose #14098 > > //// test
00:10:18 verbose #14099 > >
00:10:18 verbose #14100 > > vec 1 2 3
00:10:18 verbose #14101 > > |> magnitude
00:10:18 verbose #14102 > > |> _assert_approx_eq None 3.7416573867739413
00:10:18 verbose #14103 > >
00:10:18 verbose #14104 > > ╭─[ 45.48ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:18 verbose #14105 > > │ assert_approx_eq / actual: 3.741657387 / expected: 3.741657387 │
00:10:18 verbose #14106 > > │ │
00:10:18 verbose #14107 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:18 verbose #14108 > >
00:10:19 verbose #14109 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:19 verbose #14110 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:19 verbose #14111 > > │ ### v1 │
00:10:19 verbose #14112 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:19 verbose #14113 > >
00:10:19 verbose #14114 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:19 verbose #14115 > > inl v1 t =
00:10:19 verbose #14116 > > 2 *^ (t ** 2 *^ i_hat () ^+^ 3 *^ (t ** 3 *^ j_hat () ^+^ t ** 4 *^ k_hat
00:10:19 verbose #14117 > > ()))
00:10:19 verbose #14118 > >
00:10:19 verbose #14119 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:19 verbose #14120 > > //// test
00:10:19 verbose #14121 > >
00:10:19 verbose #14122 > > v1 1
00:10:19 verbose #14123 > > |> _assert_eq (vec 2 6 6)
00:10:19 verbose #14124 > >
00:10:19 verbose #14125 > > ╭─[ 51.24ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:19 verbose #14126 > > │ assert_eq / actual: struct (2.0, 6.0, 6.0) / expected: struct (2.0, 6.0, │
00:10:19 verbose #14127 > > │ 6.0) │
00:10:19 verbose #14128 > > │ │
00:10:19 verbose #14129 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:19 verbose #14130 > >
00:10:19 verbose #14131 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:19 verbose #14132 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:19 verbose #14133 > > │ ### vec_derivative │
00:10:19 verbose #14134 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:19 verbose #14135 > >
00:10:19 verbose #14136 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:19 verbose #14137 > > type vec_derivative = (f64 -> vec) -> f64 -> vec
00:10:19 verbose #14138 > >
00:10:19 verbose #14139 > > inl vec_derivative dt : vec_derivative =
00:10:19 verbose #14140 > > fun v t =>
00:10:19 verbose #14141 > > (v (t + dt / 2) ^-^ v (t - dt / 2)) ^/ dt
00:10:19 verbose #14142 > >
00:10:19 verbose #14143 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:19 verbose #14144 > > //// test
00:10:19 verbose #14145 > >
00:10:19 verbose #14146 > > vec_derivative 0.01 v1 3 .x
00:10:19 verbose #14147 > > |> _assert_approx_eq None (derivative 0.01 (v1 >> fun v => v.x) 3)
00:10:19 verbose #14148 > >
00:10:19 verbose #14149 > > ╭─[ 40.54ms - stdout ]─────────────────────────────────────────────────────────╮
00:10:19 verbose #14150 > > │ assert_approx_eq / actual: 12.0 / expected: 12.0 │
00:10:19 verbose #14151 > > │ │
00:10:19 verbose #14152 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:19 verbose #14153 > >
00:10:19 verbose #14154 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:19 verbose #14155 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:19 verbose #14156 > > │ ## states_ps │
00:10:19 verbose #14157 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:19 verbose #14158 > >
00:10:19 verbose #14159 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:19 verbose #14160 > > nominal particle_state =
00:10:19 verbose #14161 > > {
00:10:19 verbose #14162 > > mass : f64
00:10:19 verbose #14163 > > charge : f64
00:10:19 verbose #14164 > > time : f64
00:10:19 verbose #14165 > > pos_vec : vec
00:10:19 verbose #14166 > > velocity : vec
00:10:19 verbose #14167 > > }
00:10:19 verbose #14168 > >
00:10:19 verbose #14169 > > inl default_particle_state () : particle_state =
00:10:19 verbose #14170 > > particle_state {
00:10:19 verbose #14171 > > mass = 1
00:10:19 verbose #14172 > > charge = 0
00:10:19 verbose #14173 > > time = 0
00:10:19 verbose #14174 > > pos_vec = zero_vec ()
00:10:19 verbose #14175 > > velocity = zero_vec ()
00:10:19 verbose #14176 > > }
00:10:19 verbose #14177 > >
00:10:19 verbose #14178 > > type one_body_force = particle_state -> vec
00:10:19 verbose #14179 > >
00:10:19 verbose #14180 > > nominal d_particle_state =
00:10:19 verbose #14181 > > {
00:10:19 verbose #14182 > > dmdt : f64
00:10:19 verbose #14183 > > dqdt : f64
00:10:19 verbose #14184 > > dtdt : f64
00:10:19 verbose #14185 > > drdt : vec
00:10:19 verbose #14186 > > dvdt : vec
00:10:19 verbose #14187 > > }
00:10:19 verbose #14188 > >
00:10:19 verbose #14189 > > inl newton_second_ps (fs : list one_body_force) (st : particle_state) :
00:10:19 verbose #14190 > > d_particle_state =
00:10:19 verbose #14191 > > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec
00:10:19 verbose #14192 > > d_particle_state {
00:10:19 verbose #14193 > > dmdt = 0
00:10:19 verbose #14194 > > dqdt = 0
00:10:19 verbose #14195 > > dtdt = 1
00:10:19 verbose #14196 > > drdt = st.velocity
00:10:19 verbose #14197 > > dvdt = f_net ^/ st.mass
00:10:19 verbose #14198 > > }
00:10:19 verbose #14199 > >
00:10:19 verbose #14200 > > inl earth_surface_gravity (st : particle_state) =
00:10:19 verbose #14201 > > inl g = 9.80665
00:10:19 verbose #14202 > > -st.mass * g *^ k_hat ()
00:10:19 verbose #14203 > >
00:10:19 verbose #14204 > > inl air_resistance drag rho area (st : particle_state) =
00:10:19 verbose #14205 > > -0.5 * drag * rho * area * magnitude st.velocity *^ st.velocity
00:10:19 verbose #14206 > >
00:10:19 verbose #14207 > > inl euler_cromer_ps dt (deriv : particle_state -> d_particle_state)
00:10:19 verbose #14208 > > (particle_state st) =
00:10:19 verbose #14209 > > inl dst : d_particle_state = deriv (particle_state st)
00:10:19 verbose #14210 > > inl v' = st.velocity ^+^ dst.dvdt ^* dt
00:10:19 verbose #14211 > > particle_state { st with
00:10:19 verbose #14212 > > time = st.time + dt
00:10:19 verbose #14213 > > pos_vec = st.pos_vec ^+^ v' ^* dt
00:10:19 verbose #14214 > > velocity = st.velocity ^+^ dst.dvdt ^* dt
00:10:19 verbose #14215 > > }
00:10:19 verbose #14216 > >
00:10:19 verbose #14217 > > instance (+++) d_particle_state = fun (dps : d_particle_state) (dps' :
00:10:19 verbose #14218 > > d_particle_state) =>
00:10:19 verbose #14219 > > d_particle_state {
00:10:19 verbose #14220 > > dmdt = dps.dmdt + dps'.dmdt
00:10:19 verbose #14221 > > dqdt = dps.dqdt + dps'.dqdt
00:10:19 verbose #14222 > > dtdt = dps.dtdt + dps'.dtdt
00:10:19 verbose #14223 > > drdt = dps.drdt ^+^ dps'.drdt
00:10:19 verbose #14224 > > dvdt = dps.dvdt ^+^ dps'.dvdt
00:10:19 verbose #14225 > > }
00:10:19 verbose #14226 > >
00:10:19 verbose #14227 > > instance scale d_particle_state = fun w (dps : d_particle_state) =>
00:10:19 verbose #14228 > > d_particle_state {
00:10:19 verbose #14229 > > dmdt = w * dps.dmdt
00:10:19 verbose #14230 > > dqdt = w * dps.dqdt
00:10:19 verbose #14231 > > dtdt = w * dps.dtdt
00:10:19 verbose #14232 > > drdt = w *^ dps.drdt
00:10:19 verbose #14233 > > dvdt = w *^ dps.dvdt
00:10:19 verbose #14234 > > }
00:10:19 verbose #14235 > >
00:10:19 verbose #14236 > > instance shift particle_state = fun dt dps (particle_state st) =>
00:10:19 verbose #14237 > > inl (d_particle_state dps) =
00:10:19 verbose #14238 > > real
00:10:19 verbose #14239 > > match dps with
00:10:19 verbose #14240 > > | d_particle_state _ => dps
00:10:19 verbose #14241 > > particle_state { st with
00:10:19 verbose #14242 > > time = st.time + dps.dtdt * dt
00:10:19 verbose #14243 > > pos_vec = st.pos_vec ^+^ dps.drdt ^* dt
00:10:19 verbose #14244 > > velocity = st.velocity ^+^ dps.dvdt ^* dt
00:10:19 verbose #14245 > > }
00:10:19 verbose #14246 > >
00:10:19 verbose #14247 > > inl states_ps (method : numerical_method particle_state d_particle_state) : _ ->
00:10:19 verbose #14248 > > _ -> i32 -> particle_state =
00:10:19 verbose #14249 > > newton_second_ps >> method >> seq.iterate_
00:10:19 verbose #14250 > >
00:10:19 verbose #14251 > > inl z_ge0 sts =
00:10:19 verbose #14252 > > sts
00:10:19 verbose #14253 > > |> seq.take_while_ (fun (particle_state st) _ => st.pos_vec.z >= 0)
00:10:19 verbose #14254 > >
00:10:19 verbose #14255 > > inl trajectory sts =
00:10:19 verbose #14256 > > sts |> listm.map (fun (particle_state st) => st.pos_vec.y, st.pos_vec.z)
00:10:19 verbose #14257 > >
00:10:19 verbose #14258 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:19 verbose #14259 > > //// test
00:10:19 verbose #14260 > >
00:10:19 verbose #14261 > > inl update_ps (method : numerical_method particle_state d_particle_state) =
00:10:19 verbose #14262 > > newton_second_ps >> method
00:10:19 verbose #14263 > >
00:10:19 verbose #14264 > > inl position_ps (method : numerical_method particle_state d_particle_state) fs
00:10:19 verbose #14265 > > st t =
00:10:19 verbose #14266 > > inl states : i32 -> particle_state = states_ps method fs st
00:10:19 verbose #14267 > > inl dt = (states 1).time - (states 0).time
00:10:19 verbose #14268 > > inl num_steps = t / dt |> math.round |> abs
00:10:19 verbose #14269 > > inl st1 = solver' method (newton_second_ps fs) st num_steps
00:10:19 verbose #14270 > > st1.pos_vec
00:10:19 verbose #14271 > >
00:10:19 verbose #14272 > > inl sun_gravity (st : particle_state) : vec =
00:10:19 verbose #14273 > > inl big_g = 0.0000000000667408
00:10:19 verbose #14274 > > inl sun_mass = 1988480000000000000000000000000
00:10:19 verbose #14275 > > -big_g * sun_mass * st.mass *^ st.pos_vec ^/ magnitude st.pos_vec ** 3
00:10:19 verbose #14276 > >
00:10:19 verbose #14277 > > inl wind_force v_wind drag rho area (st : particle_state) =
00:10:19 verbose #14278 > > inl v_rel = st.velocity ^-^ v_wind
00:10:19 verbose #14279 > > -0.5 * drag * rho * area * magnitude v_rel *^ v_rel
00:10:19 verbose #14280 > >
00:10:19 verbose #14281 > > inl rock_state () =
00:10:19 verbose #14282 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:19 verbose #14283 > > particle_state { default_particle_state' with
00:10:19 verbose #14284 > > mass = 2
00:10:19 verbose #14285 > > velocity = vec 3 0 4
00:10:19 verbose #14286 > > }
00:10:19 verbose #14287 > >
00:10:19 verbose #14288 > > inl halley_update dt =
00:10:19 verbose #14289 > > update_ps (euler_cromer_ps dt) [[ sun_gravity ]]
00:10:19 verbose #14290 > >
00:10:19 verbose #14291 > > inl halley_initial () =
00:10:19 verbose #14292 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:19 verbose #14293 > > particle_state { default_particle_state' with
00:10:19 verbose #14294 > > mass = 220000000000000
00:10:19 verbose #14295 > > pos_vec = 87660000000 *^ i_hat ()
00:10:19 verbose #14296 > > velocity = 54569 *^ j_hat ()
00:10:19 verbose #14297 > > }
00:10:19 verbose #14298 > >
00:10:19 verbose #14299 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:19 verbose #14300 > > //// test
00:10:19 verbose #14301 > >
00:10:19 verbose #14302 > > inl baseball_forces () =
00:10:19 verbose #14303 > > inl area = pi * (0.074 / 2) ** 2
00:10:19 verbose #14304 > > [[
00:10:19 verbose #14305 > > earth_surface_gravity
00:10:19 verbose #14306 > > air_resistance 0.3 1.225 area
00:10:19 verbose #14307 > > ]]
00:10:19 verbose #14308 > >
00:10:19 verbose #14309 > > inl baseball_trajectory dt v0 theta_deg =
00:10:19 verbose #14310 > > inl theta_rad = theta_deg * pi / 180
00:10:19 verbose #14311 > > inl vy0 = v0 * cos theta_rad
00:10:19 verbose #14312 > > inl vz0 = v0 * sin theta_rad
00:10:19 verbose #14313 > > inl initial_state =
00:10:19 verbose #14314 > > particle_state {
00:10:19 verbose #14315 > > mass = 0.145
00:10:19 verbose #14316 > > charge = 0
00:10:19 verbose #14317 > > time = 0
00:10:19 verbose #14318 > > pos_vec = zero_vec ()
00:10:19 verbose #14319 > > velocity = vec 0 vy0 vz0
00:10:19 verbose #14320 > > }
00:10:19 verbose #14321 > > states_ps (euler_cromer_ps dt) (baseball_forces ()) initial_state
00:10:19 verbose #14322 > > >> Some
00:10:19 verbose #14323 > > |> z_ge0
00:10:19 verbose #14324 > > |> trajectory
00:10:19 verbose #14325 > >
00:10:19 verbose #14326 > > inl baseball_range dt v0 theta_deg =
00:10:19 verbose #14327 > > baseball_trajectory dt v0 theta_deg
00:10:19 verbose #14328 > > |> listm.fold (fun _ (y, _) => y) 0
00:10:19 verbose #14329 > >
00:10:19 verbose #14330 > > inl x : a _ f64 = am'.init_series 10 80 1
00:10:19 verbose #14331 > > inl y = x |> am.map (baseball_range 0.01 45)
00:10:19 verbose #14332 > > "range for a baseball hit at 45 m/s",
00:10:19 verbose #14333 > > "angle above horizontal (degrees)",
00:10:19 verbose #14334 > > "",
00:10:19 verbose #14335 > > ;[[ "horizontal range (m)", x, y ]]
00:10:20 verbose #14336 > >
00:10:20 verbose #14337 > > ╭─[ 1.14s - return value ]─────────────────────────────────────────────────────╮
00:10:20 verbose #14338 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:20 verbose #14339 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:20 verbose #14340 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:20 verbose #14341 > > │ stroke="none"/> │
00:10:20 verbose #14342 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:20 verbose #14343 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:20 verbose #14344 > > │ fill="#FFFFFF"> │
00:10:20 verbose #14345 > > │ range for a baseball hit at 45 m/s │
00:10:20 verbose #14346 > > │ </text> │
00:10:20 verbose #14347 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="55" y1="424" x2="55" │
00:10:20 verbose #14348 > > │ y2="75"/> │
00:10:20 verbose #14349 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:10:20 verbose #14350 > > │ y2="75"/> │
00:10:20 verbose #14351 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:20 verbose #14352 > > │ y2="75"/> │
00:10:20 verbose #14353 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:10:20 verbose #14354 > > │ y2="75"/> │
00:10:20 verbose #14355 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="84" y1="424" x2="84" │
00:10:20 verbose #14356 > > │ y2="75"/> │
00:10:20 verbose #14357 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="91" y1="424" x2="91" │
00:10:20 verbose #14358 > > │ y2="75"/> │
00:10:20 verbose #14359 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="98" y1="424" x2="98" │
00:10:20 verbose #14360 > > │ y2="75"/> │
00:10:20 verbose #14361 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │
00:10:20 verbose #14362 > > │ x2="105" y2="75"/> │
00:10:20 verbose #14363 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="112" y1="424" │
00:10:20 verbose #14364 > > │ x2="112" y2="75"/> │
00:10:20 verbose #14365 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:20 verbose #14366 > > │ x2="119" y2="75"/> │
00:10:20 verbose #14367 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="127" y1="424" │
00:10:20 verbose #14368 > > │ x2="127" y2="75"/> │
00:10:20 verbose #14369 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="134" y1="424" │
00:10:20 verbose #14370 > > │ x2="134" y2="75"/> │
00:10:20 verbose #14371 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │
00:10:20 verbose #14372 > > │ x2="141" y2="75"/> │
00:10:20 verbose #14373 > > │ <lin... │
00:10:20 verbose #14374 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:20 verbose #14375 > >
00:10:20 verbose #14376 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:20 verbose #14377 > > //// test
00:10:20 verbose #14378 > >
00:10:20 verbose #14379 > > inl best_angle (min, max) =
00:10:20 verbose #14380 > > let rec loop theta_deg (best_range, best_theta_deg) =
00:10:20 verbose #14381 > > if theta_deg > max
00:10:20 verbose #14382 > > then best_range, best_theta_deg
00:10:20 verbose #14383 > > else
00:10:20 verbose #14384 > > inl range = baseball_range 0.01 45 theta_deg
00:10:20 verbose #14385 > > loop
00:10:20 verbose #14386 > > (theta_deg + 1)
00:10:20 verbose #14387 > > (if range > best_range
00:10:20 verbose #14388 > > then range, theta_deg
00:10:20 verbose #14389 > > else best_range, best_theta_deg)
00:10:20 verbose #14390 > > loop min (0f64, min)
00:10:20 verbose #14391 > >
00:10:20 verbose #14392 > > best_angle (30f64, 60f64)
00:10:20 verbose #14393 > > |> _assert_eq (116.77499158246208, 41)
00:10:21 verbose #14394 > >
00:10:21 verbose #14395 > > ╭─[ 639.47ms - stdout ]────────────────────────────────────────────────────────╮
00:10:21 verbose #14396 > > │ assert_eq / actual: struct (116.7749916, 41.0) / expected: struct │
00:10:21 verbose #14397 > > │ (116.7749916, 41.0) │
00:10:21 verbose #14398 > > │ │
00:10:21 verbose #14399 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:21 verbose #14400 > >
00:10:21 verbose #14401 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:21 verbose #14402 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:21 verbose #14403 > > │ ## relativity_ps │
00:10:21 verbose #14404 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:21 verbose #14405 > >
00:10:21 verbose #14406 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:21 verbose #14407 > > inl relativity_ps fs (st : particle_state) =
00:10:21 verbose #14408 > > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec
00:10:21 verbose #14409 > > inl c = 299792458
00:10:21 verbose #14410 > > inl u = st.velocity ^/ c
00:10:21 verbose #14411 > > inl acc = sqrt (1 - (u <.> u)) *^ (f_net ^-^ (f_net <.> u) *^ u) ^/ st.mass
00:10:21 verbose #14412 > > d_particle_state {
00:10:21 verbose #14413 > > dmdt = 0
00:10:21 verbose #14414 > > dqdt = 0
00:10:21 verbose #14415 > > dtdt = 1
00:10:21 verbose #14416 > > drdt = st.velocity
00:10:21 verbose #14417 > > dvdt = acc
00:10:21 verbose #14418 > > }
00:10:21 verbose #14419 > >
00:10:21 verbose #14420 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:21 verbose #14421 > > //// test
00:10:21 verbose #14422 > >
00:10:21 verbose #14423 > > inl year = 365.25 * 24 * 60 * 60
00:10:21 verbose #14424 > > inl c = 299792458
00:10:21 verbose #14425 > > inl ~method = runge_kutta_4 100000
00:10:21 verbose #14426 > > inl forces = [[ fun _ => 10 *^ i_hat () ]]
00:10:21 verbose #14427 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:21 verbose #14428 > > inl initial_state =
00:10:21 verbose #14429 > > particle_state { default_particle_state' with
00:10:21 verbose #14430 > > mass = 1
00:10:21 verbose #14431 > > }
00:10:21 verbose #14432 > >
00:10:21 verbose #14433 > > inl newton_states = solver_ method (newton_second_ps forces) initial_state
00:10:21 verbose #14434 > > inl relativity_states = solver_ method (relativity_ps forces) initial_state
00:10:21 verbose #14435 > >
00:10:21 verbose #14436 > > inl newton_x, newton_y =
00:10:21 verbose #14437 > > newton_states
00:10:21 verbose #14438 > > >> Some
00:10:21 verbose #14439 > > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year)
00:10:21 verbose #14440 > > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c)
00:10:21 verbose #14441 > > |> listm'.unzip
00:10:21 verbose #14442 > >
00:10:21 verbose #14443 > > inl _, relativity_y =
00:10:21 verbose #14444 > > relativity_states
00:10:21 verbose #14445 > > >> Some
00:10:21 verbose #14446 > > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year)
00:10:21 verbose #14447 > > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c)
00:10:21 verbose #14448 > > |> listm'.unzip
00:10:21 verbose #14449 > >
00:10:21 verbose #14450 > > inl newton_x : a i32 _ = newton_x |> listm.toArray
00:10:21 verbose #14451 > > inl newton_y : a i32 _ = newton_y |> listm.toArray
00:10:21 verbose #14452 > > inl relativity_y : a i32 _ = relativity_y |> listm.toArray
00:10:21 verbose #14453 > >
00:10:21 verbose #14454 > > "response to a constant force",
00:10:21 verbose #14455 > > "time (years)",
00:10:21 verbose #14456 > > "velocity (multiples of c)",
00:10:21 verbose #14457 > > ;[[
00:10:21 verbose #14458 > > "newtonian", newton_x, newton_y
00:10:21 verbose #14459 > > "relativistic", newton_x, relativity_y
00:10:21 verbose #14460 > > ]]
00:10:21 verbose #14461 > >
00:10:21 verbose #14462 > > ╭─[ 682.51ms - return value ]──────────────────────────────────────────────────╮
00:10:21 verbose #14463 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:21 verbose #14464 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:21 verbose #14465 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:21 verbose #14466 > > │ stroke="none"/> │
00:10:21 verbose #14467 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:21 verbose #14468 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:21 verbose #14469 > > │ fill="#FFFFFF"> │
00:10:21 verbose #14470 > > │ response to a constant force │
00:10:21 verbose #14471 > > │ </text> │
00:10:21 verbose #14472 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:10:21 verbose #14473 > > │ y2="75"/> │
00:10:21 verbose #14474 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:21 verbose #14475 > > │ y2="75"/> │
00:10:21 verbose #14476 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:10:21 verbose #14477 > > │ y2="75"/> │
00:10:21 verbose #14478 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:10:21 verbose #14479 > > │ y2="75"/> │
00:10:21 verbose #14480 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:10:21 verbose #14481 > > │ y2="75"/> │
00:10:21 verbose #14482 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:10:21 verbose #14483 > > │ x2="109" y2="75"/> │
00:10:21 verbose #14484 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:21 verbose #14485 > > │ x2="119" y2="75"/> │
00:10:21 verbose #14486 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:21 verbose #14487 > > │ x2="129" y2="75"/> │
00:10:21 verbose #14488 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:21 verbose #14489 > > │ x2="139" y2="75"/> │
00:10:21 verbose #14490 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:10:21 verbose #14491 > > │ x2="149" y2="75"/> │
00:10:21 verbose #14492 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:10:21 verbose #14493 > > │ x2="159" y2="75"/> │
00:10:21 verbose #14494 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:21 verbose #14495 > > │ x2="169" y2="75"/> │
00:10:21 verbose #14496 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:10:21 verbose #14497 > > │ x2="179" y2="75"/> │
00:10:21 verbose #14498 > > │ <line ... │
00:10:21 verbose #14499 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:21 verbose #14500 > >
00:10:21 verbose #14501 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:21 verbose #14502 > > inl uniform_lorentz_force v_e v_b (st : particle_state) =
00:10:21 verbose #14503 > > st.charge *^ (v_e ^+^ st.velocity >< v_b)
00:10:22 verbose #14504 > >
00:10:22 verbose #14505 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:22 verbose #14506 > > //// test
00:10:22 verbose #14507 > >
00:10:22 verbose #14508 > > inl c : f64 = 299792458
00:10:22 verbose #14509 > > inl ~method = runge_kutta_4 0.000000001
00:10:22 verbose #14510 > > inl forces = [[ uniform_lorentz_force (zero_vec ()) (k_hat ()) ]]
00:10:22 verbose #14511 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:22 verbose #14512 > > inl initial_state =
00:10:22 verbose #14513 > > particle_state { default_particle_state' with
00:10:22 verbose #14514 > > mass = 0.000000000000000000000000001672621898
00:10:22 verbose #14515 > > charge = 0.0000000000000000001602176621
00:10:22 verbose #14516 > > velocity = 0.8 *^ (c *^ j_hat ())
00:10:22 verbose #14517 > > }
00:10:22 verbose #14518 > >
00:10:22 verbose #14519 > > inl newton_states = solver_ method (newton_second_ps forces) initial_state
00:10:22 verbose #14520 > > inl relativity_states = solver_ method (relativity_ps forces) initial_state
00:10:22 verbose #14521 > >
00:10:22 verbose #14522 > > inl newton_x, newton_y =
00:10:22 verbose #14523 > > newton_states
00:10:22 verbose #14524 > > >> Some
00:10:22 verbose #14525 > > |> seq.take_while_ (fun (particle_state st) i => i < 100i32)
00:10:22 verbose #14526 > > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y)
00:10:22 verbose #14527 > > |> listm'.unzip
00:10:22 verbose #14528 > >
00:10:22 verbose #14529 > > inl relativity_x, relativity_y =
00:10:22 verbose #14530 > > relativity_states
00:10:22 verbose #14531 > > >> Some
00:10:22 verbose #14532 > > |> seq.take_while_ (fun (particle_state st) i => i < 165i32)
00:10:22 verbose #14533 > > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y)
00:10:22 verbose #14534 > > |> listm'.unzip
00:10:22 verbose #14535 > >
00:10:22 verbose #14536 > > inl newton_x : a i32 _ = newton_x |> listm.toArray
00:10:22 verbose #14537 > > inl newton_y : a i32 _ = newton_y |> listm.toArray
00:10:22 verbose #14538 > >
00:10:22 verbose #14539 > > inl relativity_x : a i32 _ = relativity_x |> listm.toArray
00:10:22 verbose #14540 > > inl relativity_y : a i32 _ = relativity_y |> listm.toArray
00:10:22 verbose #14541 > >
00:10:22 verbose #14542 > > "proton in a 1-t magnetic field",
00:10:22 verbose #14543 > > "x (m)",
00:10:22 verbose #14544 > > "y (m)",
00:10:22 verbose #14545 > > ;[[
00:10:22 verbose #14546 > > "newtonian", newton_x, newton_y
00:10:22 verbose #14547 > > "relativistic", relativity_x, relativity_y
00:10:22 verbose #14548 > > ]]
00:10:22 verbose #14549 > >
00:10:22 verbose #14550 > > ╭─[ 701.59ms - return value ]──────────────────────────────────────────────────╮
00:10:22 verbose #14551 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:22 verbose #14552 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:22 verbose #14553 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:22 verbose #14554 > > │ stroke="none"/> │
00:10:22 verbose #14555 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:22 verbose #14556 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:22 verbose #14557 > > │ fill="#FFFFFF"> │
00:10:22 verbose #14558 > > │ proton in a 1-t magnetic field │
00:10:22 verbose #14559 > > │ </text> │
00:10:22 verbose #14560 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="58" y1="424" x2="58" │
00:10:22 verbose #14561 > > │ y2="75"/> │
00:10:22 verbose #14562 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:22 verbose #14563 > > │ y2="75"/> │
00:10:22 verbose #14564 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="81" y1="424" x2="81" │
00:10:22 verbose #14565 > > │ y2="75"/> │
00:10:22 verbose #14566 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:10:22 verbose #14567 > > │ y2="75"/> │
00:10:22 verbose #14568 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │
00:10:22 verbose #14569 > > │ x2="105" y2="75"/> │
00:10:22 verbose #14570 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="117" y1="424" │
00:10:22 verbose #14571 > > │ x2="117" y2="75"/> │
00:10:22 verbose #14572 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:22 verbose #14573 > > │ x2="129" y2="75"/> │
00:10:22 verbose #14574 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │
00:10:22 verbose #14575 > > │ x2="141" y2="75"/> │
00:10:22 verbose #14576 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:10:22 verbose #14577 > > │ x2="153" y2="75"/> │
00:10:22 verbose #14578 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="165" y1="424" │
00:10:22 verbose #14579 > > │ x2="165" y2="75"/> │
00:10:22 verbose #14580 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="177" y1="424" │
00:10:22 verbose #14581 > > │ x2="177" y2="75"/> │
00:10:22 verbose #14582 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="189" y1="424" │
00:10:22 verbose #14583 > > │ x2="189" y2="75"/> │
00:10:22 verbose #14584 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="201" y1="424" │
00:10:22 verbose #14585 > > │ x2="201" y2="75"/> │
00:10:22 verbose #14586 > > │ <l... │
00:10:22 verbose #14587 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:22 verbose #14588 > >
00:10:22 verbose #14589 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:22 verbose #14590 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:22 verbose #14591 > > │ ### system kinetic energy versus time 1 │
00:10:22 verbose #14592 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:22 verbose #14593 > >
00:10:22 verbose #14594 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:22 verbose #14595 > > //// test
00:10:22 verbose #14596 > >
00:10:22 verbose #14597 > > inl central_force f (particle_state st1) (particle_state st2) =
00:10:22 verbose #14598 > > inl r1 = st1.pos_vec
00:10:22 verbose #14599 > > inl r2 = st2.pos_vec
00:10:22 verbose #14600 > > inl r21 = r2 ^-^ r1
00:10:22 verbose #14601 > > inl r21mag = magnitude r21
00:10:22 verbose #14602 > > f r21mag *^ r21 ^/ r21mag
00:10:22 verbose #14603 > >
00:10:22 verbose #14604 > > inl billiard_force k re =
00:10:22 verbose #14605 > > inl f r =
00:10:22 verbose #14606 > > if r >= re
00:10:22 verbose #14607 > > then 0
00:10:22 verbose #14608 > > else -k * (r - re)
00:10:22 verbose #14609 > > central_force f
00:10:22 verbose #14610 > >
00:10:22 verbose #14611 > > type force_vector = vec
00:10:22 verbose #14612 > > type two_body_force = particle_state -> particle_state -> force_vector
00:10:22 verbose #14613 > >
00:10:22 verbose #14614 > > union force =
00:10:22 verbose #14615 > > | ExternalForce : i32 * one_body_force
00:10:22 verbose #14616 > > | InternalForce : i32 * i32 * two_body_force
00:10:22 verbose #14617 > >
00:10:22 verbose #14618 > > nominal multi_particle_state = list particle_state
00:10:22 verbose #14619 > >
00:10:22 verbose #14620 > > nominal d_multi_particle_state = list d_particle_state
00:10:22 verbose #14621 > >
00:10:22 verbose #14622 > > inl force_on n sts force =
00:10:22 verbose #14623 > > match force with
00:10:22 verbose #14624 > > | ExternalForce (n0, f_one_body) =>
00:10:22 verbose #14625 > > if n = n0
00:10:22 verbose #14626 > > then f_one_body
00:10:22 verbose #14627 > > else fun _ => zero_vec ()
00:10:22 verbose #14628 > > | InternalForce (n0, n1, f_two_body) =>
00:10:22 verbose #14629 > > if n = n0
00:10:22 verbose #14630 > > then f_two_body (sts |> listm'.item n1)
00:10:22 verbose #14631 > > elif n = n1
00:10:22 verbose #14632 > > then f_two_body (sts |> listm'.item n0)
00:10:22 verbose #14633 > > else fun _ => zero_vec ()
00:10:22 verbose #14634 > >
00:10:22 verbose #14635 > > inl forces_on n (multi_particle_state sts) fs =
00:10:22 verbose #14636 > > fs |> listm.map (force_on n sts)
00:10:22 verbose #14637 > >
00:10:22 verbose #14638 > > inl newton_second_mps fs (multi_particle_state sts) : d_multi_particle_state =
00:10:22 verbose #14639 > > inl deriv (n, st) =
00:10:22 verbose #14640 > > newton_second_ps (forces_on n (multi_particle_state sts) fs) st
00:10:22 verbose #14641 > > sts |> listm'.indexed |> listm.map deriv |> d_multi_particle_state
00:10:22 verbose #14642 > >
00:10:22 verbose #14643 > > instance (+++) d_multi_particle_state = fun (d_multi_particle_state dsts1)
00:10:22 verbose #14644 > > (d_multi_particle_state dsts2) =>
00:10:22 verbose #14645 > > d_multi_particle_state (listm'.zip_with_ (+++) dsts1 dsts2)
00:10:22 verbose #14646 > >
00:10:22 verbose #14647 > > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) =>
00:10:22 verbose #14648 > > d_multi_particle_state (dsts |> listm.map (scale w))
00:10:22 verbose #14649 > >
00:10:22 verbose #14650 > > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) =>
00:10:22 verbose #14651 > > inl (d_multi_particle_state dsts) =
00:10:22 verbose #14652 > > real
00:10:22 verbose #14653 > > match dsts with
00:10:22 verbose #14654 > > | d_multi_particle_state _ => dsts
00:10:22 verbose #14655 > > listm'.zip_with_ (shift dt) dsts sts |> multi_particle_state
00:10:22 verbose #14656 > >
00:10:22 verbose #14657 > > inl euler_cromer_mps dt : numerical_method multi_particle_state
00:10:22 verbose #14658 > > d_multi_particle_state =
00:10:22 verbose #14659 > > fun deriv mpst0 =>
00:10:22 verbose #14660 > > inl mpst1 = euler dt deriv mpst0
00:10:22 verbose #14661 > > inl (multi_particle_state sts0) = mpst0
00:10:22 verbose #14662 > > inl (multi_particle_state sts1) = mpst1
00:10:22 verbose #14663 > > sts1
00:10:22 verbose #14664 > > |> listm'.zip_ sts0
00:10:22 verbose #14665 > > |> listm.map (fun ((particle_state st0), (particle_state st1)) =>
00:10:22 verbose #14666 > > particle_state {
00:10:22 verbose #14667 > > st1 with
00:10:22 verbose #14668 > > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt
00:10:22 verbose #14669 > > }
00:10:22 verbose #14670 > > )
00:10:22 verbose #14671 > > |> multi_particle_state
00:10:22 verbose #14672 > >
00:10:22 verbose #14673 > > inl update_mps (method : numerical_method multi_particle_state
00:10:22 verbose #14674 > > d_multi_particle_state) =
00:10:22 verbose #14675 > > newton_second_mps >> method
00:10:22 verbose #14676 > >
00:10:22 verbose #14677 > > inl states_mps (method : numerical_method multi_particle_state
00:10:22 verbose #14678 > > d_multi_particle_state) =
00:10:22 verbose #14679 > > newton_second_mps >> method >> seq.iterate_
00:10:22 verbose #14680 > >
00:10:22 verbose #14681 > >
00:10:22 verbose #14682 > > inl kinetic_energy (particle_state st) =
00:10:22 verbose #14683 > > inl m = st.mass
00:10:22 verbose #14684 > > inl v = magnitude st.velocity
00:10:22 verbose #14685 > > 0.5 * m * v ** 2
00:10:22 verbose #14686 > >
00:10:22 verbose #14687 > > inl system_ke (multi_particle_state sts) =
00:10:22 verbose #14688 > > sts |> listm.map kinetic_energy |> listm'.sum
00:10:22 verbose #14689 > >
00:10:22 verbose #14690 > > inl linear_spring_pe k re (particle_state st1) (particle_state st2) =
00:10:22 verbose #14691 > > inl r1 = st1.pos_vec
00:10:22 verbose #14692 > > inl r2 = st2.pos_vec
00:10:22 verbose #14693 > > inl r21 = r2 ^-^ r1
00:10:22 verbose #14694 > > inl r21mag = magnitude r21
00:10:22 verbose #14695 > > k * (r21mag - re) ** 2 / 2
00:10:22 verbose #14696 > >
00:10:22 verbose #14697 > > inl earth_surface_gravity_pe (particle_state st) =
00:10:22 verbose #14698 > > inl g = 9.80665
00:10:22 verbose #14699 > > inl m = st.mass
00:10:22 verbose #14700 > > inl z = st.pos_vec.z
00:10:22 verbose #14701 > > m * g * z
00:10:22 verbose #14702 > >
00:10:22 verbose #14703 > > inl two_springs_pe (multi_particle_state sts) =
00:10:22 verbose #14704 > > inl st0 = sts |> listm'.item 0i32
00:10:22 verbose #14705 > > inl st1 = sts |> listm'.item 1i32
00:10:22 verbose #14706 > > linear_spring_pe 100 0.5 (default_particle_state ()) st0
00:10:22 verbose #14707 > > + linear_spring_pe 100 0.5 st0 st1
00:10:22 verbose #14708 > > + earth_surface_gravity_pe st0
00:10:22 verbose #14709 > > + earth_surface_gravity_pe st1
00:10:22 verbose #14710 > >
00:10:22 verbose #14711 > > inl two_springs_me mpst =
00:10:22 verbose #14712 > > system_ke mpst + two_springs_pe mpst
00:10:22 verbose #14713 > >
00:10:22 verbose #14714 > > inl ball_radius () = 0.03
00:10:22 verbose #14715 > >
00:10:22 verbose #14716 > > inl billiard_forces k =
00:10:22 verbose #14717 > > [[ InternalForce (0, 1, billiard_force k (2 * ball_radius ())) ]]
00:10:22 verbose #14718 > >
00:10:22 verbose #14719 > > inl billiard_update n_method k dt =
00:10:22 verbose #14720 > > update_mps (n_method dt) (billiard_forces k)
00:10:22 verbose #14721 > >
00:10:22 verbose #14722 > > inl billiard_initial () =
00:10:22 verbose #14723 > > inl ball_mass = 0.160
00:10:22 verbose #14724 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:22 verbose #14725 > > multi_particle_state [[
00:10:22 verbose #14726 > > particle_state {
00:10:22 verbose #14727 > > default_particle_state' with
00:10:22 verbose #14728 > > mass = ball_mass
00:10:22 verbose #14729 > > pos_vec = zero_vec ()
00:10:22 verbose #14730 > > velocity = 0.2 *^ i_hat ()
00:10:22 verbose #14731 > > }
00:10:22 verbose #14732 > > particle_state {
00:10:22 verbose #14733 > > default_particle_state' with
00:10:22 verbose #14734 > > mass = ball_mass
00:10:22 verbose #14735 > > pos_vec = i_hat () ^+^ 0.02 *^ j_hat ()
00:10:22 verbose #14736 > > velocity = zero_vec ()
00:10:22 verbose #14737 > > }
00:10:22 verbose #14738 > > ]]
00:10:22 verbose #14739 > >
00:10:22 verbose #14740 > > inl billiard_states ~n_method k dt =
00:10:22 verbose #14741 > > states_mps (n_method dt) (billiard_forces k) (billiard_initial ())
00:10:22 verbose #14742 > >
00:10:22 verbose #14743 > > inl billiard_states_finite n_method k dt =
00:10:22 verbose #14744 > > billiard_states n_method k dt
00:10:22 verbose #14745 > > >> Some
00:10:22 verbose #14746 > > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) =>
00:10:22 verbose #14747 > > (mpst |> listm'.item 0i32).time <= 10
00:10:22 verbose #14748 > > )
00:10:22 verbose #14749 > >
00:10:22 verbose #14750 > > inl momentum (particle_state st) =
00:10:22 verbose #14751 > > inl m = st.mass
00:10:22 verbose #14752 > > inl v = st.velocity
00:10:22 verbose #14753 > > m *^ v
00:10:22 verbose #14754 > >
00:10:22 verbose #14755 > > inl system_p (multi_particle_state sts) =
00:10:22 verbose #14756 > > sts |> listm.map momentum |> sum_vec
00:10:22 verbose #14757 > >
00:10:22 verbose #14758 > >
00:10:22 verbose #14759 > > inl time_ke_ec_x, time_ke_ec_y =
00:10:22 verbose #14760 > > billiard_states_finite euler_cromer_mps 30 0.03
00:10:22 verbose #14761 > > |> listm.map (fun (multi_particle_state mpst) =>
00:10:22 verbose #14762 > > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst)
00:10:22 verbose #14763 > > )
00:10:22 verbose #14764 > > |> listm'.unzip
00:10:22 verbose #14765 > >
00:10:22 verbose #14766 > > inl time_ke_rk4_x, time_ke_rk4_y =
00:10:22 verbose #14767 > > billiard_states_finite runge_kutta_4 30 0.03
00:10:22 verbose #14768 > > |> listm.map (fun (multi_particle_state mpst) =>
00:10:22 verbose #14769 > > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst)
00:10:22 verbose #14770 > > )
00:10:22 verbose #14771 > > |> listm'.unzip
00:10:22 verbose #14772 > >
00:10:22 verbose #14773 > > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray
00:10:22 verbose #14774 > > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray
00:10:22 verbose #14775 > >
00:10:22 verbose #14776 > > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray
00:10:22 verbose #14777 > > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray
00:10:22 verbose #14778 > >
00:10:22 verbose #14779 > > "system kinetic energy versus time",
00:10:22 verbose #14780 > > "time (s)",
00:10:22 verbose #14781 > > "system kinetic energy (j)",
00:10:22 verbose #14782 > > ;[[
00:10:22 verbose #14783 > > "euler-cromer", time_ke_ec_x, time_ke_ec_y
00:10:22 verbose #14784 > > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y
00:10:22 verbose #14785 > > ]]
00:10:24 verbose #14786 > >
00:10:24 verbose #14787 > > ╭─[ 2.07s - return value ]─────────────────────────────────────────────────────╮
00:10:24 verbose #14788 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:24 verbose #14789 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:24 verbose #14790 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:24 verbose #14791 > > │ stroke="none"/> │
00:10:24 verbose #14792 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:24 verbose #14793 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:24 verbose #14794 > > │ fill="#FFFFFF"> │
00:10:24 verbose #14795 > > │ system kinetic energy versus time │
00:10:24 verbose #14796 > > │ </text> │
00:10:24 verbose #14797 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:10:24 verbose #14798 > > │ y2="75"/> │
00:10:24 verbose #14799 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:24 verbose #14800 > > │ y2="75"/> │
00:10:24 verbose #14801 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:10:24 verbose #14802 > > │ y2="75"/> │
00:10:24 verbose #14803 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:10:24 verbose #14804 > > │ y2="75"/> │
00:10:24 verbose #14805 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:10:24 verbose #14806 > > │ y2="75"/> │
00:10:24 verbose #14807 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:10:24 verbose #14808 > > │ x2="109" y2="75"/> │
00:10:24 verbose #14809 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:24 verbose #14810 > > │ x2="119" y2="75"/> │
00:10:24 verbose #14811 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:24 verbose #14812 > > │ x2="129" y2="75"/> │
00:10:24 verbose #14813 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:24 verbose #14814 > > │ x2="139" y2="75"/> │
00:10:24 verbose #14815 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:10:24 verbose #14816 > > │ x2="149" y2="75"/> │
00:10:24 verbose #14817 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:10:24 verbose #14818 > > │ x2="159" y2="75"/> │
00:10:24 verbose #14819 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:24 verbose #14820 > > │ x2="169" y2="75"/> │
00:10:24 verbose #14821 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:10:24 verbose #14822 > > │ x2="179" y2="75"/> │
00:10:24 verbose #14823 > > │ <... │
00:10:24 verbose #14824 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:24 verbose #14825 > >
00:10:24 verbose #14826 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:24 verbose #14827 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:24 verbose #14828 > > │ ### wave 1 │
00:10:24 verbose #14829 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:24 verbose #14830 > >
00:10:24 verbose #14831 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:24 verbose #14832 > > //// test
00:10:24 verbose #14833 > >
00:10:24 verbose #14834 > > inl linear_spring k re (particle_state st1) (particle_state st2) =
00:10:24 verbose #14835 > > inl r1 = st1.pos_vec
00:10:24 verbose #14836 > > inl r2 = st2.pos_vec
00:10:24 verbose #14837 > > inl r21 = r2 ^-^ r1
00:10:24 verbose #14838 > > inl r21mag = magnitude r21
00:10:24 verbose #14839 > > -k * (r21mag - re) *^ r21 ^/ r21mag
00:10:24 verbose #14840 > >
00:10:24 verbose #14841 > > inl fixed_linear_spring k re r1 =
00:10:24 verbose #14842 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:24 verbose #14843 > > linear_spring k re (particle_state { default_particle_state' with pos_vec =
00:10:24 verbose #14844 > > r1 })
00:10:24 verbose #14845 > >
00:10:24 verbose #14846 > > inl forces_string () =
00:10:24 verbose #14847 > > [[
00:10:24 verbose #14848 > > ExternalForce (0, fixed_linear_spring 5384 0 (zero_vec ()))
00:10:24 verbose #14849 > > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ()))
00:10:24 verbose #14850 > > ]] ++ (
00:10:24 verbose #14851 > > listm'.init_series 0 59 1
00:10:24 verbose #14852 > > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0))
00:10:24 verbose #14853 > > )
00:10:24 verbose #14854 > >
00:10:24 verbose #14855 > > inl string_update dt =
00:10:24 verbose #14856 > > update_mps (runge_kutta_4 dt) (forces_string ())
00:10:24 verbose #14857 > >
00:10:24 verbose #14858 > > inl string_initial_overtone n =
00:10:24 verbose #14859 > > inl ball_mass = 0.0008293 * 0.65 / 64
00:10:24 verbose #14860 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:24 verbose #14861 > > listm'.init_series 0.01 0.64 0.01
00:10:24 verbose #14862 > > |> listm.map (fun x =>
00:10:24 verbose #14863 > > inl y = 0.005 * sin (conv n * pi * x / 0.65)
00:10:24 verbose #14864 > > particle_state {
00:10:24 verbose #14865 > > default_particle_state' with
00:10:24 verbose #14866 > > mass = ball_mass
00:10:24 verbose #14867 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:10:24 verbose #14868 > > velocity = zero_vec ()
00:10:24 verbose #14869 > > }
00:10:24 verbose #14870 > > )
00:10:24 verbose #14871 > > |> multi_particle_state
00:10:24 verbose #14872 > >
00:10:24 verbose #14873 > > inl string_initial_pluck () =
00:10:24 verbose #14874 > > inl ball_mass = 0.0008293 * 0.65 / 64
00:10:24 verbose #14875 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:24 verbose #14876 > > listm'.init_series 0.01 0.64 0.01
00:10:24 verbose #14877 > > |> listm.map (fun x =>
00:10:24 verbose #14878 > > inl y =
00:10:24 verbose #14879 > > inl n = if x <= 0.51 then 0 else 0.65
00:10:24 verbose #14880 > > 0.005 / (0.51 - n) * (x - n)
00:10:24 verbose #14881 > > particle_state {
00:10:24 verbose #14882 > > default_particle_state' with
00:10:24 verbose #14883 > > mass = ball_mass
00:10:24 verbose #14884 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:10:24 verbose #14885 > > velocity = zero_vec ()
00:10:24 verbose #14886 > > }
00:10:24 verbose #14887 > > )
00:10:24 verbose #14888 > > |> multi_particle_state
00:10:24 verbose #14889 > >
00:10:24 verbose #14890 > > let main () =
00:10:24 verbose #14891 > > inl ~frames = listm'.init_series 0 9 1f64
00:10:24 verbose #14892 > > inl initial_state = string_initial_overtone 3i32
00:10:24 verbose #14893 > > inl frames =
00:10:24 verbose #14894 > > frames
00:10:24 verbose #14895 > > |> listm.map (fun n =>
00:10:24 verbose #14896 > > inl (multi_particle_state sts) =
00:10:24 verbose #14897 > > seq.iterate' (string_update 0.000025) initial_state |> fun f =>
00:10:24 verbose #14898 > > f 0f64
00:10:24 verbose #14899 > > inl rs =
00:10:24 verbose #14900 > > [[ zero_vec () ]]
00:10:24 verbose #14901 > > ++ (sts |> listm.map (fun (particle_state st) => st.pos_vec))
00:10:24 verbose #14902 > > ++ [[ 0.65 *^ i_hat () ]]
00:10:24 verbose #14903 > > inl x, y =
00:10:24 verbose #14904 > > rs
00:10:24 verbose #14905 > > |> listm.map (fun r => r.x, r.y)
00:10:24 verbose #14906 > > |> listm'.unzip
00:10:24 verbose #14907 > > inl x : a i32 _ = x |> listm.toArray
00:10:24 verbose #14908 > > inl y : a i32 _ = y |> listm.toArray
00:10:24 verbose #14909 > > x, y
00:10:24 verbose #14910 > > )
00:10:24 verbose #14911 > > |> listm.toArray : a i32 _
00:10:24 verbose #14912 > >
00:10:24 verbose #14913 > > inl n = 0i32
00:10:24 verbose #14914 > >
00:10:24 verbose #14915 > > inl x, y = index frames n
00:10:24 verbose #14916 > >
00:10:24 verbose #14917 > > "wave",
00:10:24 verbose #14918 > > "position (m)",
00:10:24 verbose #14919 > > "displacement (m)",
00:10:24 verbose #14920 > > ;[[
00:10:24 verbose #14921 > > ($'$"{!n}"' : string), x, y
00:10:24 verbose #14922 > > ]]
00:10:25 verbose #14923 > >
00:10:25 verbose #14924 > > ╭─[ 244.31ms - return value ]──────────────────────────────────────────────────╮
00:10:25 verbose #14925 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:25 verbose #14926 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:25 verbose #14927 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:25 verbose #14928 > > │ stroke="none"/> │
00:10:25 verbose #14929 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:25 verbose #14930 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:25 verbose #14931 > > │ fill="#FFFFFF"> │
00:10:25 verbose #14932 > > │ wave │
00:10:25 verbose #14933 > > │ </text> │
00:10:25 verbose #14934 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:10:25 verbose #14935 > > │ y2="75"/> │
00:10:25 verbose #14936 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:25 verbose #14937 > > │ y2="75"/> │
00:10:25 verbose #14938 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:10:25 verbose #14939 > > │ y2="75"/> │
00:10:25 verbose #14940 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │
00:10:25 verbose #14941 > > │ y2="75"/> │
00:10:25 verbose #14942 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:10:25 verbose #14943 > > │ y2="75"/> │
00:10:25 verbose #14944 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │
00:10:25 verbose #14945 > > │ x2="100" y2="75"/> │
00:10:25 verbose #14946 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │
00:10:25 verbose #14947 > > │ x2="108" y2="75"/> │
00:10:25 verbose #14948 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │
00:10:25 verbose #14949 > > │ x2="116" y2="75"/> │
00:10:25 verbose #14950 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │
00:10:25 verbose #14951 > > │ x2="123" y2="75"/> │
00:10:25 verbose #14952 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │
00:10:25 verbose #14953 > > │ x2="131" y2="75"/> │
00:10:25 verbose #14954 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:25 verbose #14955 > > │ x2="139" y2="75"/> │
00:10:25 verbose #14956 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │
00:10:25 verbose #14957 > > │ x2="146" y2="75"/> │
00:10:25 verbose #14958 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="154" y1="424" │
00:10:25 verbose #14959 > > │ x2="154" y2="75"/> │
00:10:25 verbose #14960 > > │ <line opacity="1" stroke="#323... │
00:10:25 verbose #14961 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:25 verbose #14962 > >
00:10:25 verbose #14963 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:25 verbose #14964 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:25 verbose #14965 > > │ ### system kinetic energy versus time 2 │
00:10:25 verbose #14966 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:25 verbose #14967 > >
00:10:25 verbose #14968 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:25 verbose #14969 > > //// test
00:10:25 verbose #14970 > >
00:10:25 verbose #14971 > > inl central_force f (particle_state st1) (particle_state st2) =
00:10:25 verbose #14972 > > inl r1 = st1.pos_vec
00:10:25 verbose #14973 > > inl r2 = st2.pos_vec
00:10:25 verbose #14974 > > inl r21 = r2 ^-^ r1
00:10:25 verbose #14975 > > inl r21mag = magnitude r21
00:10:25 verbose #14976 > > f r21mag *^ r21 ^/ r21mag
00:10:25 verbose #14977 > >
00:10:25 verbose #14978 > > inl billiard_force k re =
00:10:25 verbose #14979 > > inl f r =
00:10:25 verbose #14980 > > if r >= re
00:10:25 verbose #14981 > > then 0
00:10:25 verbose #14982 > > else -k * (r - re)
00:10:25 verbose #14983 > > central_force f
00:10:25 verbose #14984 > >
00:10:25 verbose #14985 > > type force_vector = vec
00:10:25 verbose #14986 > > type two_body_force = particle_state -> particle_state -> force_vector
00:10:25 verbose #14987 > >
00:10:25 verbose #14988 > > union force t =
00:10:25 verbose #14989 > > | ExternalForce : t * one_body_force
00:10:25 verbose #14990 > > | InternalForce : t * t * two_body_force
00:10:25 verbose #14991 > >
00:10:25 verbose #14992 > > nominal multi_particle_state = stream.stream particle_state
00:10:25 verbose #14993 > >
00:10:25 verbose #14994 > > nominal d_multi_particle_state = stream.stream d_particle_state
00:10:25 verbose #14995 > >
00:10:25 verbose #14996 > > inl force_on n s force =
00:10:25 verbose #14997 > > match force with
00:10:25 verbose #14998 > > | ExternalForce (n0, f_one_body) =>
00:10:25 verbose #14999 > > if n = n0
00:10:25 verbose #15000 > > then f_one_body
00:10:25 verbose #15001 > > else fun _ => zero_vec ()
00:10:25 verbose #15002 > > | InternalForce (n0, n1, f_two_body) =>
00:10:25 verbose #15003 > > if n = n0
00:10:25 verbose #15004 > > then s |> stream.try_item n1 |> optionm.map f_two_body
00:10:25 verbose #15005 > > elif n = n1
00:10:25 verbose #15006 > > then s |> stream.try_item n0 |> optionm.map f_two_body
00:10:25 verbose #15007 > > else None
00:10:25 verbose #15008 > > |> optionm'.default_value (fun _ => zero_vec ())
00:10:25 verbose #15009 > >
00:10:25 verbose #15010 > > inl forces_on n (multi_particle_state sts) fs =
00:10:25 verbose #15011 > > fs
00:10:25 verbose #15012 > > |> listm.map (force_on n sts)
00:10:25 verbose #15013 > >
00:10:25 verbose #15014 > > inl newton_second_mps fs ((multi_particle_state sts) as mpst) =
00:10:25 verbose #15015 > > inl deriv (n, st) =
00:10:25 verbose #15016 > > newton_second_ps (forces_on n mpst fs) st
00:10:25 verbose #15017 > > sts |> stream.indexed |> stream.map deriv |> d_multi_particle_state
00:10:25 verbose #15018 > >
00:10:25 verbose #15019 > > instance (+++) d_multi_particle_state =
00:10:25 verbose #15020 > > fun (d_multi_particle_state dsts1) (d_multi_particle_state dsts2) =>
00:10:25 verbose #15021 > > (dsts1, dsts2)
00:10:25 verbose #15022 > > ||> stream.zip_with (+++)
00:10:25 verbose #15023 > > |> d_multi_particle_state
00:10:25 verbose #15024 > >
00:10:25 verbose #15025 > > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) =>
00:10:25 verbose #15026 > > dsts
00:10:25 verbose #15027 > > |> stream.map (scale w)
00:10:25 verbose #15028 > > |> d_multi_particle_state
00:10:25 verbose #15029 > >
00:10:25 verbose #15030 > > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) =>
00:10:25 verbose #15031 > > inl (d_multi_particle_state dsts) =
00:10:25 verbose #15032 > > real
00:10:25 verbose #15033 > > match dsts with
00:10:25 verbose #15034 > > | d_multi_particle_state _ => dsts
00:10:25 verbose #15035 > > (dsts, sts)
00:10:25 verbose #15036 > > ||> stream.zip_with (shift dt)
00:10:25 verbose #15037 > > |> stream.memoize
00:10:25 verbose #15038 > > |> fun x => x ()
00:10:25 verbose #15039 > > |> multi_particle_state
00:10:25 verbose #15040 > >
00:10:25 verbose #15041 > > inl euler_cromer_mps dt : numerical_method multi_particle_state
00:10:25 verbose #15042 > > d_multi_particle_state =
00:10:25 verbose #15043 > > fun deriv ((multi_particle_state sts0) as mpst0) =>
00:10:25 verbose #15044 > > inl (multi_particle_state sts1) = euler dt deriv mpst0
00:10:25 verbose #15045 > > (sts0, sts1)
00:10:25 verbose #15046 > > ||> stream.zip
00:10:25 verbose #15047 > > |> stream.map (fun ((particle_state st0), (particle_state st1)) =>
00:10:25 verbose #15048 > > particle_state {
00:10:25 verbose #15049 > > st1 with
00:10:25 verbose #15050 > > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt
00:10:25 verbose #15051 > > }
00:10:25 verbose #15052 > > )
00:10:25 verbose #15053 > > |> multi_particle_state
00:10:25 verbose #15054 > >
00:10:25 verbose #15055 > > inl update_mps (method : numerical_method multi_particle_state
00:10:25 verbose #15056 > > d_multi_particle_state) =
00:10:25 verbose #15057 > > newton_second_mps >> method
00:10:25 verbose #15058 > >
00:10:25 verbose #15059 > > inl states_mps (method : numerical_method multi_particle_state
00:10:25 verbose #15060 > > d_multi_particle_state) =
00:10:25 verbose #15061 > > newton_second_mps
00:10:25 verbose #15062 > > >> method
00:10:25 verbose #15063 > > >> (fun x (multi_particle_state y) =>
00:10:25 verbose #15064 > > y
00:10:25 verbose #15065 > > |> stream.memoize
00:10:25 verbose #15066 > > |> (fun x => x ())
00:10:25 verbose #15067 > > |> multi_particle_state |> x
00:10:25 verbose #15068 > > )
00:10:25 verbose #15069 > > // >> stream.iterate
00:10:25 verbose #15070 > > >> seq.iterate'
00:10:25 verbose #15071 > >
00:10:25 verbose #15072 > > inl kinetic_energy (particle_state st) =
00:10:25 verbose #15073 > > inl m = st.mass
00:10:25 verbose #15074 > > inl v = magnitude st.velocity
00:10:25 verbose #15075 > > 0.5 * m * v ** 2
00:10:25 verbose #15076 > >
00:10:25 verbose #15077 > > inl system_ke (multi_particle_state sts) =
00:10:25 verbose #15078 > > sts
00:10:25 verbose #15079 > > |> stream.map kinetic_energy
00:10:25 verbose #15080 > > |> stream.sum
00:10:25 verbose #15081 > >
00:10:25 verbose #15082 > > inl linear_spring_pe k re (particle_state st1) (particle_state st2) =
00:10:25 verbose #15083 > > inl r1 = st1.pos_vec
00:10:25 verbose #15084 > > inl r2 = st2.pos_vec
00:10:25 verbose #15085 > > inl r21 = r2 ^-^ r1
00:10:25 verbose #15086 > > inl r21mag = magnitude r21
00:10:25 verbose #15087 > > k * (r21mag - re) ** 2 / 2
00:10:25 verbose #15088 > >
00:10:25 verbose #15089 > > inl earth_surface_gravity_pe (particle_state st) =
00:10:25 verbose #15090 > > inl g = 9.80665
00:10:25 verbose #15091 > > inl m = st.mass
00:10:25 verbose #15092 > > inl z = st.pos_vec.z
00:10:25 verbose #15093 > > m * g * z
00:10:25 verbose #15094 > >
00:10:25 verbose #15095 > > inl ball_radius () = 0.03
00:10:25 verbose #15096 > >
00:10:25 verbose #15097 > > inl billiard_forces k =
00:10:25 verbose #15098 > > [[ InternalForce (0i32, 1, billiard_force k (2 * ball_radius ())) ]]
00:10:25 verbose #15099 > >
00:10:25 verbose #15100 > > inl billiard_initial () =
00:10:25 verbose #15101 > > inl ball_mass = 0.160
00:10:25 verbose #15102 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:25 verbose #15103 > > [[
00:10:25 verbose #15104 > > particle_state {
00:10:25 verbose #15105 > > default_particle_state' with
00:10:25 verbose #15106 > > mass = ball_mass
00:10:25 verbose #15107 > > pos_vec = zero_vec ()
00:10:25 verbose #15108 > > velocity = 0.2 *^ i_hat ()
00:10:25 verbose #15109 > > }
00:10:25 verbose #15110 > > particle_state {
00:10:25 verbose #15111 > > default_particle_state' with
00:10:25 verbose #15112 > > mass = ball_mass
00:10:25 verbose #15113 > > pos_vec = i_hat () ^+^ 0.02 *^ j_hat ()
00:10:25 verbose #15114 > > velocity = zero_vec ()
00:10:25 verbose #15115 > > }
00:10:25 verbose #15116 > > ]]
00:10:25 verbose #15117 > > |> stream.from_list
00:10:25 verbose #15118 > > |> multi_particle_state
00:10:25 verbose #15119 > >
00:10:25 verbose #15120 > > inl billiard_states ~n_method k dt =
00:10:25 verbose #15121 > > states_mps (n_method dt) (billiard_forces k) (billiard_initial ())
00:10:25 verbose #15122 > >
00:10:25 verbose #15123 > > inl billiard_states_finite n_method k dt =
00:10:25 verbose #15124 > > billiard_states n_method k dt
00:10:25 verbose #15125 > > >> Some
00:10:25 verbose #15126 > > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) =>
00:10:25 verbose #15127 > > match mpst |> stream.try_item 0i32 with
00:10:25 verbose #15128 > > | Some st =>
00:10:25 verbose #15129 > > st.time <= 10
00:10:25 verbose #15130 > > | None => false
00:10:25 verbose #15131 > > )
00:10:25 verbose #15132 > >
00:10:25 verbose #15133 > > inl momentum (particle_state st) =
00:10:25 verbose #15134 > > inl m = st.mass
00:10:25 verbose #15135 > > inl v = st.velocity
00:10:25 verbose #15136 > > m *^ v
00:10:25 verbose #15137 > >
00:10:25 verbose #15138 > > inl system_p (multi_particle_state sts) =
00:10:25 verbose #15139 > > sts
00:10:25 verbose #15140 > > |> stream.map momentum
00:10:25 verbose #15141 > > |> stream.fold (^+^) (zero_vec ())
00:10:25 verbose #15142 > >
00:10:25 verbose #15143 > > inl time_ke_ec_x, time_ke_ec_y =
00:10:25 verbose #15144 > > billiard_states_finite euler_cromer_mps 30 0.03
00:10:25 verbose #15145 > > |> listm.map (fun (multi_particle_state mpst) =>
00:10:25 verbose #15146 > > mpst |> stream.try_item 0i32
00:10:25 verbose #15147 > > |> optionm.map (fun st =>
00:10:25 verbose #15148 > > st.time, system_ke (multi_particle_state mpst)
00:10:25 verbose #15149 > > )
00:10:25 verbose #15150 > > )
00:10:25 verbose #15151 > > // |> stream.to_list
00:10:25 verbose #15152 > > |> listm'.choose id
00:10:25 verbose #15153 > > |> listm'.unzip
00:10:25 verbose #15154 > >
00:10:25 verbose #15155 > > inl time_ke_rk4_x, time_ke_rk4_y =
00:10:25 verbose #15156 > > billiard_states_finite runge_kutta_4 30 0.03
00:10:25 verbose #15157 > > |> listm.map (fun (multi_particle_state mpst) =>
00:10:25 verbose #15158 > > mpst |> stream.try_item 0i32
00:10:25 verbose #15159 > > |> optionm.map (fun st =>
00:10:25 verbose #15160 > > st.time, system_ke (multi_particle_state mpst)
00:10:25 verbose #15161 > > )
00:10:25 verbose #15162 > > )
00:10:25 verbose #15163 > > // |> stream.to_list
00:10:25 verbose #15164 > > |> listm'.choose id
00:10:25 verbose #15165 > > |> listm'.unzip
00:10:25 verbose #15166 > >
00:10:25 verbose #15167 > > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray
00:10:25 verbose #15168 > > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray
00:10:25 verbose #15169 > >
00:10:25 verbose #15170 > > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray
00:10:25 verbose #15171 > > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray
00:10:25 verbose #15172 > >
00:10:25 verbose #15173 > > "system kinetic energy versus time",
00:10:25 verbose #15174 > > "time (s)",
00:10:25 verbose #15175 > > "system kinetic energy (j)",
00:10:25 verbose #15176 > > ;[[
00:10:25 verbose #15177 > > "euler-cromer", time_ke_ec_x, time_ke_ec_y
00:10:25 verbose #15178 > > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y
00:10:25 verbose #15179 > > ]]
00:10:27 verbose #15180 > >
00:10:27 verbose #15181 > > ╭─[ 2.26s - return value ]─────────────────────────────────────────────────────╮
00:10:27 verbose #15182 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:10:27 verbose #15183 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:27 verbose #15184 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:27 verbose #15185 > > │ stroke="none"/> │
00:10:27 verbose #15186 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:27 verbose #15187 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:27 verbose #15188 > > │ fill="#FFFFFF"> │
00:10:27 verbose #15189 > > │ system kinetic energy versus time │
00:10:27 verbose #15190 > > │ </text> │
00:10:27 verbose #15191 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:10:27 verbose #15192 > > │ y2="75"/> │
00:10:27 verbose #15193 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:27 verbose #15194 > > │ y2="75"/> │
00:10:27 verbose #15195 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:10:27 verbose #15196 > > │ y2="75"/> │
00:10:27 verbose #15197 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:10:27 verbose #15198 > > │ y2="75"/> │
00:10:27 verbose #15199 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:10:27 verbose #15200 > > │ y2="75"/> │
00:10:27 verbose #15201 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:10:27 verbose #15202 > > │ x2="109" y2="75"/> │
00:10:27 verbose #15203 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:10:27 verbose #15204 > > │ x2="119" y2="75"/> │
00:10:27 verbose #15205 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:10:27 verbose #15206 > > │ x2="129" y2="75"/> │
00:10:27 verbose #15207 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:27 verbose #15208 > > │ x2="139" y2="75"/> │
00:10:27 verbose #15209 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:10:27 verbose #15210 > > │ x2="149" y2="75"/> │
00:10:27 verbose #15211 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:10:27 verbose #15212 > > │ x2="159" y2="75"/> │
00:10:27 verbose #15213 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:10:27 verbose #15214 > > │ x2="169" y2="75"/> │
00:10:27 verbose #15215 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:10:27 verbose #15216 > > │ x2="179" y2="75"/> │
00:10:27 verbose #15217 > > │ <... │
00:10:27 verbose #15218 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:27 verbose #15219 > >
00:10:27 verbose #15220 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:27 verbose #15221 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:27 verbose #15222 > > │ ### wave 2 │
00:10:27 verbose #15223 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:27 verbose #15224 > >
00:10:27 verbose #15225 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:27 verbose #15226 > > //// test
00:10:27 verbose #15227 > >
00:10:27 verbose #15228 > > inl linear_spring k re (particle_state st1) (particle_state st2) =
00:10:27 verbose #15229 > > inl r1 = st1.pos_vec
00:10:27 verbose #15230 > > inl r2 = st2.pos_vec
00:10:27 verbose #15231 > > inl r21 = r2 ^-^ r1
00:10:27 verbose #15232 > > inl r21mag = magnitude r21
00:10:27 verbose #15233 > > -k * (r21mag - re) *^ r21 ^/ r21mag
00:10:27 verbose #15234 > >
00:10:27 verbose #15235 > > inl fixed_linear_spring k re r1 =
00:10:27 verbose #15236 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:27 verbose #15237 > > linear_spring k re (particle_state { default_particle_state' with pos_vec =
00:10:27 verbose #15238 > > r1 })
00:10:27 verbose #15239 > >
00:10:27 verbose #15240 > > inl forces_string () =
00:10:27 verbose #15241 > > [[
00:10:27 verbose #15242 > > ExternalForce (0i32, fixed_linear_spring 5384 0 (zero_vec ()))
00:10:27 verbose #15243 > > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ()))
00:10:27 verbose #15244 > > ]] ++ (
00:10:27 verbose #15245 > > listm'.init_series 0 59 1
00:10:27 verbose #15246 > > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0))
00:10:27 verbose #15247 > > )
00:10:27 verbose #15248 > >
00:10:27 verbose #15249 > > inl string_update dt =
00:10:27 verbose #15250 > > update_mps (join runge_kutta_4 dt) (join forces_string ())
00:10:27 verbose #15251 > >
00:10:27 verbose #15252 > > inl string_initial_overtone n =
00:10:27 verbose #15253 > > inl ball_mass = 0.0008293 * 0.65 / 64
00:10:27 verbose #15254 > > inl (particle_state default_particle_state') = default_particle_state ()
00:10:27 verbose #15255 > > listm'.init_series 0.01 0.64 0.01
00:10:27 verbose #15256 > > |> listm.map (fun x =>
00:10:27 verbose #15257 > > inl y = 0.005 * sin (conv n * pi * x / 0.65)
00:10:27 verbose #15258 > > particle_state {
00:10:27 verbose #15259 > > default_particle_state' with
00:10:27 verbose #15260 > > mass = ball_mass
00:10:27 verbose #15261 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:10:27 verbose #15262 > > velocity = zero_vec ()
00:10:27 verbose #15263 > > }
00:10:27 verbose #15264 > > )
00:10:27 verbose #15265 > > |> stream.from_list
00:10:27 verbose #15266 > > |> multi_particle_state
00:10:27 verbose #15267 > >
00:10:27 verbose #15268 > > let main () =
00:10:27 verbose #15269 > > inl ~frames = listm'.init_series 0 65 1f64 |> stream.from_list
00:10:27 verbose #15270 > > inl ~initial_state = string_initial_overtone 3i32
00:10:27 verbose #15271 > > inl frames =
00:10:27 verbose #15272 > > frames
00:10:27 verbose #15273 > > |> stream.map (fun n =>
00:10:27 verbose #15274 > > inl (multi_particle_state sts) =
00:10:27 verbose #15275 > > stream.iterate (string_update 0.000025) initial_state |>
00:10:27 verbose #15276 > > stream.item n
00:10:27 verbose #15277 > > inl x, y =
00:10:27 verbose #15278 > > [[ zero_vec () ]]
00:10:27 verbose #15279 > > ++ (sts |> stream.map (fun (particle_state st) => st.pos_vec) |>
00:10:27 verbose #15280 > > stream.to_list)
00:10:27 verbose #15281 > > ++ [[ 0.65 *^ i_hat () ]]
00:10:27 verbose #15282 > > |> listm.map (fun r => r.x, r.y)
00:10:27 verbose #15283 > > |> stream.from_list
00:10:27 verbose #15284 > > |> stream.unzip
00:10:27 verbose #15285 > > inl x : a i32 _ = x |> stream.to_list |> listm.toArray
00:10:27 verbose #15286 > > inl y : a i32 _ = y |> stream.to_list |> listm.toArray
00:10:27 verbose #15287 > > x, y
00:10:27 verbose #15288 > > )
00:10:27 verbose #15289 > >
00:10:27 verbose #15290 > > inl plots =
00:10:27 verbose #15291 > > frames
00:10:27 verbose #15292 > > |> stream.indexed
00:10:27 verbose #15293 > > |> stream.map (fun ((n : i32), (x, y)) =>
00:10:27 verbose #15294 > > "wave",
00:10:27 verbose #15295 > > "position (m)",
00:10:27 verbose #15296 > > "displacement (m)",
00:10:27 verbose #15297 > > ;[[
00:10:27 verbose #15298 > > ($'$"{!n}"' : string), x, y
00:10:27 verbose #15299 > > ]]
00:10:27 verbose #15300 > > )
00:10:27 verbose #15301 > >
00:10:27 verbose #15302 > > plots |> stream.to_list |> listm.toArray : a i32 _
00:10:35 verbose #15303 > >
00:10:35 verbose #15304 > > ╭─[ 8.56s - return value ]─────────────────────────────────────────────────────╮
00:10:35 verbose #15305 > > │ <table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr │
00:10:35 verbose #15306 > > │ ><td>0</td><td><svg width="640" height="480" viewBox="0 0 640 480" │
00:10:35 verbose #15307 > > │ xmlns="http://www.w3.org/2000/svg"> │
00:10:35 verbose #15308 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:10:35 verbose #15309 > > │ stroke="none"/> │
00:10:35 verbose #15310 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:10:35 verbose #15311 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:10:35 verbose #15312 > > │ fill="#FFFFFF"> │
00:10:35 verbose #15313 > > │ wave │
00:10:35 verbose #15314 > > │ </text> │
00:10:35 verbose #15315 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:10:35 verbose #15316 > > │ y2="75"/> │
00:10:35 verbose #15317 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:10:35 verbose #15318 > > │ y2="75"/> │
00:10:35 verbose #15319 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:10:35 verbose #15320 > > │ y2="75"/> │
00:10:35 verbose #15321 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │
00:10:35 verbose #15322 > > │ y2="75"/> │
00:10:35 verbose #15323 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:10:35 verbose #15324 > > │ y2="75"/> │
00:10:35 verbose #15325 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │
00:10:35 verbose #15326 > > │ x2="100" y2="75"/> │
00:10:35 verbose #15327 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │
00:10:35 verbose #15328 > > │ x2="108" y2="75"/> │
00:10:35 verbose #15329 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │
00:10:35 verbose #15330 > > │ x2="116" y2="75"/> │
00:10:35 verbose #15331 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │
00:10:35 verbose #15332 > > │ x2="123" y2="75"/> │
00:10:35 verbose #15333 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │
00:10:35 verbose #15334 > > │ x2="131" y2="75"/> │
00:10:35 verbose #15335 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:10:35 verbose #15336 > > │ x2="139" y2="75"/> │
00:10:35 verbose #15337 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │
00:10:35 verbose #15338 > > │ x2="146" y2="75"/> │
00:10:35 verbose #15339 > > │ <line opacity="1" stroke="#3... │
00:10:35 verbose #15340 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:35 verbose #15341 > >
00:10:35 verbose #15342 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:35 verbose #15343 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:35 verbose #15344 > > │ ## end │
00:10:35 verbose #15345 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:36 verbose #15346 > 00:00:46 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 138743
00:10:36 verbose #15347 > 00:00:46 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:10:39 verbose #15348 > 00:00:49 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/physics.dib.ipynb to html
00:10:39 verbose #15349 > 00:00:49 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:10:39 verbose #15350 > 00:00:49 verbose #7 ! validate(nb)
00:10:44 verbose #15351 > 00:00:55 verbose #8 ! [NbConvertApp] Writing 2510600 bytes to c:\home\git\polyglot\lib\spiral\physics.dib.html
00:10:45 verbose #15352 > 00:00:55 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 646
00:10:45 verbose #15353 > 00:00:55 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 646
00:10:45 verbose #15354 > 00:00:55 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:10:46 verbose #15355 > 00:00:57 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:10:46 verbose #15356 > 00:00:57 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:10:47 verbose #15357 > 00:00:57 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 139448
00:10:47 debug #15358 execute_with_options_async / exit_code: 0 / output.Length: 148120
00:10:47 debug #23 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path physics.dib --retries 3
00:10:47 debug #15359 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path benchmark.dib --retries 3",
[||], None, None, true, None)
00:10:47 verbose #15360 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "benchmark.dib", "--retries", "3"])
00:10:47 verbose #15361 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/benchmark.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/benchmark.dib" --output-path "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:10:49 verbose #15362 > >
00:10:49 verbose #15363 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:49 verbose #15364 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:49 verbose #15365 > > │ ## benchmark (Polyglot) │
00:10:49 verbose #15366 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:50 verbose #15367 > >
00:10:50 verbose #15368 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:50 verbose #15369 > > //// test
00:10:50 verbose #15370 > >
00:10:50 verbose #15371 > > open testing
00:10:50 verbose #15372 > >
00:10:50 verbose #15373 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:10:50 verbose #15374 > > #r
00:10:50 verbose #15375 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:10:50 verbose #15376 > > otNet.Interactive.Spiral.dll"
00:10:50 verbose #15377 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:10:50 verbose #15378 > > #r
00:10:50 verbose #15379 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:10:50 verbose #15380 > > otNet.Interactive.dll"
00:10:50 verbose #15381 > > open type Microsoft.DotNet.Interactive.Kernel
00:10:55 verbose #15382 > >
00:10:55 verbose #15383 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:55 verbose #15384 > > inl gc_collect () =
00:10:55 verbose #15385 > > run_target function
00:10:55 verbose #15386 > > | Fsharp _ => fun () => $'System.GC.Collect' ()
00:10:55 verbose #15387 > > | _ => fun () => ()
00:10:55 verbose #15388 > >
00:10:55 verbose #15389 > > inl printfn x =
00:10:55 verbose #15390 > > console.write_line x
00:10:55 verbose #15391 > >
00:10:55 verbose #15392 > > nominal stopwatch = $'System.Diagnostics.Stopwatch'
00:10:55 verbose #15393 > >
00:10:55 verbose #15394 > > inl stopwatch () : stopwatch =
00:10:55 verbose #15395 > > $'`stopwatch ' ()
00:10:55 verbose #15396 > >
00:10:55 verbose #15397 > > inl stopwatch_elapsed_milliseconds (stopwatch : stopwatch) : i64 =
00:10:55 verbose #15398 > > $'!stopwatch.ElapsedMilliseconds'
00:10:55 verbose #15399 > >
00:10:55 verbose #15400 > > inl stopwatch_start (stopwatch : stopwatch) : () =
00:10:55 verbose #15401 > > $'!stopwatch.Start' ()
00:10:55 verbose #15402 > >
00:10:55 verbose #15403 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:55 verbose #15404 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:55 verbose #15405 > > │ ## test_case_result │
00:10:55 verbose #15406 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:55 verbose #15407 > >
00:10:55 verbose #15408 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:55 verbose #15409 > > type test_case_result =
00:10:55 verbose #15410 > > {
00:10:55 verbose #15411 > > Input : string
00:10:55 verbose #15412 > > Expected : string
00:10:55 verbose #15413 > > Result : string
00:10:55 verbose #15414 > > TimeList : a u64 i64
00:10:55 verbose #15415 > > }
00:10:55 verbose #15416 > >
00:10:55 verbose #15417 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:55 verbose #15418 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:55 verbose #15419 > > │ ## run │
00:10:55 verbose #15420 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:55 verbose #15421 > >
00:10:55 verbose #15422 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:55 verbose #15423 > > inl run forall input expected.
00:10:55 verbose #15424 > > count
00:10:55 verbose #15425 > > (solutions : list (string * (input -> expected)))
00:10:55 verbose #15426 > > ((input, expected) : (input * expected))
00:10:55 verbose #15427 > > : test_case_result
00:10:55 verbose #15428 > > =
00:10:55 verbose #15429 > > inl input_str = input |> sm'.format_debug
00:10:55 verbose #15430 > >
00:10:55 verbose #15431 > > printfn ""
00:10:55 verbose #15432 > > printfn ($'$"Solution: {!input_str} "' : string)
00:10:55 verbose #15433 > >
00:10:55 verbose #15434 > > inl performance_invoke (fn : () -> expected) =
00:10:55 verbose #15435 > > gc_collect ()
00:10:55 verbose #15436 > > inl stopwatch = stopwatch ()
00:10:55 verbose #15437 > > stopwatch |> stopwatch_start
00:10:55 verbose #15438 > > inl time1 = stopwatch |> stopwatch_elapsed_milliseconds
00:10:55 verbose #15439 > > inl result : expected =
00:10:55 verbose #15440 > > am'.init_series 0 count 1i32
00:10:55 verbose #15441 > > |> am'.parallel_map fun _n => fn ()
00:10:55 verbose #15442 > > |> am'.last
00:10:55 verbose #15443 > > inl time2 = (stopwatch |> stopwatch_elapsed_milliseconds) - time1
00:10:55 verbose #15444 > > result, time2
00:10:55 verbose #15445 > >
00:10:55 verbose #15446 > > inl results_with_time : a u64 _ =
00:10:55 verbose #15447 > > solutions
00:10:55 verbose #15448 > > |> listm'.indexed
00:10:55 verbose #15449 > > |> listm.toArray
00:10:55 verbose #15450 > > |> am.map fun ((i : i32), (test_name, solution)) =>
00:10:55 verbose #15451 > > inl result, time = performance_invoke fun () => solution input
00:10:55 verbose #15452 > > printfn ($'$"Test case {!i + 1}. {!test_name}. Time: {!time} "' :
00:10:55 verbose #15453 > > string)
00:10:55 verbose #15454 > > result, time
00:10:55 verbose #15455 > >
00:10:55 verbose #15456 > > match results_with_time |> am.map fst with
00:10:55 verbose #15457 > > | array when length array <= 1 => ()
00:10:55 verbose #15458 > > | array when array |> am.forall' ((=) (index array 0)) => ()
00:10:55 verbose #15459 > > | results => failwith ($'$"Challenge error: {!results}"' : string)
00:10:55 verbose #15460 > >
00:10:55 verbose #15461 > > {
00:10:55 verbose #15462 > > Input = input_str
00:10:55 verbose #15463 > > Expected = expected |> sm'.format_debug
00:10:55 verbose #15464 > > Result = results_with_time |> am.map fst |> fun array => index array 0
00:10:55 verbose #15465 > > |> sm'.format_debug
00:10:55 verbose #15466 > > TimeList = results_with_time |> am.map snd
00:10:55 verbose #15467 > > }
00:10:55 verbose #15468 > >
00:10:55 verbose #15469 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:55 verbose #15470 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:55 verbose #15471 > > │ ## run_all │
00:10:55 verbose #15472 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:55 verbose #15473 > >
00:10:55 verbose #15474 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:55 verbose #15475 > > inl run_all forall input expected.
00:10:55 verbose #15476 > > test_name
00:10:55 verbose #15477 > > count
00:10:55 verbose #15478 > > (solutions : list (string * (input -> expected)))
00:10:55 verbose #15479 > > test_cases
00:10:55 verbose #15480 > > =
00:10:55 verbose #15481 > > printfn ""
00:10:55 verbose #15482 > > printfn ""
00:10:55 verbose #15483 > > printfn ($'$"Test: {!test_name}"' : string)
00:10:55 verbose #15484 > > test_cases
00:10:55 verbose #15485 > > |> listm.toArray
00:10:55 verbose #15486 > > |> am.map (run count solutions)
00:10:55 verbose #15487 > >
00:10:55 verbose #15488 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:55 verbose #15489 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:55 verbose #15490 > > │ ## sort_result_list │
00:10:55 verbose #15491 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:55 verbose #15492 > >
00:10:55 verbose #15493 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:55 verbose #15494 > > inl sort_result_list results =
00:10:55 verbose #15495 > > inl table =
00:10:55 verbose #15496 > > inl rows =
00:10:55 verbose #15497 > > results
00:10:55 verbose #15498 > > |> am.map fun (result : test_case_result) =>
00:10:55 verbose #15499 > > inl best =
00:10:55 verbose #15500 > > result.TimeList
00:10:55 verbose #15501 > > |> am'.indexed
00:10:55 verbose #15502 > > |> am.map fun (i, time) =>
00:10:55 verbose #15503 > > i + 1i64, time
00:10:55 verbose #15504 > > |> am'.sort_by snd
00:10:55 verbose #15505 > > |> fun array => index array 0i32
00:10:55 verbose #15506 > > |> sm'.format_debug
00:10:55 verbose #15507 > > inl row =
00:10:55 verbose #15508 > > [[
00:10:55 verbose #15509 > > result.Input
00:10:55 verbose #15510 > > result.Expected
00:10:55 verbose #15511 > > result.Result
00:10:55 verbose #15512 > > best
00:10:55 verbose #15513 > > ]]
00:10:55 verbose #15514 > > inl color : option console.console_color =
00:10:55 verbose #15515 > > open console
00:10:55 verbose #15516 > > match result.Expected = result.Result with
00:10:55 verbose #15517 > > | true => Some $'`console_color.DarkGreen'
00:10:55 verbose #15518 > > | false => Some $'`console_color.DarkRed'
00:10:55 verbose #15519 > > row, color
00:10:55 verbose #15520 > >
00:10:55 verbose #15521 > > inl header =
00:10:55 verbose #15522 > > [[
00:10:55 verbose #15523 > > [[
00:10:55 verbose #15524 > > "Input"
00:10:55 verbose #15525 > > "Expected"
00:10:55 verbose #15526 > > "Result"
00:10:55 verbose #15527 > > "Best"
00:10:55 verbose #15528 > > ]]
00:10:55 verbose #15529 > > [[
00:10:55 verbose #15530 > > "---"
00:10:55 verbose #15531 > > "---"
00:10:55 verbose #15532 > > "---"
00:10:55 verbose #15533 > > "---"
00:10:55 verbose #15534 > > ]]
00:10:55 verbose #15535 > > ]]
00:10:55 verbose #15536 > > |> listm.map fun row => row, None
00:10:55 verbose #15537 > > |> listm.toArray
00:10:55 verbose #15538 > > rows |> am.append header
00:10:55 verbose #15539 > >
00:10:55 verbose #15540 > > inl formattedTable =
00:10:55 verbose #15541 > > inl lengthMap : mapm.map i32 i64 =
00:10:55 verbose #15542 > > table
00:10:55 verbose #15543 > > |> am.map (fst >> listm.toArray)
00:10:55 verbose #15544 > > |> am'.transpose
00:10:55 verbose #15545 > > |> am.map fun column =>
00:10:55 verbose #15546 > > column
00:10:55 verbose #15547 > > |> am.map sm.length
00:10:55 verbose #15548 > > |> am'.sort_descending
00:10:55 verbose #15549 > > |> am'.try_item 0i32
00:10:55 verbose #15550 > > |> optionm'.default_value 0i64
00:10:55 verbose #15551 > > |> am'.indexed
00:10:55 verbose #15552 > > |> fun (x : a i32 _) => x
00:10:55 verbose #15553 > > |> mapm.of_array
00:10:55 verbose #15554 > > table
00:10:55 verbose #15555 > > |> am.map fun (row, color) =>
00:10:55 verbose #15556 > > inl newRow =
00:10:55 verbose #15557 > > row
00:10:55 verbose #15558 > > |> listm'.indexed
00:10:55 verbose #15559 > > |> listm.map fun (i, cell) =>
00:10:55 verbose #15560 > > cell |> sm'.pad_right (lengthMap |> mapm.item i |> conv) ' '
00:10:55 verbose #15561 > > |> listm.toArray
00:10:55 verbose #15562 > > newRow, color
00:10:55 verbose #15563 > >
00:10:55 verbose #15564 > > printfn ""
00:10:55 verbose #15565 > > formattedTable
00:10:55 verbose #15566 > > |> am.iter fun ((row : a i32 string), color) =>
00:10:55 verbose #15567 > > match color with
00:10:55 verbose #15568 > > | Some color => color |> console.set_foreground_color
00:10:55 verbose #15569 > > | None => console.reset_color ()
00:10:55 verbose #15570 > >
00:10:55 verbose #15571 > > printfn (row |> sm'.join' "\t| ")
00:10:55 verbose #15572 > >
00:10:55 verbose #15573 > > console.reset_color ()
00:10:55 verbose #15574 > >
00:10:55 verbose #15575 > > inl averages : a u64 _ =
00:10:55 verbose #15576 > > results
00:10:55 verbose #15577 > > |> am.map fun result =>
00:10:55 verbose #15578 > > result.TimeList
00:10:55 verbose #15579 > > |> am.map ($'float' : i64 -> f64)
00:10:55 verbose #15580 > > |> am'.transpose
00:10:55 verbose #15581 > > |> am.map am'.average
00:10:55 verbose #15582 > > |> am.map ($'int64' : f64 -> i64)
00:10:55 verbose #15583 > > |> am'.indexed
00:10:55 verbose #15584 > >
00:10:55 verbose #15585 > > printfn ""
00:10:55 verbose #15586 > > printfn "Average Ranking "
00:10:55 verbose #15587 > > averages
00:10:55 verbose #15588 > > |> am'.sort_by snd
00:10:55 verbose #15589 > > |> am.iter fun ((i : i32), avg) =>
00:10:55 verbose #15590 > > printfn ($'$"Test case %d{!i + 1}. Average Time: %A{!avg} "' : string)
00:10:55 verbose #15591 > >
00:10:55 verbose #15592 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:55 verbose #15593 > > //// test
00:10:55 verbose #15594 > >
00:10:55 verbose #15595 > > inl is_fast () =
00:10:55 verbose #15596 > > false
00:10:55 verbose #15597 > >
00:10:55 verbose #15598 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:55 verbose #15599 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:55 verbose #15600 > > │ ## empty2Tests │
00:10:55 verbose #15601 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:55 verbose #15602 > >
00:10:55 verbose #15603 > > ── markdown ────────────────────────────────────────────────────────────────────
00:10:55 verbose #15604 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:10:55 verbose #15605 > > │ Test: Empty2 │
00:10:55 verbose #15606 > > │ │
00:10:55 verbose #15607 > > │ Solution: (a, a) │
00:10:55 verbose #15608 > > │ Test case 1. A. Time: 59L │
00:10:55 verbose #15609 > > │ │
00:10:55 verbose #15610 > > │ Solution: (a, a) │
00:10:55 verbose #15611 > > │ Test case 1. A. Time: 53L │
00:10:55 verbose #15612 > > │ │
00:10:55 verbose #15613 > > │ Input | Expected | Result | Best │
00:10:55 verbose #15614 > > │ --- | --- | --- | --- │
00:10:55 verbose #15615 > > │ (a, a) | a | a | (1, 59) │
00:10:55 verbose #15616 > > │ (a, a) | a | a | (1, 53) │
00:10:55 verbose #15617 > > │ │
00:10:55 verbose #15618 > > │ Averages │
00:10:55 verbose #15619 > > │ Test case 1. Average Time: 56L │
00:10:55 verbose #15620 > > │ │
00:10:55 verbose #15621 > > │ Ranking │
00:10:55 verbose #15622 > > │ Test case 1. Average Time: 56L │
00:10:55 verbose #15623 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:10:55 verbose #15624 > >
00:10:55 verbose #15625 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:10:55 verbose #15626 > > //// test
00:10:55 verbose #15627 > >
00:10:55 verbose #15628 > > inl get_solutions () =
00:10:55 verbose #15629 > > [[
00:10:55 verbose #15630 > > "A",
00:10:55 verbose #15631 > > fun (a, _b) =>
00:10:55 verbose #15632 > > a
00:10:55 verbose #15633 > >
00:10:55 verbose #15634 > > "B",
00:10:55 verbose #15635 > > fun (_a, b) =>
00:10:55 verbose #15636 > > b
00:10:55 verbose #15637 > > ]]
00:10:55 verbose #15638 > >
00:10:55 verbose #15639 > > inl rec empty_2_tests () =
00:10:55 verbose #15640 > > inl test_cases = [[
00:10:55 verbose #15641 > > ("a", "a"), "a"
00:10:55 verbose #15642 > > ("b", "b"), "b"
00:10:55 verbose #15643 > > ]]
00:10:55 verbose #15644 > >
00:10:55 verbose #15645 > > inl solutions = get_solutions ()
00:10:55 verbose #15646 > >
00:10:55 verbose #15647 > > // inl is_fast () = true
00:10:55 verbose #15648 > >
00:10:55 verbose #15649 > > inl count =
00:10:55 verbose #15650 > > if is_fast ()
00:10:55 verbose #15651 > > then 1000i32
00:10:55 verbose #15652 > > else 2000000i32
00:10:55 verbose #15653 > >
00:10:55 verbose #15654 > > run_all (nameof empty_2_tests) count solutions test_cases
00:10:55 verbose #15655 > > |> sort_result_list
00:10:55 verbose #15656 > >
00:10:55 verbose #15657 > > empty_2_tests ()
00:11:07 verbose #15658 > >
00:11:07 verbose #15659 > > ╭─[ 11.81s - stdout ]──────────────────────────────────────────────────────────╮
00:11:07 verbose #15660 > > │ │
00:11:07 verbose #15661 > > │ │
00:11:07 verbose #15662 > > │ Test: v0 │
00:11:07 verbose #15663 > > │ │
00:11:07 verbose #15664 > > │ Solution: struct ("a", "a") │
00:11:07 verbose #15665 > > │ Test case 1. A. Time: 145 │
00:11:07 verbose #15666 > > │ Test case 2. B. Time: 188 │
00:11:07 verbose #15667 > > │ │
00:11:07 verbose #15668 > > │ Solution: struct ("b", "b") │
00:11:07 verbose #15669 > > │ Test case 1. A. Time: 137 │
00:11:07 verbose #15670 > > │ Test case 2. B. Time: 135 │
00:11:07 verbose #15671 > > │ │
00:11:07 verbose #15672 > > │ Input | Expected | Result | Best │
00:11:07 verbose #15673 > > │ --- | --- | --- | --- │
00:11:07 verbose #15674 > > │ struct ("a", "a") | "a" | "a" | struct (1L, 145L) │
00:11:07 verbose #15675 > > │ struct ("b", "b") | "b" | "b" | struct (2L, 135L) │
00:11:07 verbose #15676 > > │ │
00:11:07 verbose #15677 > > │ Average Ranking │
00:11:07 verbose #15678 > > │ Test case 1. Average Time: 141L │
00:11:07 verbose #15679 > > │ Test case 2. Average Time: 161L │
00:11:07 verbose #15680 > > │ │
00:11:07 verbose #15681 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:07 verbose #15682 > >
00:11:07 verbose #15683 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:07 verbose #15684 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:07 verbose #15685 > > │ ## emptyTests │
00:11:07 verbose #15686 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:07 verbose #15687 > >
00:11:07 verbose #15688 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:07 verbose #15689 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:07 verbose #15690 > > │ Test: Empty │
00:11:07 verbose #15691 > > │ │
00:11:07 verbose #15692 > > │ Solution: 0 │
00:11:07 verbose #15693 > > │ Test case 1. A. Time: 61L │
00:11:07 verbose #15694 > > │ │
00:11:07 verbose #15695 > > │ Solution: 2 │
00:11:07 verbose #15696 > > │ Test case 1. A. Time: 62L │
00:11:07 verbose #15697 > > │ │
00:11:07 verbose #15698 > > │ Solution: 5 │
00:11:07 verbose #15699 > > │ Test case 1. A. Time: 70L │
00:11:07 verbose #15700 > > │ │
00:11:07 verbose #15701 > > │ Input | Expected | Result | Best │
00:11:07 verbose #15702 > > │ --- | --- | --- | --- │
00:11:07 verbose #15703 > > │ 0 | 0 | 0 | (1, 61) │
00:11:07 verbose #15704 > > │ 2 | 2 | 2 | (1, 62) │
00:11:07 verbose #15705 > > │ 5 | 5 | 5 | (1, 70) │
00:11:07 verbose #15706 > > │ │
00:11:07 verbose #15707 > > │ Averages │
00:11:07 verbose #15708 > > │ Test case 1. Average Time: 64L │
00:11:07 verbose #15709 > > │ │
00:11:07 verbose #15710 > > │ Ranking │
00:11:07 verbose #15711 > > │ Test case 1. Average Time: 64L │
00:11:07 verbose #15712 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:07 verbose #15713 > >
00:11:07 verbose #15714 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:07 verbose #15715 > > //// test
00:11:07 verbose #15716 > >
00:11:07 verbose #15717 > > inl get_solutions () =
00:11:07 verbose #15718 > > [[
00:11:07 verbose #15719 > > "A",
00:11:07 verbose #15720 > > fun n =>
00:11:07 verbose #15721 > > n + 1f64
00:11:07 verbose #15722 > > ]]
00:11:07 verbose #15723 > >
00:11:07 verbose #15724 > > inl rec empty_1_tests () =
00:11:07 verbose #15725 > > inl test_cases = [[
00:11:07 verbose #15726 > > 0, 1
00:11:07 verbose #15727 > > 2, 3
00:11:07 verbose #15728 > > 5, 6
00:11:07 verbose #15729 > > ]]
00:11:07 verbose #15730 > >
00:11:07 verbose #15731 > > inl solutions = get_solutions ()
00:11:07 verbose #15732 > >
00:11:07 verbose #15733 > > // inl is_fast () = true
00:11:07 verbose #15734 > >
00:11:07 verbose #15735 > > inl count =
00:11:07 verbose #15736 > > if is_fast ()
00:11:07 verbose #15737 > > then 1000i32
00:11:07 verbose #15738 > > else 2000000i32
00:11:07 verbose #15739 > >
00:11:07 verbose #15740 > > run_all (nameof empty_1_tests) count solutions test_cases
00:11:07 verbose #15741 > > |> sort_result_list
00:11:07 verbose #15742 > >
00:11:07 verbose #15743 > > empty_1_tests ()
00:11:13 verbose #15744 > >
00:11:13 verbose #15745 > > ╭─[ 6.50s - stdout ]───────────────────────────────────────────────────────────╮
00:11:13 verbose #15746 > > │ │
00:11:13 verbose #15747 > > │ │
00:11:13 verbose #15748 > > │ Test: v0 │
00:11:13 verbose #15749 > > │ │
00:11:13 verbose #15750 > > │ Solution: 0.0 │
00:11:13 verbose #15751 > > │ Test case 1. A. Time: 28 │
00:11:13 verbose #15752 > > │ │
00:11:13 verbose #15753 > > │ Solution: 2.0 │
00:11:13 verbose #15754 > > │ Test case 1. A. Time: 28 │
00:11:13 verbose #15755 > > │ │
00:11:13 verbose #15756 > > │ Solution: 5.0 │
00:11:13 verbose #15757 > > │ Test case 1. A. Time: 32 │
00:11:13 verbose #15758 > > │ │
00:11:13 verbose #15759 > > │ Input | Expected | Result | Best │
00:11:13 verbose #15760 > > │ --- | --- | --- | --- │
00:11:13 verbose #15761 > > │ 0.0 | 1.0 | 1.0 | struct (1L, 28L) │
00:11:13 verbose #15762 > > │ 2.0 | 3.0 | 3.0 | struct (1L, 28L) │
00:11:13 verbose #15763 > > │ 5.0 | 6.0 | 6.0 | struct (1L, 32L) │
00:11:13 verbose #15764 > > │ │
00:11:13 verbose #15765 > > │ Average Ranking │
00:11:13 verbose #15766 > > │ Test case 1. Average Time: 29L │
00:11:13 verbose #15767 > > │ │
00:11:13 verbose #15768 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:13 verbose #15769 > 00:00:26 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 17485
00:11:13 verbose #15770 > 00:00:26 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:11:16 verbose #15771 > 00:00:29 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb to html
00:11:16 verbose #15772 > 00:00:29 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:11:16 verbose #15773 > 00:00:29 verbose #7 ! validate(nb)
00:11:18 verbose #15774 > 00:00:31 verbose #8 ! [NbConvertApp] Writing 310156 bytes to c:\home\git\polyglot\lib\spiral\benchmark.dib.html
00:11:19 verbose #15775 > 00:00:32 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649
00:11:19 verbose #15776 > 00:00:32 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649
00:11:19 verbose #15777 > 00:00:32 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:11:20 verbose #15778 > 00:00:33 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:11:20 verbose #15779 > 00:00:33 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:11:21 verbose #15780 > 00:00:34 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18193
00:11:21 debug #15781 execute_with_options_async / exit_code: 0 / output.Length: 21263
00:11:21 debug #24 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path benchmark.dib --retries 3
00:11:21 debug #15782 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path file_system.dib --retries 3",
[||], None, None, true, None)
00:11:21 verbose #15783 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "file_system.dib", "--retries", "3"])
00:11:21 verbose #15784 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/file_system.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/file_system.dib" --output-path "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:11:24 verbose #15785 > >
00:11:24 verbose #15786 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:24 verbose #15787 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:24 verbose #15788 > > │ # file_system │
00:11:24 verbose #15789 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:24 verbose #15790 > >
00:11:24 verbose #15791 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:24 verbose #15792 > > open sm'_operators
00:11:24 verbose #15793 > > open rust_operators
00:11:24 verbose #15794 > >
00:11:24 verbose #15795 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:11:24 verbose #15796 > > #r
00:11:24 verbose #15797 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:11:24 verbose #15798 > > otNet.Interactive.Spiral.dll"
00:11:24 verbose #15799 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:11:24 verbose #15800 > > #r
00:11:24 verbose #15801 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:11:24 verbose #15802 > > otNet.Interactive.dll"
00:11:24 verbose #15803 > > open type Microsoft.DotNet.Interactive.Kernel
00:11:29 verbose #15804 > >
00:11:29 verbose #15805 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15806 > > //// test
00:11:29 verbose #15807 > >
00:11:29 verbose #15808 > > open testing
00:11:29 verbose #15809 > >
00:11:29 verbose #15810 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15811 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15812 > > │ ## types │
00:11:29 verbose #15813 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15814 > >
00:11:29 verbose #15815 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15816 > > inl types () =
00:11:29 verbose #15817 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15818 > > Fable.Core.Emit(\"std::fs::File\")>]]\n#endif\ntype std_fs_File = class end"
00:11:29 verbose #15819 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15820 > > Fable.Core.Emit(\"std::fs::FileType\")>]]\n#endif\ntype std_fs_FileType = class
00:11:29 verbose #15821 > > end"
00:11:29 verbose #15822 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15823 > > Fable.Core.Emit(\"std::path::Display\")>]]\n#endif\ntype std_path_Display =
00:11:29 verbose #15824 > > class end"
00:11:29 verbose #15825 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15826 > > Fable.Core.Emit(\"std::path::Path\")>]]\n#endif\ntype std_path_Path = class end"
00:11:29 verbose #15827 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15828 > > Fable.Core.Emit(\"std::path::PathBuf\")>]]\n#endif\ntype std_path_PathBuf =
00:11:29 verbose #15829 > > class end"
00:11:29 verbose #15830 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15831 > > Fable.Core.Emit(\"async_walkdir::DirEntry\")>]]\n#endif\ntype
00:11:29 verbose #15832 > > async_walkdir_DirEntry = class end"
00:11:29 verbose #15833 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15834 > > Fable.Core.Emit(\"async_walkdir::Filtering\")>]]\n#endif\ntype
00:11:29 verbose #15835 > > async_walkdir_Filtering = class end"
00:11:29 verbose #15836 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:29 verbose #15837 > > Fable.Core.Emit(\"async_walkdir::WalkDir\")>]]\n#endif\ntype
00:11:29 verbose #15838 > > async_walkdir_WalkDir = class end"
00:11:29 verbose #15839 > >
00:11:29 verbose #15840 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15841 > > inl types () =
00:11:29 verbose #15842 > > types ()
00:11:29 verbose #15843 > > date_time.types ()
00:11:29 verbose #15844 > > env.types ()
00:11:29 verbose #15845 > > rust.types ()
00:11:29 verbose #15846 > > sm'.types ()
00:11:29 verbose #15847 > > stream.types ()
00:11:29 verbose #15848 > >
00:11:29 verbose #15849 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15850 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15851 > > │ ## file_mode │
00:11:29 verbose #15852 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15853 > >
00:11:29 verbose #15854 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15855 > > nominal file_mode' = $'System.IO.FileMode'
00:11:29 verbose #15856 > >
00:11:29 verbose #15857 > > union file_mode =
00:11:29 verbose #15858 > > | ModeCreateNew
00:11:29 verbose #15859 > > | ModeCreate
00:11:29 verbose #15860 > > | ModeOpen
00:11:29 verbose #15861 > > | ModeOpenOrCreate
00:11:29 verbose #15862 > > | Truncate
00:11:29 verbose #15863 > > | Append
00:11:29 verbose #15864 > >
00:11:29 verbose #15865 > > inl file_mode = function
00:11:29 verbose #15866 > > | ModeCreateNew => $'System.IO.FileMode.CreateNew' : file_mode'
00:11:29 verbose #15867 > > | ModeCreate => $'System.IO.FileMode.Create' : file_mode'
00:11:29 verbose #15868 > > | ModeOpen => $'System.IO.FileMode.Open' : file_mode'
00:11:29 verbose #15869 > > | ModeOpenOrCreate => $'System.IO.FileMode.OpenOrCreate' : file_mode'
00:11:29 verbose #15870 > > | Truncate => $'System.IO.FileMode.Truncate' : file_mode'
00:11:29 verbose #15871 > > | Append => $'System.IO.FileMode.Append' : file_mode'
00:11:29 verbose #15872 > >
00:11:29 verbose #15873 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15874 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15875 > > │ ## file_access │
00:11:29 verbose #15876 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15877 > >
00:11:29 verbose #15878 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15879 > > nominal file_access' = $'System.IO.FileAccess'
00:11:29 verbose #15880 > >
00:11:29 verbose #15881 > > union file_access =
00:11:29 verbose #15882 > > | AccessRead
00:11:29 verbose #15883 > > | AccessWrite
00:11:29 verbose #15884 > > | AccessReadWrite
00:11:29 verbose #15885 > >
00:11:29 verbose #15886 > > inl file_access = function
00:11:29 verbose #15887 > > | AccessRead => $'System.IO.FileAccess.Read' : file_access'
00:11:29 verbose #15888 > > | AccessWrite => $'System.IO.FileAccess.ReadWrite' : file_access'
00:11:29 verbose #15889 > > | AccessReadWrite => $'System.IO.FileAccess.ReadWrite' : file_access'
00:11:29 verbose #15890 > >
00:11:29 verbose #15891 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15892 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15893 > > │ ## file_share │
00:11:29 verbose #15894 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15895 > >
00:11:29 verbose #15896 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15897 > > nominal file_share' = $'System.IO.FileShare'
00:11:29 verbose #15898 > >
00:11:29 verbose #15899 > > union file_share =
00:11:29 verbose #15900 > > | ShareNone
00:11:29 verbose #15901 > > | ShareRead
00:11:29 verbose #15902 > > | ShareWrite
00:11:29 verbose #15903 > > | ShareReadWrite
00:11:29 verbose #15904 > > | ShareDelete
00:11:29 verbose #15905 > >
00:11:29 verbose #15906 > > inl file_share = function
00:11:29 verbose #15907 > > | ShareNone => $'System.IO.FileShare.None' : file_share'
00:11:29 verbose #15908 > > | ShareRead => $'System.IO.FileShare.Read' : file_share'
00:11:29 verbose #15909 > > | ShareWrite => $'System.IO.FileShare.Write' : file_share'
00:11:29 verbose #15910 > > | ShareReadWrite => $'System.IO.FileShare.ReadWrite' : file_share'
00:11:29 verbose #15911 > > | ShareDelete => $'System.IO.FileShare.Delete' : file_share'
00:11:29 verbose #15912 > >
00:11:29 verbose #15913 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15914 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15915 > > │ ## file_stream │
00:11:29 verbose #15916 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15917 > >
00:11:29 verbose #15918 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15919 > > nominal file_stream' = $'System.IO.FileStream'
00:11:29 verbose #15920 > >
00:11:29 verbose #15921 > > inl file_stream (path : string) mode access share : file_stream' =
00:11:29 verbose #15922 > > run_target function
00:11:29 verbose #15923 > > | Fsharp (Native) => fun () =>
00:11:29 verbose #15924 > > inl mode = mode |> file_mode
00:11:29 verbose #15925 > > inl access = access |> file_access
00:11:29 verbose #15926 > > inl share = share |> file_share
00:11:29 verbose #15927 > > $'new System.IO.FileStream (!path, !mode, !access, !share)'
00:11:29 verbose #15928 > > | _ => fun () => null ()
00:11:29 verbose #15929 > >
00:11:29 verbose #15930 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15931 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15932 > > │ ## display │
00:11:29 verbose #15933 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15934 > >
00:11:29 verbose #15935 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15936 > > nominal display = $'std_path_Display'
00:11:29 verbose #15937 > >
00:11:29 verbose #15938 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15939 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15940 > > │ ## path │
00:11:29 verbose #15941 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15942 > >
00:11:29 verbose #15943 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15944 > > nominal path = $'std_path_Path'
00:11:29 verbose #15945 > > nominal path = $'std_path_Path'
00:11:29 verbose #15946 > > nominal path_buf = $'std_path_PathBuf'
00:11:29 verbose #15947 > >
00:11:29 verbose #15948 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15949 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15950 > > │ ## new_path_buf │
00:11:29 verbose #15951 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15952 > >
00:11:29 verbose #15953 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15954 > > inl new_path_buf (path : sm'.std_string) : path_buf =
00:11:29 verbose #15955 > > open rust_operators
00:11:29 verbose #15956 > > !\\(path, $'"std::path::PathBuf::from($0)"')
00:11:29 verbose #15957 > >
00:11:29 verbose #15958 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15959 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15960 > > │ ## path_buf_from │
00:11:29 verbose #15961 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15962 > >
00:11:29 verbose #15963 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15964 > > inl path_buf_from (path : rust.box path) : path_buf =
00:11:29 verbose #15965 > > open rust_operators
00:11:29 verbose #15966 > > !\\(path, $'"std::path::PathBuf::from($0)"')
00:11:29 verbose #15967 > >
00:11:29 verbose #15968 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15969 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15970 > > │ ## path_buf_join │
00:11:29 verbose #15971 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15972 > >
00:11:29 verbose #15973 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15974 > > inl path_buf_join (s : string) (path_buf : path_buf) : path_buf =
00:11:29 verbose #15975 > > open rust_operators
00:11:29 verbose #15976 > > !\\((path_buf, s |> sm'.to_std_string), $'"$0.join($1)"')
00:11:29 verbose #15977 > >
00:11:29 verbose #15978 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15979 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15980 > > │ ## path_buf_strip_prefix │
00:11:29 verbose #15981 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15982 > >
00:11:29 verbose #15983 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15984 > > inl path_buf_strip_prefix (s : string) (path_buf : path_buf) : path_buf =
00:11:29 verbose #15985 > > open rust_operators
00:11:29 verbose #15986 > > !\\((path_buf, s |> sm'.to_std_string),
00:11:29 verbose #15987 > > $'"$0.strip_prefix($1).unwrap().to_path_buf()"')
00:11:29 verbose #15988 > >
00:11:29 verbose #15989 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #15990 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #15991 > > │ ## path_display │
00:11:29 verbose #15992 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #15993 > >
00:11:29 verbose #15994 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #15995 > > inl path_display (path : rust.ref' path) : display =
00:11:29 verbose #15996 > > open rust_operators
00:11:29 verbose #15997 > > !\\(path, $'"$0.display()"')
00:11:29 verbose #15998 > >
00:11:29 verbose #15999 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #16000 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #16001 > > │ ## path_buf_display │
00:11:29 verbose #16002 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #16003 > >
00:11:29 verbose #16004 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #16005 > > inl path_buf_display (path_buf : path_buf) : display =
00:11:29 verbose #16006 > > open rust_operators
00:11:29 verbose #16007 > > !\\(path_buf, $'"$0.display()"')
00:11:29 verbose #16008 > >
00:11:29 verbose #16009 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #16010 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #16011 > > │ ## path_buf_file_name │
00:11:29 verbose #16012 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #16013 > >
00:11:29 verbose #16014 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #16015 > > inl path_buf_file_name (path : path_buf) : optionm'.option' (rust.ref'
00:11:29 verbose #16016 > > sm'.os_str) =
00:11:29 verbose #16017 > > open rust_operators
00:11:29 verbose #16018 > > !\($'"!path.file_name()"')
00:11:29 verbose #16019 > >
00:11:29 verbose #16020 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #16021 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #16022 > > │ ## path_buf_exists │
00:11:29 verbose #16023 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #16024 > >
00:11:29 verbose #16025 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #16026 > > inl path_buf_exists (path_buf : path_buf) : bool =
00:11:29 verbose #16027 > > open rust_operators
00:11:29 verbose #16028 > > !\\(path_buf, $'"$0.exists()"')
00:11:29 verbose #16029 > >
00:11:29 verbose #16030 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #16031 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #16032 > > │ ## path_buf_is_dir │
00:11:29 verbose #16033 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #16034 > >
00:11:29 verbose #16035 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #16036 > > inl path_buf_is_dir (path_buf : path_buf) : bool =
00:11:29 verbose #16037 > > open rust_operators
00:11:29 verbose #16038 > > !\\(path_buf, $'"$0.is_dir()"')
00:11:29 verbose #16039 > >
00:11:29 verbose #16040 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #16041 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #16042 > > │ ## path_buf_is_file │
00:11:29 verbose #16043 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #16044 > >
00:11:29 verbose #16045 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #16046 > > inl path_buf_is_file (path_buf : path_buf) : bool =
00:11:29 verbose #16047 > > open rust_operators
00:11:29 verbose #16048 > > !\\(path_buf, $'"$0.is_file()"')
00:11:29 verbose #16049 > >
00:11:29 verbose #16050 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:29 verbose #16051 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:29 verbose #16052 > > │ ## path_buf_parent │
00:11:29 verbose #16053 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:29 verbose #16054 > >
00:11:29 verbose #16055 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:29 verbose #16056 > > inl path_buf_parent (path_buf : path_buf) : optionm'.option' path_buf =
00:11:29 verbose #16057 > > open rust_operators
00:11:29 verbose #16058 > > !\\(path_buf, $'"$0.parent().map(std::path::PathBuf::from)"')
00:11:30 verbose #16059 > >
00:11:30 verbose #16060 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16061 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16062 > > │ ## ts_path_join │
00:11:30 verbose #16063 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16064 > >
00:11:30 verbose #16065 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16066 > > inl ts_path_join (b : string) (a : string) : string =
00:11:30 verbose #16067 > > open ts_operators
00:11:30 verbose #16068 > > global "type IPathJoin = abstract join: [[<System.ParamArray>]] paths:
00:11:30 verbose #16069 > > string[[]] -> string"
00:11:30 verbose #16070 > > inl path : $'IPathJoin' = ts.import_all "path"
00:11:30 verbose #16071 > >
00:11:30 verbose #16072 > > inl a = join a
00:11:30 verbose #16073 > > inl b = join b
00:11:30 verbose #16074 > > !\($'"!path.join(!a, !b)"')
00:11:30 verbose #16075 > >
00:11:30 verbose #16076 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16077 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16078 > > │ ## (< />) │
00:11:30 verbose #16079 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16080 > >
00:11:30 verbose #16081 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16082 > > let (</>) (a : string) (b : string) : string =
00:11:30 verbose #16083 > > run_target function
00:11:30 verbose #16084 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16085 > > $'System.IO.Path.Combine (!a, !b)'
00:11:30 verbose #16086 > > | Rust (Native) => fun () =>
00:11:30 verbose #16087 > > a
00:11:30 verbose #16088 > > |> sm'.to_std_string
00:11:30 verbose #16089 > > |> new_path_buf
00:11:30 verbose #16090 > > |> path_buf_join b
00:11:30 verbose #16091 > > |> path_buf_display
00:11:30 verbose #16092 > > |> sm'.format'
00:11:30 verbose #16093 > > |> sm'.from_std_string
00:11:30 verbose #16094 > > | TypeScript _ => fun () =>
00:11:30 verbose #16095 > > a |> ts_path_join b
00:11:30 verbose #16096 > > | _ => fun () => null ()
00:11:30 verbose #16097 > >
00:11:30 verbose #16098 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16099 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16100 > > │ ## directory_info │
00:11:30 verbose #16101 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16102 > >
00:11:30 verbose #16103 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16104 > > nominal directory_info = $'System.IO.DirectoryInfo'
00:11:30 verbose #16105 > >
00:11:30 verbose #16106 > > inl directory_info (path : string) : directory_info =
00:11:30 verbose #16107 > > path |> $'`directory_info '
00:11:30 verbose #16108 > >
00:11:30 verbose #16109 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16110 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16111 > > │ ## directory_info_exists │
00:11:30 verbose #16112 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16113 > >
00:11:30 verbose #16114 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16115 > > inl directory_info_exists (info : directory_info) : bool =
00:11:30 verbose #16116 > > run_target function
00:11:30 verbose #16117 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16118 > > $'!info.Exists'
00:11:30 verbose #16119 > > | _ => fun () => null ()
00:11:30 verbose #16120 > >
00:11:30 verbose #16121 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16122 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16123 > > │ ## directory_info_creation_time │
00:11:30 verbose #16124 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16125 > >
00:11:30 verbose #16126 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16127 > > inl directory_info_creation_time (info : directory_info) : date_time.date_time =
00:11:30 verbose #16128 > > run_target function
00:11:30 verbose #16129 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16130 > > $'!info.CreationTime'
00:11:30 verbose #16131 > > | _ => fun () => null ()
00:11:30 verbose #16132 > >
00:11:30 verbose #16133 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16134 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16135 > > │ ## directory_info_name │
00:11:30 verbose #16136 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16137 > >
00:11:30 verbose #16138 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16139 > > inl directory_info_name (info : directory_info) : string =
00:11:30 verbose #16140 > > run_target function
00:11:30 verbose #16141 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16142 > > $'!info.Name'
00:11:30 verbose #16143 > > | _ => fun () => null ()
00:11:30 verbose #16144 > >
00:11:30 verbose #16145 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16146 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16147 > > │ ## directory_info_full_name │
00:11:30 verbose #16148 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16149 > >
00:11:30 verbose #16150 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16151 > > inl directory_info_full_name (info : directory_info) : string =
00:11:30 verbose #16152 > > run_target function
00:11:30 verbose #16153 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16154 > > $'!info.FullName'
00:11:30 verbose #16155 > > | _ => fun () => null ()
00:11:30 verbose #16156 > >
00:11:30 verbose #16157 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16158 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16159 > > │ ## dir_entry │
00:11:30 verbose #16160 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16161 > >
00:11:30 verbose #16162 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16163 > > nominal dir_entry = $'async_walkdir_DirEntry'
00:11:30 verbose #16164 > >
00:11:30 verbose #16165 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16166 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16167 > > │ ## walk_dir │
00:11:30 verbose #16168 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16169 > >
00:11:30 verbose #16170 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16171 > > nominal walk_dir = $'async_walkdir_WalkDir'
00:11:30 verbose #16172 > >
00:11:30 verbose #16173 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16174 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16175 > > │ ## async_walkdir_filtering │
00:11:30 verbose #16176 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16177 > >
00:11:30 verbose #16178 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16179 > > nominal async_walkdir_filtering = $'async_walkdir_Filtering'
00:11:30 verbose #16180 > >
00:11:30 verbose #16181 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16182 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16183 > > │ ## filtering │
00:11:30 verbose #16184 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16185 > >
00:11:30 verbose #16186 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16187 > > union filtering =
00:11:30 verbose #16188 > > | Ignore
00:11:30 verbose #16189 > > | IgnoreDir
00:11:30 verbose #16190 > > | Continue
00:11:30 verbose #16191 > >
00:11:30 verbose #16192 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16193 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16194 > > │ ## stream_filter_map │
00:11:30 verbose #16195 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16196 > >
00:11:30 verbose #16197 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16198 > > inl stream_filter_map forall t.
00:11:30 verbose #16199 > > (fn : resultm.result' dir_entry stream.io_error -> optionm'.option' t)
00:11:30 verbose #16200 > > (stream : walk_dir)
00:11:30 verbose #16201 > > : am'.vec t =
00:11:30 verbose #16202 > >
00:11:30 verbose #16203 > > inl fn = join fn
00:11:30 verbose #16204 > > inl result : am'.vec t =
00:11:30 verbose #16205 > >
00:11:30 verbose #16206 > > !\($'"futures_lite::stream::StreamExt::collect(futures_lite::stream::StreamExt::
00:11:30 verbose #16207 > > filter_map(!stream, |x| !fn(x))).await"')
00:11:30 verbose #16208 > > result
00:11:30 verbose #16209 > >
00:11:30 verbose #16210 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16211 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16212 > > │ ## new_walk_dir │
00:11:30 verbose #16213 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16214 > >
00:11:30 verbose #16215 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16216 > > inl new_walk_dir (dir : string) : walk_dir =
00:11:30 verbose #16217 > > !\\(dir, $'"async_walkdir::WalkDir::new(&*$0)"')
00:11:30 verbose #16218 > > // inl walk_dir : walk_dir = walk_dir |> rust.to_mut
00:11:30 verbose #16219 > > // (!\($'"true; let mut !walk_dir = !walk_dir"') : bool) |> ignore
00:11:30 verbose #16220 > >
00:11:30 verbose #16221 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16222 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16223 > > │ ## walk_dir_filter │
00:11:30 verbose #16224 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16225 > >
00:11:30 verbose #16226 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16227 > > inl walk_dir_filter (fn : dir_entry -> async.future_pin_send filtering)
00:11:30 verbose #16228 > > (walk_dir : walk_dir) : walk_dir =
00:11:30 verbose #16229 > > inl fn entry = async.future_init_send (2, 1) 0 fun () =>
00:11:30 verbose #16230 > > inl result = fn entry |> async.await_send
00:11:30 verbose #16231 > > inl filtering : async_walkdir_filtering =
00:11:30 verbose #16232 > > match result with
00:11:30 verbose #16233 > > | Ignore => !\($'"async_walkdir::Filtering::Ignore"')
00:11:30 verbose #16234 > > | IgnoreDir => !\($'"async_walkdir::Filtering::IgnoreDir"')
00:11:30 verbose #16235 > > | Continue => !\($'"async_walkdir::Filtering::Continue"')
00:11:30 verbose #16236 > > filtering
00:11:30 verbose #16237 > > !\\((walk_dir, fn), $'"async_walkdir::WalkDir::filter($0, |x| $1(x))"')
00:11:30 verbose #16238 > >
00:11:30 verbose #16239 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16240 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16241 > > │ ## file_type │
00:11:30 verbose #16242 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16243 > >
00:11:30 verbose #16244 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16245 > > nominal file_type = $'std_fs_FileType'
00:11:30 verbose #16246 > >
00:11:30 verbose #16247 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16248 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16249 > > │ ## dir_entry_file_type │
00:11:30 verbose #16250 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16251 > >
00:11:30 verbose #16252 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16253 > > inl dir_entry_file_type (dir_entry : dir_entry) : async.future_pin_send
00:11:30 verbose #16254 > > (resultm.result' file_type stream.io_error) =
00:11:30 verbose #16255 > > inl dir_entry = join dir_entry
00:11:30 verbose #16256 > > !\($'"Box::pin(async_walkdir::DirEntry::file_type(&!dir_entry))"')
00:11:30 verbose #16257 > >
00:11:30 verbose #16258 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16259 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16260 > > │ ## file_type_is_dir │
00:11:30 verbose #16261 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16262 > >
00:11:30 verbose #16263 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16264 > > inl file_type_is_dir (file_type : file_type) : bool =
00:11:30 verbose #16265 > > inl file_type = join file_type
00:11:30 verbose #16266 > > !\($'"std::fs::FileType::is_dir(&!file_type)"')
00:11:30 verbose #16267 > >
00:11:30 verbose #16268 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16269 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16270 > > │ ## file │
00:11:30 verbose #16271 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16272 > >
00:11:30 verbose #16273 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16274 > > nominal file = $'std_fs_File'
00:11:30 verbose #16275 > >
00:11:30 verbose #16276 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16277 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16278 > > │ ## file_open │
00:11:30 verbose #16279 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16280 > >
00:11:30 verbose #16281 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16282 > > inl file_open (path : string) : resultm.result' file stream.io_error =
00:11:30 verbose #16283 > > !\($'"std::fs::File::open(&*!path)"')
00:11:30 verbose #16284 > >
00:11:30 verbose #16285 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16286 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16287 > > │ ## dir_entry_path │
00:11:30 verbose #16288 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16289 > >
00:11:30 verbose #16290 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16291 > > inl dir_entry_path (dir_entry : dir_entry) : path_buf =
00:11:30 verbose #16292 > > !\\(dir_entry, $'"async_walkdir::DirEntry::path(&$0)"')
00:11:30 verbose #16293 > >
00:11:30 verbose #16294 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16295 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16296 > > │ ## get_temp_path │
00:11:30 verbose #16297 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16298 > >
00:11:30 verbose #16299 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16300 > > inl get_temp_path () : string =
00:11:30 verbose #16301 > > run_target function
00:11:30 verbose #16302 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16303 > > $'System.IO.Path.GetTempPath' ()
00:11:30 verbose #16304 > > | Rust (Native) => fun () =>
00:11:30 verbose #16305 > > open rust_operators
00:11:30 verbose #16306 > > !\($'"std::env::temp_dir()"')
00:11:30 verbose #16307 > > |> path_buf_display
00:11:30 verbose #16308 > > |> sm'.format'
00:11:30 verbose #16309 > > |> sm'.from_std_string
00:11:30 verbose #16310 > > | _ => fun () => null ()
00:11:30 verbose #16311 > >
00:11:30 verbose #16312 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16313 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16314 > > │ ## get_file_name │
00:11:30 verbose #16315 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16316 > >
00:11:30 verbose #16317 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16318 > > inl get_file_name (path : string) : string =
00:11:30 verbose #16319 > > run_target function
00:11:30 verbose #16320 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16321 > > path |> $'System.IO.Path.GetFileName'
00:11:30 verbose #16322 > > | Rust (Native) => fun () =>
00:11:30 verbose #16323 > > open rust_operators
00:11:30 verbose #16324 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf
00:11:30 verbose #16325 > > !\\(path_buf, $'"$0.file_name()"')
00:11:30 verbose #16326 > > |> optionm'.unwrap
00:11:30 verbose #16327 > > |> sm'.from_os_str_ref
00:11:30 verbose #16328 > > | _ => fun () => null ()
00:11:30 verbose #16329 > >
00:11:30 verbose #16330 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:30 verbose #16331 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:30 verbose #16332 > > │ ## get_current_directory │
00:11:30 verbose #16333 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:30 verbose #16334 > >
00:11:30 verbose #16335 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16336 > > inl get_current_directory () : string =
00:11:30 verbose #16337 > > run_target function
00:11:30 verbose #16338 > > | Fsharp (Native) => fun () =>
00:11:30 verbose #16339 > > $'System.IO.Directory.GetCurrentDirectory' ()
00:11:30 verbose #16340 > > | Rust (Native) => fun () =>
00:11:30 verbose #16341 > > open rust_operators
00:11:30 verbose #16342 > > inl current_dir = !\($'"std::env::current_dir()"') : resultm.result'
00:11:30 verbose #16343 > > path_buf stream.io_error
00:11:30 verbose #16344 > > current_dir
00:11:30 verbose #16345 > > |> resultm.unwrap'
00:11:30 verbose #16346 > > |> path_buf_display
00:11:30 verbose #16347 > > |> sm'.format'
00:11:30 verbose #16348 > > |> sm'.from_std_string
00:11:30 verbose #16349 > > | _ => fun () => null ()
00:11:30 verbose #16350 > >
00:11:30 verbose #16351 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:30 verbose #16352 > > //// test
00:11:30 verbose #16353 > >
00:11:30 verbose #16354 > > get_current_directory ()
00:11:31 verbose #16355 > >
00:11:31 verbose #16356 > > ╭─[ 674.21ms - return value ]──────────────────────────────────────────────────╮
00:11:31 verbose #16357 > > │ C:\home\git\polyglot\lib\spiral │
00:11:31 verbose #16358 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:31 verbose #16359 > >
00:11:31 verbose #16360 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:31 verbose #16361 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:31 verbose #16362 > > │ ## directory_separator_char │
00:11:31 verbose #16363 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:31 verbose #16364 > >
00:11:31 verbose #16365 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:31 verbose #16366 > > inl directory_separator_char () : char =
00:11:31 verbose #16367 > > run_target function
00:11:31 verbose #16368 > > | Fsharp (Native) => fun () =>
00:11:31 verbose #16369 > > $'System.IO.Path.DirectorySeparatorChar'
00:11:31 verbose #16370 > > | Rust (Native) => fun () =>
00:11:31 verbose #16371 > > open rust_operators
00:11:31 verbose #16372 > > !\($'"std::path::MAIN_SEPARATOR"')
00:11:31 verbose #16373 > > | _ => fun () => null ()
00:11:31 verbose #16374 > >
00:11:31 verbose #16375 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:31 verbose #16376 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:31 verbose #16377 > > │ ## normalize_path │
00:11:31 verbose #16378 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:31 verbose #16379 > >
00:11:31 verbose #16380 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:31 verbose #16381 > > inl normalize_path (path : string) : string =
00:11:31 verbose #16382 > > inl path = path |> sm'.replace_regex @"^\\\\\?\\" ""
00:11:31 verbose #16383 > > $'$"{!path.[[0]] |> string |> _.ToLower()}{!path.[[1..]]}"' |> sm'.replace
00:11:31 verbose #16384 > > "\\" "/"
00:11:31 verbose #16385 > >
00:11:31 verbose #16386 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:31 verbose #16387 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:31 verbose #16388 > > │ ## get_full_path │
00:11:31 verbose #16389 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:31 verbose #16390 > >
00:11:31 verbose #16391 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:31 verbose #16392 > > inl get_full_path (path : string) : string =
00:11:31 verbose #16393 > > run_target function
00:11:31 verbose #16394 > > | Fsharp (Native) => fun () =>
00:11:31 verbose #16395 > > inl path = join path
00:11:31 verbose #16396 > > path |> $'System.IO.Path.GetFullPath'
00:11:31 verbose #16397 > > | Rust (Native) => fun () =>
00:11:31 verbose #16398 > > inl path = join path
00:11:31 verbose #16399 > > open rust_operators
00:11:31 verbose #16400 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf
00:11:31 verbose #16401 > > if path_buf |> path_buf_exists |> not then
00:11:31 verbose #16402 > > inl current_dir = get_current_directory ()
00:11:31 verbose #16403 > > current_dir </> path
00:11:31 verbose #16404 > > |> normalize_path
00:11:31 verbose #16405 > > |> sm'.split "/"
00:11:31 verbose #16406 > > |> fun x =>
00:11:31 verbose #16407 > > ((a x : _ i32 _), (0i32, (a ;[[]] : _ i32 _)))
00:11:31 verbose #16408 > > ||> am.foldBack fun x level, acc =>
00:11:31 verbose #16409 > > match x, level with
00:11:31 verbose #16410 > > | "..", _ => level + 1, acc
00:11:31 verbose #16411 > > | ".", _ => level, acc
00:11:31 verbose #16412 > > | _, 0 when x |> sm'.ends_with ":" => 0, a ;[[
00:11:31 verbose #16413 > > $'$"{!current_dir.[[0]]}:"' ]] ++ acc
00:11:31 verbose #16414 > > | _, 0 => 0, a ;[[ x ]] ++ acc
00:11:31 verbose #16415 > > | _ => level - 1, acc
00:11:31 verbose #16416 > > |> snd
00:11:31 verbose #16417 > > |> seq.of_array'
00:11:31 verbose #16418 > > |> sm'.concat (directory_separator_char () |> sm'.obj_to_string)
00:11:31 verbose #16419 > > else
00:11:31 verbose #16420 > > inl path = !\\(path, $'"std::fs::canonicalize(&*$0)"') :
00:11:31 verbose #16421 > > resultm.result' path_buf stream.io_error
00:11:31 verbose #16422 > > path
00:11:31 verbose #16423 > > |> resultm.unwrap'
00:11:31 verbose #16424 > > |> path_buf_display
00:11:31 verbose #16425 > > |> sm'.format'
00:11:31 verbose #16426 > > |> sm'.from_std_string
00:11:31 verbose #16427 > > | _ => fun () => null ()
00:11:31 verbose #16428 > >
00:11:31 verbose #16429 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:31 verbose #16430 > > //// test
00:11:31 verbose #16431 > >
00:11:31 verbose #16432 > > "."
00:11:31 verbose #16433 > > |> get_full_path
00:11:31 verbose #16434 > > |> directory_info
00:11:31 verbose #16435 > > |> directory_info_name
00:11:31 verbose #16436 > > |> _assert_eq "spiral"
00:11:31 verbose #16437 > >
00:11:31 verbose #16438 > > ╭─[ 621.45ms - stdout ]────────────────────────────────────────────────────────╮
00:11:31 verbose #16439 > > │ assert_eq / actual: "spiral" / expected: "spiral" │
00:11:31 verbose #16440 > > │ │
00:11:31 verbose #16441 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:31 verbose #16442 > >
00:11:31 verbose #16443 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:31 verbose #16444 > > //// test
00:11:31 verbose #16445 > >
00:11:31 verbose #16446 > > "dir/.././._file"
00:11:31 verbose #16447 > > |> get_full_path
00:11:31 verbose #16448 > > |> _assert_eq (get_current_directory () </> "._file")
00:11:32 verbose #16449 > >
00:11:32 verbose #16450 > > ╭─[ 136.59ms - stdout ]────────────────────────────────────────────────────────╮
00:11:32 verbose #16451 > > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │
00:11:32 verbose #16452 > > │ "C:\home\git\polyglot\lib\spiral\._file" │
00:11:32 verbose #16453 > > │ │
00:11:32 verbose #16454 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:32 verbose #16455 > >
00:11:32 verbose #16456 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:32 verbose #16457 > > //// test
00:11:32 verbose #16458 > > ///! rust -d regex
00:11:32 verbose #16459 > >
00:11:32 verbose #16460 > > types ()
00:11:32 verbose #16461 > > "."
00:11:32 verbose #16462 > > |> get_full_path
00:11:32 verbose #16463 > > |> sm'.to_std_string
00:11:32 verbose #16464 > > |> new_path_buf
00:11:32 verbose #16465 > > |> path_buf_file_name
00:11:32 verbose #16466 > > |> optionm'.unwrap
00:11:32 verbose #16467 > > |> sm'.from_os_str_ref
00:11:32 verbose #16468 > > |> _assert_eq "spiral"
00:11:35 verbose #16469 > >
00:11:35 verbose #16470 > > ╭─[ 3.44s - return value ]─────────────────────────────────────────────────────╮
00:11:35 verbose #16471 > > │ assert_eq / actual: "spiral" / expected: "spiral" │
00:11:35 verbose #16472 > > │ │
00:11:35 verbose #16473 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:35 verbose #16474 > >
00:11:35 verbose #16475 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:35 verbose #16476 > > //// test
00:11:35 verbose #16477 > > ///! rust -d regex
00:11:35 verbose #16478 > >
00:11:35 verbose #16479 > > types ()
00:11:35 verbose #16480 > > "dir/.././._file"
00:11:35 verbose #16481 > > |> get_full_path
00:11:35 verbose #16482 > > |> _assert_eq (get_current_directory () </> "._file")
00:11:38 verbose #16483 > >
00:11:38 verbose #16484 > > ╭─[ 3.02s - return value ]─────────────────────────────────────────────────────╮
00:11:38 verbose #16485 > > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │
00:11:38 verbose #16486 > > │ "C:\home\git\polyglot\lib\spiral\._file" │
00:11:38 verbose #16487 > > │ │
00:11:38 verbose #16488 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:38 verbose #16489 > >
00:11:38 verbose #16490 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:38 verbose #16491 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:38 verbose #16492 > > │ ## create_temp_directory_name │
00:11:38 verbose #16493 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:38 verbose #16494 > >
00:11:38 verbose #16495 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:38 verbose #16496 > > inl create_temp_directory_name () =
00:11:38 verbose #16497 > > run_target function
00:11:38 verbose #16498 > > | Fsharp (Native)
00:11:38 verbose #16499 > > | Rust (Native) => fun () =>
00:11:38 verbose #16500 > > inl assembly_name = env.get_entry_assembly_name ()
00:11:38 verbose #16501 > > get_temp_path ()
00:11:38 verbose #16502 > > </> ($'$"\!{!assembly_name}"' : string)
00:11:38 verbose #16503 > > </> (date_time.now () |> date_time.new_guid_from_date_time |>
00:11:38 verbose #16504 > > sm'.obj_to_string)
00:11:38 verbose #16505 > > | _ => fun () => null ()
00:11:38 verbose #16506 > >
00:11:38 verbose #16507 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:38 verbose #16508 > > //// test
00:11:38 verbose #16509 > >
00:11:38 verbose #16510 > > types ()
00:11:38 verbose #16511 > > create_temp_directory_name ()
00:11:38 verbose #16512 > > |> _assert_contains (directory_separator_char ())
00:11:39 verbose #16513 > >
00:11:39 verbose #16514 > > ╭─[ 731.71ms - stdout ]────────────────────────────────────────────────────────╮
00:11:39 verbose #16515 > > │ assert_contains / actual: │
00:11:39 verbose #16516 > > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2203-2859-5940-5004 │
00:11:39 verbose #16517 > > │ 0052823a" / expected: '\\' │
00:11:39 verbose #16518 > > │ │
00:11:39 verbose #16519 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:39 verbose #16520 > >
00:11:39 verbose #16521 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:39 verbose #16522 > > //// test
00:11:39 verbose #16523 > > ///! rust -d chrono
00:11:39 verbose #16524 > >
00:11:39 verbose #16525 > > types ()
00:11:39 verbose #16526 > > create_temp_directory_name ()
00:11:39 verbose #16527 > > |> _assert_contains (directory_separator_char ())
00:11:42 verbose #16528 > >
00:11:42 verbose #16529 > > ╭─[ 2.93s - return value ]─────────────────────────────────────────────────────╮
00:11:42 verbose #16530 > > │ assert_contains / actual: │
00:11:42 verbose #16531 > > │ "C:\Users\i574n\AppData\Local\Temp\!spiral_builder_62cb8dfe3ec331f5ea807e9a4 │
00:11:42 verbose #16532 > > │ 980139fb16e986fbc99bfd31464e7744af7c899\20240520-2203-3139-0585-000000b6c796 │
00:11:42 verbose #16533 > > │ " / expected: '\\' │
00:11:42 verbose #16534 > > │ │
00:11:42 verbose #16535 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16536 > >
00:11:42 verbose #16537 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16538 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16539 > > │ ## get_source_directory │
00:11:42 verbose #16540 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16541 > >
00:11:42 verbose #16542 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16543 > > inl get_source_directory () =
00:11:42 verbose #16544 > > $'__SOURCE_DIRECTORY__' : string
00:11:42 verbose #16545 > >
00:11:42 verbose #16546 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16547 > > //// test
00:11:42 verbose #16548 > >
00:11:42 verbose #16549 > > get_source_directory ()
00:11:42 verbose #16550 > > |> directory_info
00:11:42 verbose #16551 > > |> directory_info_name
00:11:42 verbose #16552 > > |> _assert_eq "spiral"
00:11:42 verbose #16553 > >
00:11:42 verbose #16554 > > ╭─[ 56.25ms - stdout ]─────────────────────────────────────────────────────────╮
00:11:42 verbose #16555 > > │ assert_eq / actual: "spiral" / expected: "spiral" │
00:11:42 verbose #16556 > > │ │
00:11:42 verbose #16557 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16558 > >
00:11:42 verbose #16559 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16560 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16561 > > │ ## create_dir_all │
00:11:42 verbose #16562 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16563 > >
00:11:42 verbose #16564 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16565 > > inl create_dir_all (path : string) : resultm.result' () stream.io_error =
00:11:42 verbose #16566 > > !\\(path, $'"std::fs::create_dir_all(&*$0)"')
00:11:42 verbose #16567 > >
00:11:42 verbose #16568 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16569 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16570 > > │ ## create_directory │
00:11:42 verbose #16571 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16572 > >
00:11:42 verbose #16573 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16574 > > inl create_directory (path : string) : directory_info =
00:11:42 verbose #16575 > > run_target function
00:11:42 verbose #16576 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16577 > > path |> $'System.IO.Directory.CreateDirectory'
00:11:42 verbose #16578 > > | _ => fun () => null ()
00:11:42 verbose #16579 > >
00:11:42 verbose #16580 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16581 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16582 > > │ ## directory_get_files │
00:11:42 verbose #16583 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16584 > >
00:11:42 verbose #16585 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16586 > > inl directory_get_files (path : string) : array_base string =
00:11:42 verbose #16587 > > run_target function
00:11:42 verbose #16588 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16589 > > path |> $'System.IO.Directory.GetFiles'
00:11:42 verbose #16590 > > | _ => fun () => null ()
00:11:42 verbose #16591 > >
00:11:42 verbose #16592 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16593 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16594 > > │ ## directory_exists │
00:11:42 verbose #16595 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16596 > >
00:11:42 verbose #16597 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16598 > > inl directory_exists (path : string) : bool =
00:11:42 verbose #16599 > > run_target function
00:11:42 verbose #16600 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16601 > > path |> $'System.IO.Directory.Exists'
00:11:42 verbose #16602 > > | Rust (Native) => fun () =>
00:11:42 verbose #16603 > > inl path = path |> sm'.to_std_string |> new_path_buf
00:11:42 verbose #16604 > > path_buf_exists path && path_buf_is_dir path
00:11:42 verbose #16605 > > | TypeScript (Native) => fun () =>
00:11:42 verbose #16606 > > global "type IFsExistsSync = abstract existsSync: path: string ->
00:11:42 verbose #16607 > > bool"
00:11:42 verbose #16608 > > open ts_operators
00:11:42 verbose #16609 > > inl fs : $'IFsExistsSync' = ts.import_all "fs"
00:11:42 verbose #16610 > > !\\((fs, path), $'"$0.existsSync($1)"')
00:11:42 verbose #16611 > > | _ => fun () => null ()
00:11:42 verbose #16612 > >
00:11:42 verbose #16613 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16614 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16615 > > │ ## directory_get_parent │
00:11:42 verbose #16616 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16617 > >
00:11:42 verbose #16618 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16619 > > inl directory_get_parent (path : string) : optionm'.option' string =
00:11:42 verbose #16620 > > run_target function
00:11:42 verbose #16621 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16622 > > inl parent : directory_info = path |>
00:11:42 verbose #16623 > > $'System.IO.Directory.GetParent'
00:11:42 verbose #16624 > > if parent =. null ()
00:11:42 verbose #16625 > > then None
00:11:42 verbose #16626 > > else parent |> directory_info_full_name |> Some
00:11:42 verbose #16627 > > | Rust (Native) => fun () =>
00:11:42 verbose #16628 > > path
00:11:42 verbose #16629 > > |> sm'.to_std_string
00:11:42 verbose #16630 > > |> new_path_buf
00:11:42 verbose #16631 > > |> path_buf_parent
00:11:42 verbose #16632 > > |> optionm'.try'
00:11:42 verbose #16633 > > |> path_buf_display
00:11:42 verbose #16634 > > |> sm'.format'
00:11:42 verbose #16635 > > |> sm'.from_std_string
00:11:42 verbose #16636 > > |> Some
00:11:42 verbose #16637 > > | TypeScript _ => fun () =>
00:11:42 verbose #16638 > > global "type IPathDirname = abstract dirname: path: string ->
00:11:42 verbose #16639 > > string"
00:11:42 verbose #16640 > > inl fs : $'IPathDirname' = ts.import_all "path"
00:11:42 verbose #16641 > > ts.emit_expr path $'"!fs.dirname($0)"' |> Some
00:11:42 verbose #16642 > > | _ => fun () => null ()
00:11:42 verbose #16643 > > |> optionm'.box
00:11:42 verbose #16644 > >
00:11:42 verbose #16645 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16646 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16647 > > │ ## file_delete │
00:11:42 verbose #16648 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16649 > >
00:11:42 verbose #16650 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16651 > > inl file_delete (path : string) : () =
00:11:42 verbose #16652 > > run_target function
00:11:42 verbose #16653 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16654 > > path |> $'System.IO.File.Delete'
00:11:42 verbose #16655 > > | _ => fun () => null ()
00:11:42 verbose #16656 > >
00:11:42 verbose #16657 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16658 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16659 > > │ ## file_move │
00:11:42 verbose #16660 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16661 > >
00:11:42 verbose #16662 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16663 > > inl file_move (new_path : string) (old_path : string) : () =
00:11:42 verbose #16664 > > run_target function
00:11:42 verbose #16665 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16666 > > $'System.IO.File.Move (!old_path, !new_path)'
00:11:42 verbose #16667 > > | _ => fun () => null ()
00:11:42 verbose #16668 > >
00:11:42 verbose #16669 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16670 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16671 > > │ ## file_copy │
00:11:42 verbose #16672 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16673 > >
00:11:42 verbose #16674 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16675 > > inl file_copy (new_path : string) (old_path : string) : () =
00:11:42 verbose #16676 > > run_target function
00:11:42 verbose #16677 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16678 > > $'System.IO.File.Copy (!old_path, !new_path, true)'
00:11:42 verbose #16679 > > | Rust (Native) => fun () =>
00:11:42 verbose #16680 > > open rust_operators
00:11:42 verbose #16681 > > inl new_path = join new_path
00:11:42 verbose #16682 > > !\\(old_path, $'"std::fs::copy(&*$0, &*!new_path)"')
00:11:42 verbose #16683 > > |> fun x => x : _ u64 stream.io_error
00:11:42 verbose #16684 > > |> resultm.unwrap'
00:11:42 verbose #16685 > > |> ignore
00:11:42 verbose #16686 > > | _ => fun () => null ()
00:11:42 verbose #16687 > >
00:11:42 verbose #16688 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16689 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16690 > > │ ## file_exists │
00:11:42 verbose #16691 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16692 > >
00:11:42 verbose #16693 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16694 > > inl file_exists (path : string) : bool =
00:11:42 verbose #16695 > > run_target function
00:11:42 verbose #16696 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16697 > > path |> $'System.IO.File.Exists'
00:11:42 verbose #16698 > > | Rust (Native) => fun () =>
00:11:42 verbose #16699 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf
00:11:42 verbose #16700 > > path_buf_exists path_buf && path_buf_is_file path_buf
00:11:42 verbose #16701 > > | TypeScript (Native) => fun () =>
00:11:42 verbose #16702 > > open ts_operators
00:11:42 verbose #16703 > > global "type IFsExistsSync = abstract existsSync: path: string ->
00:11:42 verbose #16704 > > bool"
00:11:42 verbose #16705 > > inl fs : $'IFsExistsSync' = ts.import_all "fs"
00:11:42 verbose #16706 > > !\\((fs, path), $'"$0.existsSync($1)"')
00:11:42 verbose #16707 > > | _ => fun () => null ()
00:11:42 verbose #16708 > >
00:11:42 verbose #16709 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16710 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16711 > > │ ## directory_delete │
00:11:42 verbose #16712 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16713 > >
00:11:42 verbose #16714 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16715 > > inl directory_delete recursive (path : string) : () =
00:11:42 verbose #16716 > > run_target function
00:11:42 verbose #16717 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16718 > > $'System.IO.Directory.Delete (!path, !recursive)'
00:11:42 verbose #16719 > > | Rust (Native) => fun () =>
00:11:42 verbose #16720 > > inl path = join path
00:11:42 verbose #16721 > > if path |> directory_exists then
00:11:42 verbose #16722 > > open rust_operators
00:11:42 verbose #16723 > > if recursive
00:11:42 verbose #16724 > > then !\\(path, $'"std::fs::remove_dir_all(&*$0).unwrap()"')
00:11:42 verbose #16725 > > else !\\(path, $'"std::fs::remove_dir(&*$0).unwrap()"')
00:11:42 verbose #16726 > > | _ => fun () => null ()
00:11:42 verbose #16727 > >
00:11:42 verbose #16728 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16729 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16730 > > │ ## read_all_text_async │
00:11:42 verbose #16731 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16732 > >
00:11:42 verbose #16733 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16734 > > inl read_all_text_async (path : string) : _ string =
00:11:42 verbose #16735 > > run_target function
00:11:42 verbose #16736 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16737 > > path |> $'System.IO.File.ReadAllTextAsync' |> async.await_task
00:11:42 verbose #16738 > > | _ => fun () => null ()
00:11:42 verbose #16739 > >
00:11:42 verbose #16740 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16741 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16742 > > │ ## file_exists_content │
00:11:42 verbose #16743 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16744 > >
00:11:42 verbose #16745 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16746 > > inl file_exists_content path content : _ bool =
00:11:42 verbose #16747 > > run_target function
00:11:42 verbose #16748 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16749 > > fun () =>
00:11:42 verbose #16750 > > fix_condition
00:11:42 verbose #16751 > > fun () => path |> file_exists |> not
00:11:42 verbose #16752 > > fun () => false |> return
00:11:42 verbose #16753 > > fun () =>
00:11:42 verbose #16754 > > inl existing_content = path |> read_all_text_async |>
00:11:42 verbose #16755 > > async.let'
00:11:42 verbose #16756 > > content = existing_content |> return
00:11:42 verbose #16757 > > |> async.new_async_unit
00:11:42 verbose #16758 > > | _ => fun () => null ()
00:11:42 verbose #16759 > >
00:11:42 verbose #16760 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16761 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16762 > > │ ## write_all_text │
00:11:42 verbose #16763 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16764 > >
00:11:42 verbose #16765 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16766 > > inl write_all_text (path : string) (text : string) : () =
00:11:42 verbose #16767 > > run_target function
00:11:42 verbose #16768 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16769 > > inl text = join text
00:11:42 verbose #16770 > > $'System.IO.File.WriteAllText (!path, !text)'
00:11:42 verbose #16771 > > | Rust (Native) => fun () =>
00:11:42 verbose #16772 > > open rust_operators
00:11:42 verbose #16773 > > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"')
00:11:42 verbose #16774 > > | _ => fun () => null ()
00:11:42 verbose #16775 > >
00:11:42 verbose #16776 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16777 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16778 > > │ ## read_all_bytes │
00:11:42 verbose #16779 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16780 > >
00:11:42 verbose #16781 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16782 > > inl read_all_bytes (path : string) : am'.vec u8 =
00:11:42 verbose #16783 > > run_target function
00:11:42 verbose #16784 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16785 > > $'!path |> System.IO.File.ReadAllBytes'
00:11:42 verbose #16786 > > |> am'.to_vec
00:11:42 verbose #16787 > > | Rust (Native) => fun () =>
00:11:42 verbose #16788 > > open rust_operators
00:11:42 verbose #16789 > > !\\(path, $'"std::fs::read(&*$0).unwrap()"')
00:11:42 verbose #16790 > > | _ => fun () => null ()
00:11:42 verbose #16791 > >
00:11:42 verbose #16792 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16793 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16794 > > │ ## read_all_text │
00:11:42 verbose #16795 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16796 > >
00:11:42 verbose #16797 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16798 > > inl read_all_text (path : string) : string =
00:11:42 verbose #16799 > > run_target function
00:11:42 verbose #16800 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16801 > > $'!path |> System.IO.File.ReadAllText'
00:11:42 verbose #16802 > > | Rust (Native) => fun () =>
00:11:42 verbose #16803 > > path
00:11:42 verbose #16804 > > |> read_all_bytes
00:11:42 verbose #16805 > > |> sm'.string_from_utf8
00:11:42 verbose #16806 > > |> resultm.unwrap'
00:11:42 verbose #16807 > > |> sm'.from_std_string
00:11:42 verbose #16808 > > | _ => fun () => null ()
00:11:42 verbose #16809 > >
00:11:42 verbose #16810 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16811 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16812 > > │ ## write_all_text_async │
00:11:42 verbose #16813 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16814 > >
00:11:42 verbose #16815 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16816 > > inl write_all_text_async (path : string) (text : string) : _ () =
00:11:42 verbose #16817 > > run_target function
00:11:42 verbose #16818 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16819 > > $'System.IO.File.WriteAllTextAsync (!path, !text)' |>
00:11:42 verbose #16820 > > async.await_task
00:11:42 verbose #16821 > > | _ => fun () => null ()
00:11:42 verbose #16822 > >
00:11:42 verbose #16823 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16824 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16825 > > │ ## write_all_text_exists │
00:11:42 verbose #16826 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16827 > >
00:11:42 verbose #16828 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16829 > > inl write_all_text_exists path contents =
00:11:42 verbose #16830 > > fun () =>
00:11:42 verbose #16831 > > inl exists' = contents |> file_exists_content path |> async.let'
00:11:42 verbose #16832 > > if not exists'
00:11:42 verbose #16833 > > then contents |> write_all_text_async path |> async.do
00:11:42 verbose #16834 > > |> async.new_async
00:11:42 verbose #16835 > >
00:11:42 verbose #16836 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16837 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16838 > > │ ## delete_directory_async │
00:11:42 verbose #16839 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16840 > >
00:11:42 verbose #16841 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16842 > > inl delete_directory_async path : _ i64 =
00:11:42 verbose #16843 > > run_target function
00:11:42 verbose #16844 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16845 > > let rec loop (retry : i64) =
00:11:42 verbose #16846 > > fun () =>
00:11:42 verbose #16847 > > try_unit
00:11:42 verbose #16848 > > fun () =>
00:11:42 verbose #16849 > > path |> directory_delete true
00:11:42 verbose #16850 > > retry |> return
00:11:42 verbose #16851 > > fun ex =>
00:11:42 verbose #16852 > > if retry % 100i64 = 0 then
00:11:42 verbose #16853 > > inl ex = ex |> sm'.format_exception
00:11:42 verbose #16854 > > trace Debug
00:11:42 verbose #16855 > > fun () =>
00:11:42 verbose #16856 > > "file_system.delete_directory_async"
00:11:42 verbose #16857 > > fun () => $'$"path: {!path |>
00:11:42 verbose #16858 > > !get_file_name} / ex: {!ex} / {!_locals ()}"'
00:11:42 verbose #16859 > > async.sleep 10i32 |> async.do
00:11:42 verbose #16860 > > loop (retry + 1) |> async.return_await
00:11:42 verbose #16861 > > |> async.new_async
00:11:42 verbose #16862 > > loop 0
00:11:42 verbose #16863 > > | _ => fun () => null ()
00:11:42 verbose #16864 > >
00:11:42 verbose #16865 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16866 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16867 > > │ ## create_directory' │
00:11:42 verbose #16868 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16869 > >
00:11:42 verbose #16870 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16871 > > inl create_directory' dir =
00:11:42 verbose #16872 > > run_target function
00:11:42 verbose #16873 > > | Fsharp (Native) => fun () =>
00:11:42 verbose #16874 > > inl directory_info = dir |> create_directory
00:11:42 verbose #16875 > >
00:11:42 verbose #16876 > > inl exists' = directory_info |> directory_info_exists
00:11:42 verbose #16877 > > if not exists' then
00:11:42 verbose #16878 > > inl creation_time = directory_info |>
00:11:42 verbose #16879 > > directory_info_creation_time
00:11:42 verbose #16880 > > inl result = ($'{| Exists = !exists'; CreationTime =
00:11:42 verbose #16881 > > !creation_time |}' : any) |> sm'.format_debug
00:11:42 verbose #16882 > > trace Debug
00:11:42 verbose #16883 > > fun () => "file_system.create_directory"
00:11:42 verbose #16884 > > fun () => $'$"dir: {!dir} / result: {!result} {!_locals
00:11:42 verbose #16885 > > ()}"'
00:11:42 verbose #16886 > > inl disposable : _ () = new_disposable fun () =>
00:11:42 verbose #16887 > > dir
00:11:42 verbose #16888 > > |> delete_directory_async
00:11:42 verbose #16889 > > |> async.ignore
00:11:42 verbose #16890 > > |> async.run_synchronously
00:11:42 verbose #16891 > > disposable
00:11:42 verbose #16892 > > | Rust (Native) => fun () =>
00:11:42 verbose #16893 > > inl dir = join dir
00:11:42 verbose #16894 > > match dir |> create_dir_all |> resultm.map_error' sm'.format' |>
00:11:42 verbose #16895 > > resultm.unbox with
00:11:42 verbose #16896 > > | Ok () =>
00:11:42 verbose #16897 > > trace Verbose
00:11:42 verbose #16898 > > fun () => "file_system.create_directory"
00:11:42 verbose #16899 > > fun () => $'$"dir: {!dir} / {!_locals ()}"'
00:11:42 verbose #16900 > > | Error error =>
00:11:42 verbose #16901 > > trace Critical
00:11:42 verbose #16902 > > fun () => "file_system.create_directory"
00:11:42 verbose #16903 > > fun () => $'$"dir: {!dir} / error: {!error} / {!_locals
00:11:42 verbose #16904 > > ()}"'
00:11:42 verbose #16905 > > inl disposable : _ () = new_disposable fun () =>
00:11:42 verbose #16906 > > dir
00:11:42 verbose #16907 > > |> directory_delete true
00:11:42 verbose #16908 > > disposable
00:11:42 verbose #16909 > > | _ => fun () => null ()
00:11:42 verbose #16910 > >
00:11:42 verbose #16911 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:42 verbose #16912 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:42 verbose #16913 > > │ ## create_temp_directory │
00:11:42 verbose #16914 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:42 verbose #16915 > >
00:11:42 verbose #16916 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16917 > > inl create_temp_directory () =
00:11:42 verbose #16918 > > inl dir = create_temp_directory_name ()
00:11:42 verbose #16919 > > dir, dir |> create_directory'
00:11:42 verbose #16920 > >
00:11:42 verbose #16921 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:42 verbose #16922 > > //// test
00:11:42 verbose #16923 > >
00:11:42 verbose #16924 > > types ()
00:11:42 verbose #16925 > > inl path, disposable = create_temp_directory ()
00:11:42 verbose #16926 > > disposable |> use |> ignore
00:11:42 verbose #16927 > > path
00:11:42 verbose #16928 > > |> directory_exists
00:11:42 verbose #16929 > > |> _assert_eq true
00:11:43 verbose #16930 > >
00:11:43 verbose #16931 > > ╭─[ 846.92ms - stdout ]────────────────────────────────────────────────────────╮
00:11:43 verbose #16932 > > │ assert_eq / actual: true / expected: true │
00:11:43 verbose #16933 > > │ │
00:11:43 verbose #16934 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:43 verbose #16935 > >
00:11:43 verbose #16936 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:43 verbose #16937 > > //// test
00:11:43 verbose #16938 > > ///! rust -d chrono
00:11:43 verbose #16939 > >
00:11:43 verbose #16940 > > types ()
00:11:43 verbose #16941 > > inl path, disposable = create_temp_directory ()
00:11:43 verbose #16942 > > path
00:11:43 verbose #16943 > > |> directory_exists
00:11:43 verbose #16944 > > |> _assert_eq true
00:11:43 verbose #16945 > > disposable |> use |> ignore
00:11:43 verbose #16946 > > path
00:11:43 verbose #16947 > > |> directory_exists
00:11:43 verbose #16948 > > |> _assert_eq false
00:11:46 verbose #16949 > >
00:11:46 verbose #16950 > > ╭─[ 3.22s - return value ]─────────────────────────────────────────────────────╮
00:11:46 verbose #16951 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:11:46 verbose #16952 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_35161c374c15ab451b8a12dd07 │
00:11:46 verbose #16953 > > │ 899c051d12e543f45f13ba000fc8ac7c0a11c8\20240520-2203-3605-7589-000000e583c7 │
00:11:46 verbose #16954 > > │ assert_eq / actual: true / expected: true │
00:11:46 verbose #16955 > > │ assert_eq / actual: false / expected: false │
00:11:46 verbose #16956 > > │ │
00:11:46 verbose #16957 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #16958 > >
00:11:46 verbose #16959 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #16960 > > //// test
00:11:46 verbose #16961 > >
00:11:46 verbose #16962 > > inl lock_directory path =
00:11:46 verbose #16963 > > fun () =>
00:11:46 verbose #16964 > > trace Debug (fun () => "_1") _locals
00:11:46 verbose #16965 > > "0" |> write_all_text_async (path </> "test.txt") |> async.do
00:11:46 verbose #16966 > > file_stream
00:11:46 verbose #16967 > > (path </> "test.txt")
00:11:46 verbose #16968 > > ModeOpen
00:11:46 verbose #16969 > > AccessReadWrite
00:11:46 verbose #16970 > > ShareNone
00:11:46 verbose #16971 > > |> use
00:11:46 verbose #16972 > > |> ignore
00:11:46 verbose #16973 > > trace Debug (fun () => "_2") _locals
00:11:46 verbose #16974 > > async.sleep 2000 |> async.do
00:11:46 verbose #16975 > > trace Debug (fun () => "_3") _locals
00:11:46 verbose #16976 > > () |> return
00:11:46 verbose #16977 > > |> async.new_async
00:11:46 verbose #16978 > >
00:11:46 verbose #16979 > > types ()
00:11:46 verbose #16980 > > inl temp_dir, disposable = create_temp_directory ()
00:11:46 verbose #16981 > > disposable |> use |> ignore
00:11:46 verbose #16982 > > inl path = temp_dir </> "test"
00:11:46 verbose #16983 > >
00:11:46 verbose #16984 > > fun () =>
00:11:46 verbose #16985 > > trace Debug (fun () => "1") _locals
00:11:46 verbose #16986 > > path |> create_directory |> ignore
00:11:46 verbose #16987 > > trace Debug (fun () => "2") _locals
00:11:46 verbose #16988 > > inl child = path |> lock_directory |> async.start_child |> async.let'
00:11:46 verbose #16989 > > trace Debug (fun () => "3") _locals
00:11:46 verbose #16990 > > async.sleep 60 |> async.do
00:11:46 verbose #16991 > > trace Debug (fun () => "4") _locals
00:11:46 verbose #16992 > > inl retries = path |> delete_directory_async |> async.let'
00:11:46 verbose #16993 > > trace Debug (fun () => "5") _locals
00:11:46 verbose #16994 > > child |> async.do
00:11:46 verbose #16995 > > trace Debug (fun () => "6") _locals
00:11:46 verbose #16996 > > retries |> return
00:11:46 verbose #16997 > > |> async.new_async_unit
00:11:46 verbose #16998 > > |> async.run_with_timeout 3000
00:11:46 verbose #16999 > > |> fun x => x : _ i64
00:11:46 verbose #17000 > > |> function
00:11:46 verbose #17001 > > | Some (retries : i64) =>
00:11:46 verbose #17002 > > retries
00:11:46 verbose #17003 > > |> _assert_between
00:11:46 verbose #17004 > > (if runtime.is_windows () then 50 else 0)
00:11:46 verbose #17005 > > (if runtime.is_windows () then 150 else 0)
00:11:46 verbose #17006 > >
00:11:46 verbose #17007 > > true
00:11:46 verbose #17008 > > | _ => false
00:11:46 verbose #17009 > > |> _assert_eq true
00:11:49 verbose #17010 > >
00:11:49 verbose #17011 > > ╭─[ 2.92s - stdout ]───────────────────────────────────────────────────────────╮
00:11:49 verbose #17012 > > │ 00:00:00 debug #1 1 │
00:11:49 verbose #17013 > > │ 00:00:00 debug #2 2 │
00:11:49 verbose #17014 > > │ 00:00:00 debug #3 3 │
00:11:49 verbose #17015 > > │ 00:00:00 debug #4 _1 │
00:11:49 verbose #17016 > > │ 00:00:00 debug #5 _2 │
00:11:49 verbose #17017 > > │ 00:00:00 debug #6 4 │
00:11:49 verbose #17018 > > │ 00:00:00 debug #7 file_system.delete_directory_async / path: test / ex: │
00:11:49 verbose #17019 > > │ System.IO.IOException: The process cannot access the file 'test.txt' because │
00:11:49 verbose #17020 > > │ it is being used by another process. │
00:11:49 verbose #17021 > > │ 00:00:01 debug #8 file_system.delete_directory_async / path: test / ex: │
00:11:49 verbose #17022 > > │ System.IO.IOException: The process cannot access the file 'test.txt' because │
00:11:49 verbose #17023 > > │ it is being used by another process. │
00:11:49 verbose #17024 > > │ 00:00:02 debug #9 _3 │
00:11:49 verbose #17025 > > │ 00:00:02 debug #10 5 │
00:11:49 verbose #17026 > > │ 00:00:02 debug #11 6 │
00:11:49 verbose #17027 > > │ assert_between / actual: 125L / expected: struct (50L, 150L) │
00:11:49 verbose #17028 > > │ assert_eq / actual: true / expected: true │
00:11:49 verbose #17029 > > │ │
00:11:49 verbose #17030 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:49 verbose #17031 > >
00:11:49 verbose #17032 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:49 verbose #17033 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:49 verbose #17034 > > │ ## wait_for_file_access │
00:11:49 verbose #17035 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:49 verbose #17036 > >
00:11:49 verbose #17037 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:49 verbose #17038 > > inl wait_for_file_access access path =
00:11:49 verbose #17039 > > run_target function
00:11:49 verbose #17040 > > | Fsharp (Native) => fun () =>
00:11:49 verbose #17041 > > inl file_access, file_share =
00:11:49 verbose #17042 > > access
00:11:49 verbose #17043 > > |> optionm'.default_value (AccessReadWrite, ShareRead)
00:11:49 verbose #17044 > > let rec loop (retry : i64) : _ i64 =
00:11:49 verbose #17045 > > fun () =>
00:11:49 verbose #17046 > > try_unit
00:11:49 verbose #17047 > > fun () =>
00:11:49 verbose #17048 > > file_stream
00:11:49 verbose #17049 > > path
00:11:49 verbose #17050 > > ModeOpen
00:11:49 verbose #17051 > > file_access
00:11:49 verbose #17052 > > file_share
00:11:49 verbose #17053 > > |> use
00:11:49 verbose #17054 > > |> ignore
00:11:49 verbose #17055 > > retry |> return
00:11:49 verbose #17056 > > fun ex =>
00:11:49 verbose #17057 > > if retry > 0 && retry % 100i64 = 0 then
00:11:49 verbose #17058 > > inl ex = ex |> sm'.format_exception
00:11:49 verbose #17059 > > trace Debug
00:11:49 verbose #17060 > > fun () => "file_system.wait_for_file_access"
00:11:49 verbose #17061 > > fun () => $'$"path: {!path |>
00:11:49 verbose #17062 > > !get_file_name} / retry: {!retry} / ex: {!ex} / {!_locals ()}"'
00:11:49 verbose #17063 > > async.sleep 10i32 |> async.do
00:11:49 verbose #17064 > > loop (retry + 1) |> async.return_await
00:11:49 verbose #17065 > > |> async.new_async
00:11:49 verbose #17066 > > loop 0
00:11:49 verbose #17067 > > | _ => fun () => null ()
00:11:49 verbose #17068 > >
00:11:49 verbose #17069 > > inl wait_for_file_access_read path =
00:11:49 verbose #17070 > > path
00:11:49 verbose #17071 > > |> wait_for_file_access (Some (
00:11:49 verbose #17072 > > AccessRead,
00:11:49 verbose #17073 > > ShareRead
00:11:49 verbose #17074 > > ))
00:11:49 verbose #17075 > >
00:11:49 verbose #17076 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:49 verbose #17077 > > //// test
00:11:49 verbose #17078 > >
00:11:49 verbose #17079 > > inl lock_file path =
00:11:49 verbose #17080 > > fun () =>
00:11:49 verbose #17081 > > trace Debug (fun () => "_1") _locals
00:11:49 verbose #17082 > > inl stream : file_stream' =
00:11:49 verbose #17083 > > file_stream
00:11:49 verbose #17084 > > path
00:11:49 verbose #17085 > > ModeOpen
00:11:49 verbose #17086 > > AccessReadWrite
00:11:49 verbose #17087 > > ShareNone
00:11:49 verbose #17088 > > |> use
00:11:49 verbose #17089 > > trace Debug (fun () => "_2") _locals
00:11:49 verbose #17090 > > async.sleep 2000 |> async.do
00:11:49 verbose #17091 > > trace Debug (fun () => "_3") _locals
00:11:49 verbose #17092 > > ($'!stream.Seek (0L, System.IO.SeekOrigin.Begin)' : i64) |> ignore
00:11:49 verbose #17093 > > trace Debug (fun () => "_4") _locals
00:11:49 verbose #17094 > > $'!stream.WriteByte' 49u8
00:11:49 verbose #17095 > > trace Debug (fun () => "_5") _locals
00:11:49 verbose #17096 > > stream |> $'_.Flush()'
00:11:49 verbose #17097 > > trace Debug (fun () => "_6") _locals
00:11:49 verbose #17098 > > |> async.new_async
00:11:49 verbose #17099 > >
00:11:49 verbose #17100 > > types ()
00:11:49 verbose #17101 > > inl temp_dir, disposable = create_temp_directory ()
00:11:49 verbose #17102 > > disposable |> use |> ignore
00:11:49 verbose #17103 > > inl path = temp_dir </> "test.txt"
00:11:49 verbose #17104 > >
00:11:49 verbose #17105 > > fun () =>
00:11:49 verbose #17106 > > trace Debug (fun () => "1") _locals
00:11:49 verbose #17107 > > "0" |> write_all_text_async path |> async.do
00:11:49 verbose #17108 > > trace Debug (fun () => "2") _locals
00:11:49 verbose #17109 > > inl child = path |> lock_file |> async.start_child |> async.let'
00:11:49 verbose #17110 > > trace Debug (fun () => "3") _locals
00:11:49 verbose #17111 > > async.sleep 1 |> async.do
00:11:49 verbose #17112 > > trace Debug (fun () => "4") _locals
00:11:49 verbose #17113 > > inl retries = path |> wait_for_file_access None |> async.let'
00:11:49 verbose #17114 > > trace Debug (fun () => "5") _locals
00:11:49 verbose #17115 > > inl text = path |> read_all_text_async |> async.let'
00:11:49 verbose #17116 > > trace Debug (fun () => "6") _locals
00:11:49 verbose #17117 > > child |> async.do
00:11:49 verbose #17118 > > trace Debug (fun () => "7") _locals
00:11:49 verbose #17119 > > (retries, text) |> return
00:11:49 verbose #17120 > > |> async.new_async_unit
00:11:49 verbose #17121 > > |> async.run_with_timeout 3000
00:11:49 verbose #17122 > > |> function
00:11:49 verbose #17123 > > | Some ((retries : i64), text) =>
00:11:49 verbose #17124 > > retries
00:11:49 verbose #17125 > > |> _assert_between
00:11:49 verbose #17126 > > (if runtime.is_windows () then 50 else 100)
00:11:49 verbose #17127 > > (if runtime.is_windows () then 150 else 200)
00:11:49 verbose #17128 > >
00:11:49 verbose #17129 > > text |> _assert_eq (join "1")
00:11:49 verbose #17130 > >
00:11:49 verbose #17131 > > true
00:11:49 verbose #17132 > > | _ => false
00:11:49 verbose #17133 > > |> _assert_eq true
00:11:52 verbose #17134 > >
00:11:52 verbose #17135 > > ╭─[ 2.81s - stdout ]───────────────────────────────────────────────────────────╮
00:11:52 verbose #17136 > > │ 00:00:00 debug #1 1 │
00:11:52 verbose #17137 > > │ 00:00:00 debug #2 2 │
00:11:52 verbose #17138 > > │ 00:00:00 debug #3 3 │
00:11:52 verbose #17139 > > │ 00:00:00 debug #4 _1 │
00:11:52 verbose #17140 > > │ 00:00:00 debug #5 _2 │
00:11:52 verbose #17141 > > │ 00:00:00 debug #6 4 │
00:11:52 verbose #17142 > > │ 00:00:01 debug #7 file_system.wait_for_file_access / path: test.txt / │
00:11:52 verbose #17143 > > │ retry: 100 / ex: System.IO.IOException: The process cannot access the file │
00:11:52 verbose #17144 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2203-3991-9118-9004 │
00:11:52 verbose #17145 > > │ 001e9a8d\test.txt' because it is being used by another process. │
00:11:52 verbose #17146 > > │ 00:00:02 debug #8 _3 │
00:11:52 verbose #17147 > > │ 00:00:02 debug #9 _4 │
00:11:52 verbose #17148 > > │ 00:00:02 debug #10 _5 │
00:11:52 verbose #17149 > > │ 00:00:02 debug #11 _6 │
00:11:52 verbose #17150 > > │ 00:00:02 debug #12 5 │
00:11:52 verbose #17151 > > │ 00:00:02 debug #13 6 │
00:11:52 verbose #17152 > > │ 00:00:02 debug #14 7 │
00:11:52 verbose #17153 > > │ assert_between / actual: 128L / expected: struct (50L, 150L) │
00:11:52 verbose #17154 > > │ assert_eq / actual: "1" / expected: "1" │
00:11:52 verbose #17155 > > │ assert_eq / actual: true / expected: true │
00:11:52 verbose #17156 > > │ │
00:11:52 verbose #17157 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:52 verbose #17158 > >
00:11:52 verbose #17159 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:52 verbose #17160 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:52 verbose #17161 > > │ ## read_all_text_retry_async │
00:11:52 verbose #17162 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:52 verbose #17163 > >
00:11:52 verbose #17164 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:52 verbose #17165 > > inl read_all_text_retry_async full_path : async.async (optionm'.option' string)
00:11:52 verbose #17166 > > =
00:11:52 verbose #17167 > > run_target function
00:11:52 verbose #17168 > > | Fsharp (Native) => fun () =>
00:11:52 verbose #17169 > > let rec loop (retry : i64) =
00:11:52 verbose #17170 > > fun () =>
00:11:52 verbose #17171 > > try_unit
00:11:52 verbose #17172 > > fun () =>
00:11:52 verbose #17173 > > if retry > 0
00:11:52 verbose #17174 > > then
00:11:52 verbose #17175 > > full_path
00:11:52 verbose #17176 > > |> wait_for_file_access_read
00:11:52 verbose #17177 > > |> async.run_with_timeout_async 1000
00:11:52 verbose #17178 > > |> async.ignore
00:11:52 verbose #17179 > > |> async.do
00:11:52 verbose #17180 > > full_path |> read_all_text_async |> async.map (Some
00:11:52 verbose #17181 > > >> optionm'.box) |> async.return_await
00:11:52 verbose #17182 > > fun ex =>
00:11:52 verbose #17183 > > fix_condition
00:11:52 verbose #17184 > > fun () => retry <> 0
00:11:52 verbose #17185 > > fun () =>
00:11:52 verbose #17186 > > inl ex = ex |> sm'.format_exception
00:11:52 verbose #17187 > > let _locals () = $'$"retry: {!retry} / ex:
00:11:52 verbose #17188 > > {!ex} / {!_locals ()}"'
00:11:52 verbose #17189 > > trace Debug (fun () =>
00:11:52 verbose #17190 > > $'"read_all_text_retry_async"' : string) _locals
00:11:52 verbose #17191 > > (None : _ string) |> optionm'.box |> return
00:11:52 verbose #17192 > > fun () =>
00:11:52 verbose #17193 > > loop (retry + 1) |> async.return_await
00:11:52 verbose #17194 > > |> async.new_async
00:11:52 verbose #17195 > > loop 0
00:11:52 verbose #17196 > > | _ => fun () => null ()
00:11:52 verbose #17197 > >
00:11:52 verbose #17198 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:52 verbose #17199 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:52 verbose #17200 > > │ ## delete_file_async │
00:11:52 verbose #17201 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:52 verbose #17202 > >
00:11:52 verbose #17203 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:52 verbose #17204 > > inl delete_file_async path : _ i64 =
00:11:52 verbose #17205 > > run_target function
00:11:52 verbose #17206 > > | Fsharp (Native) => fun () =>
00:11:52 verbose #17207 > > let rec loop (retry : i64) =
00:11:52 verbose #17208 > > fun () =>
00:11:52 verbose #17209 > > try_unit
00:11:52 verbose #17210 > > fun () =>
00:11:52 verbose #17211 > > path |> file_delete
00:11:52 verbose #17212 > > return retry
00:11:52 verbose #17213 > > fun ex =>
00:11:52 verbose #17214 > > if retry % 100 = 0 then
00:11:52 verbose #17215 > > trace Warning
00:11:52 verbose #17216 > > fun () => "delete_file_async"
00:11:52 verbose #17217 > > fun () =>
00:11:52 verbose #17218 > > inl ex = ex |> sm'.format_exception
00:11:52 verbose #17219 > > $'$"path: {!path |> !get_file_name}
00:11:52 verbose #17220 > > ex: {!ex} / {!_locals ()}"'
00:11:52 verbose #17221 > > async.sleep 10 |> async.do
00:11:52 verbose #17222 > > loop (retry + 1) |> async.return_await
00:11:52 verbose #17223 > > |> async.new_async
00:11:52 verbose #17224 > > loop 0
00:11:52 verbose #17225 > > | _ => fun () => null ()
00:11:52 verbose #17226 > >
00:11:52 verbose #17227 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:52 verbose #17228 > > //// test
00:11:52 verbose #17229 > >
00:11:52 verbose #17230 > > inl lock_file path =
00:11:52 verbose #17231 > > fun () =>
00:11:52 verbose #17232 > > trace Debug (fun () => "_1") _locals
00:11:52 verbose #17233 > > file_stream
00:11:52 verbose #17234 > > path
00:11:52 verbose #17235 > > ModeOpen
00:11:52 verbose #17236 > > AccessReadWrite
00:11:52 verbose #17237 > > ShareNone
00:11:52 verbose #17238 > > |> use
00:11:52 verbose #17239 > > |> ignore
00:11:52 verbose #17240 > > trace Debug (fun () => "_2") _locals
00:11:52 verbose #17241 > > async.sleep 2000 |> async.do
00:11:52 verbose #17242 > > trace Debug (fun () => "_3") _locals
00:11:52 verbose #17243 > > |> async.new_async
00:11:52 verbose #17244 > >
00:11:52 verbose #17245 > > types ()
00:11:52 verbose #17246 > > inl temp_dir, disposable = create_temp_directory ()
00:11:52 verbose #17247 > > disposable |> use |> ignore
00:11:52 verbose #17248 > > inl path = temp_dir </> "test.txt"
00:11:52 verbose #17249 > >
00:11:52 verbose #17250 > > fun () =>
00:11:52 verbose #17251 > > trace Debug (fun () => "1") _locals
00:11:52 verbose #17252 > > "0" |> write_all_text_async path |> async.do
00:11:52 verbose #17253 > > trace Debug (fun () => "2") _locals
00:11:52 verbose #17254 > > inl child = lock_file path |> async.start_child |> async.let'
00:11:52 verbose #17255 > > trace Debug (fun () => "3") _locals
00:11:52 verbose #17256 > > async.sleep 1 |> async.do
00:11:52 verbose #17257 > > trace Debug (fun () => "4") _locals
00:11:52 verbose #17258 > > inl retries = delete_file_async path |> async.let'
00:11:52 verbose #17259 > > trace Debug (fun () => "5") _locals
00:11:52 verbose #17260 > > child |> async.do
00:11:52 verbose #17261 > > trace Debug (fun () => "6") _locals
00:11:52 verbose #17262 > > return retries
00:11:52 verbose #17263 > > |> async.new_async_unit
00:11:52 verbose #17264 > > |> async.run_with_timeout 3000
00:11:52 verbose #17265 > > |> function
00:11:52 verbose #17266 > > | Some (retries : i64) =>
00:11:52 verbose #17267 > > retries
00:11:52 verbose #17268 > > |> _assert_between
00:11:52 verbose #17269 > > (if runtime.is_windows () then 50 else 0)
00:11:52 verbose #17270 > > (if runtime.is_windows () then 150 else 0)
00:11:52 verbose #17271 > >
00:11:52 verbose #17272 > > true
00:11:52 verbose #17273 > > | _ => false
00:11:52 verbose #17274 > > |> _assert_eq true
00:11:55 verbose #17275 > >
00:11:55 verbose #17276 > > ╭─[ 2.77s - stdout ]───────────────────────────────────────────────────────────╮
00:11:55 verbose #17277 > > │ 00:00:00 debug #1 1 │
00:11:55 verbose #17278 > > │ 00:00:00 debug #2 2 │
00:11:55 verbose #17279 > > │ 00:00:00 debug #3 3 │
00:11:55 verbose #17280 > > │ 00:00:00 debug #4 _1 │
00:11:55 verbose #17281 > > │ 00:00:00 debug #5 _2 │
00:11:55 verbose #17282 > > │ 00:00:00 debug #6 4 │
00:11:55 verbose #17283 > > │ 00:00:00 warning #7 delete_file_async / path: test.txt / ex: │
00:11:55 verbose #17284 > > │ System.IO.IOException: The process cannot access the file │
00:11:55 verbose #17285 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2203-4275-7556-7004 │
00:11:55 verbose #17286 > > │ 00ec1bfe\test.txt' because it is being used by another process. │
00:11:55 verbose #17287 > > │ 00:00:01 warning #8 delete_file_async / path: test.txt / ex: │
00:11:55 verbose #17288 > > │ System.IO.IOException: The process cannot access the file │
00:11:55 verbose #17289 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-2203-4275-7556-7004 │
00:11:55 verbose #17290 > > │ 00ec1bfe\test.txt' because it is being used by another process. │
00:11:55 verbose #17291 > > │ 00:00:02 debug #9 _3 │
00:11:55 verbose #17292 > > │ 00:00:02 debug #10 5 │
00:11:55 verbose #17293 > > │ 00:00:02 debug #11 6 │
00:11:55 verbose #17294 > > │ assert_between / actual: 128L / expected: struct (50L, 150L) │
00:11:55 verbose #17295 > > │ assert_eq / actual: true / expected: true │
00:11:55 verbose #17296 > > │ │
00:11:55 verbose #17297 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:55 verbose #17298 > >
00:11:55 verbose #17299 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:55 verbose #17300 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:55 verbose #17301 > > │ ## move_file_async │
00:11:55 verbose #17302 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:55 verbose #17303 > >
00:11:55 verbose #17304 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:55 verbose #17305 > > inl move_file_async new_path old_path : _ i64 =
00:11:55 verbose #17306 > > run_target function
00:11:55 verbose #17307 > > | Fsharp (Native) => fun () =>
00:11:55 verbose #17308 > > let rec loop (retry : i64) =
00:11:55 verbose #17309 > > fun () =>
00:11:55 verbose #17310 > > try_unit
00:11:55 verbose #17311 > > fun () =>
00:11:55 verbose #17312 > > old_path |> file_move new_path
00:11:55 verbose #17313 > > return retry
00:11:55 verbose #17314 > > fun ex =>
00:11:55 verbose #17315 > > if retry % 100 = 0 then
00:11:55 verbose #17316 > > inl _locals () =
00:11:55 verbose #17317 > > inl ex = ex |> sm'.format_exception
00:11:55 verbose #17318 > > $'$"old_path: {!old_path |> !get_file_name}
00:11:55 verbose #17319 > > / new_path: {!new_path |> !get_file_name} / ex: {!ex} / {!_locals ()}"'
00:11:55 verbose #17320 > > trace Warning (fun () => "move_file_async")
00:11:55 verbose #17321 > > _locals
00:11:55 verbose #17322 > > async.sleep 10 |> async.do
00:11:55 verbose #17323 > > loop (retry + 1) |> async.return_await
00:11:55 verbose #17324 > > |> async.new_async_unit
00:11:55 verbose #17325 > > loop 0
00:11:55 verbose #17326 > > | _ => fun () => null ()
00:11:55 verbose #17327 > >
00:11:55 verbose #17328 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:55 verbose #17329 > > //// test
00:11:55 verbose #17330 > >
00:11:55 verbose #17331 > > inl lock_file path =
00:11:55 verbose #17332 > > fun () =>
00:11:55 verbose #17333 > > trace Debug (fun () => "_1") _locals
00:11:55 verbose #17334 > > file_stream
00:11:55 verbose #17335 > > path
00:11:55 verbose #17336 > > ModeOpen
00:11:55 verbose #17337 > > AccessReadWrite
00:11:55 verbose #17338 > > ShareNone
00:11:55 verbose #17339 > > |> use
00:11:55 verbose #17340 > > |> ignore
00:11:55 verbose #17341 > > trace Debug (fun () => "_2") _locals
00:11:55 verbose #17342 > > async.sleep 2000 |> async.do
00:11:55 verbose #17343 > > trace Debug (fun () => "_3") _locals
00:11:55 verbose #17344 > > |> async.new_async
00:11:55 verbose #17345 > >
00:11:55 verbose #17346 > > types ()
00:11:55 verbose #17347 > > inl temp_dir, disposable = create_temp_directory ()
00:11:55 verbose #17348 > > disposable |> use |> ignore
00:11:55 verbose #17349 > > let path = temp_dir </> "test.txt"
00:11:55 verbose #17350 > > let new_path = temp_dir </> "test2.txt"
00:11:55 verbose #17351 > >
00:11:55 verbose #17352 > > fun () =>
00:11:55 verbose #17353 > > trace Debug (fun () => "1") _locals
00:11:55 verbose #17354 > > "0" |> write_all_text_async path |> async.do
00:11:55 verbose #17355 > > trace Debug (fun () => "2") _locals
00:11:55 verbose #17356 > > inl child = lock_file path |> async.start_child |> async.let'
00:11:55 verbose #17357 > > trace Debug (fun () => "3") _locals
00:11:55 verbose #17358 > > async.sleep 1 |> async.do
00:11:55 verbose #17359 > > trace Debug (fun () => "4") _locals
00:11:55 verbose #17360 > > inl retries1 = path |> move_file_async new_path |> async.let'
00:11:55 verbose #17361 > > trace Debug (fun () => "5") _locals
00:11:55 verbose #17362 > > inl retries2 = new_path |> wait_for_file_access None |> async.let'
00:11:55 verbose #17363 > > trace Debug (fun () => "6") _locals
00:11:55 verbose #17364 > > inl text = new_path |> read_all_text_async |> async.let'
00:11:55 verbose #17365 > > trace Debug (fun () => "7") _locals
00:11:55 verbose #17366 > > child |> async.do
00:11:55 verbose #17367 > > trace Debug (fun () => "8") _locals
00:11:55 verbose #17368 > > (retries1, retries2, text) |> return
00:11:55 verbose #17369 > > |> async.new_async_unit
00:11:55 verbose #17370 > > |> async.run_with_timeout 3000
00:11:55 verbose #17371 > > |> function
00:11:55 verbose #17372 > > | Some (retries1, retries2, text) =>
00:11:55 verbose #17373 > > retries1
00:11:55 verbose #17374 > > |> _assert_between
00:11:55 verbose #17375 > > (if runtime.is_windows () then 50i64 else 0)
00:11:55 verbose #17376 > > (if runtime.is_windows () then 150 else 0)
00:11:55 verbose #17377 > >
00:11:55 verbose #17378 > > retries2
00:11:55 verbose #17379 > > |> _assert_between
00:11:55 verbose #17380 > > (if runtime.is_windows () then 0i64 else 100)
00:11:55 verbose #17381 > > (if runtime.is_windows () then 0 else 200)
00:11:55 verbose #17382 > >
00:11:55 verbose #17383 > > text |> _assert_eq (join "0")
00:11:55 verbose #17384 > >
00:11:55 verbose #17385 > > true
00:11:55 verbose #17386 > > | _ => false
00:11:55 verbose #17387 > > |> _assert_eq true
00:11:58 verbose #17388 > >
00:11:58 verbose #17389 > > ╭─[ 2.96s - stdout ]───────────────────────────────────────────────────────────╮
00:11:58 verbose #17390 > > │ 00:00:00 debug #1 1 │
00:11:58 verbose #17391 > > │ 00:00:00 debug #2 2 │
00:11:58 verbose #17392 > > │ 00:00:00 debug #3 3 │
00:11:58 verbose #17393 > > │ 00:00:00 debug #4 _1 │
00:11:58 verbose #17394 > > │ 00:00:00 debug #5 _2 │
00:11:58 verbose #17395 > > │ 00:00:00 debug #6 4 │
00:11:58 verbose #17396 > > │ 00:00:00 warning #7 move_file_async / old_path: test.txt / new_path: │
00:11:58 verbose #17397 > > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │
00:11:58 verbose #17398 > > │ because it is being used by another process. │
00:11:58 verbose #17399 > > │ 00:00:01 warning #8 move_file_async / old_path: test.txt / new_path: │
00:11:58 verbose #17400 > > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │
00:11:58 verbose #17401 > > │ because it is being used by another process. │
00:11:58 verbose #17402 > > │ 00:00:02 debug #9 _3 │
00:11:58 verbose #17403 > > │ 00:00:02 debug #10 5 │
00:11:58 verbose #17404 > > │ 00:00:02 debug #11 6 │
00:11:58 verbose #17405 > > │ 00:00:02 debug #12 7 │
00:11:58 verbose #17406 > > │ 00:00:02 debug #13 8 │
00:11:58 verbose #17407 > > │ assert_between / actual: 128L / expected: struct (50L, 150L) │
00:11:58 verbose #17408 > > │ assert_between / actual: 0L / expected: struct (0L, 0L) │
00:11:58 verbose #17409 > > │ assert_eq / actual: "0" / expected: "0" │
00:11:58 verbose #17410 > > │ assert_eq / actual: true / expected: true │
00:11:58 verbose #17411 > > │ │
00:11:58 verbose #17412 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:58 verbose #17413 > >
00:11:58 verbose #17414 > > ── markdown ────────────────────────────────────────────────────────────────────
00:11:58 verbose #17415 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:58 verbose #17416 > > │ ## find_parent │
00:11:58 verbose #17417 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:58 verbose #17418 > >
00:11:58 verbose #17419 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:58 verbose #17420 > > inl find_parent name is_file root_dir =
00:11:58 verbose #17421 > > let rec loop dir =
00:11:58 verbose #17422 > > if dir </> name |> (if is_file then file_exists else directory_exists)
00:11:58 verbose #17423 > > then dir
00:11:58 verbose #17424 > > else
00:11:58 verbose #17425 > > inl result = dir |> (join directory_get_parent)
00:11:58 verbose #17426 > > match result |> optionm'.unbox with
00:11:58 verbose #17427 > > | Some parent => parent |> loop
00:11:58 verbose #17428 > > | None => failwith $'$"""No parent for {if !is_file then "file" else
00:11:58 verbose #17429 > > "dir"} \'{!name}\' at \'{!root_dir}\' (until \'{!dir}\')"""'
00:11:58 verbose #17430 > > loop root_dir
00:11:58 verbose #17431 > >
00:11:58 verbose #17432 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:58 verbose #17433 > > //// test
00:11:58 verbose #17434 > >
00:11:58 verbose #17435 > > a ;[[ ".paket", false; "paket.dependencies", true ]]
00:11:58 verbose #17436 > > |> am.map fun (file, is_file) =>
00:11:58 verbose #17437 > > get_source_directory ()
00:11:58 verbose #17438 > > |> find_parent file is_file
00:11:58 verbose #17439 > > |> directory_info
00:11:58 verbose #17440 > > |> directory_info_name
00:11:58 verbose #17441 > > |> am'.distinct
00:11:58 verbose #17442 > > |> _assert_eq (a ;[[ "polyglot" ]] : _ i32 _)
00:11:58 verbose #17443 > >
00:11:58 verbose #17444 > > ╭─[ 117.38ms - stdout ]────────────────────────────────────────────────────────╮
00:11:58 verbose #17445 > > │ assert_eq / actual: [|"polyglot"|] / expected: [|"polyglot"|] │
00:11:58 verbose #17446 > > │ │
00:11:58 verbose #17447 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:58 verbose #17448 > >
00:11:58 verbose #17449 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:58 verbose #17450 > > //// test
00:11:58 verbose #17451 > > ///! rust
00:11:58 verbose #17452 > >
00:11:58 verbose #17453 > > types ()
00:11:58 verbose #17454 > > a ;[[ ".paket", false; "paket.dependencies", true ]]
00:11:58 verbose #17455 > > |> am.map fun (file, is_file) =>
00:11:58 verbose #17456 > > fun () =>
00:11:58 verbose #17457 > > join
00:11:58 verbose #17458 > > get_source_directory ()
00:11:58 verbose #17459 > > |> find_parent file is_file
00:11:58 verbose #17460 > > |> sm'.to_std_string
00:11:58 verbose #17461 > > |> new_path_buf
00:11:58 verbose #17462 > > |> path_buf_file_name
00:11:58 verbose #17463 > > |> optionm'.try'
00:11:58 verbose #17464 > > |> sm'.from_os_str_ref
00:11:58 verbose #17465 > > |> Some
00:11:58 verbose #17466 > > |> optionm'.box
00:11:58 verbose #17467 > > |> fun x => x () |> optionm'.unbox
00:11:58 verbose #17468 > > |> optionm'.default_value ""
00:11:58 verbose #17469 > > |> am'.distinct
00:11:58 verbose #17470 > > |> fun result =>
00:11:58 verbose #17471 > > result |> am'.length |> _assert_eq 1i32
00:11:58 verbose #17472 > > index result 0i32 |> _assert_eq "polyglot"
00:12:01 verbose #17473 > >
00:12:01 verbose #17474 > > ╭─[ 2.49s - return value ]─────────────────────────────────────────────────────╮
00:12:01 verbose #17475 > > │ assert_eq / actual: 1 / expected: 1 │
00:12:01 verbose #17476 > > │ assert_eq / actual: "polyglot" / expected: "polyglot" │
00:12:01 verbose #17477 > > │ │
00:12:01 verbose #17478 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:01 verbose #17479 > >
00:12:01 verbose #17480 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:01 verbose #17481 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:01 verbose #17482 > > │ ## get_workspace_root │
00:12:01 verbose #17483 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:01 verbose #17484 > >
00:12:01 verbose #17485 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:01 verbose #17486 > > inl get_workspace_root () =
00:12:01 verbose #17487 > > get_source_directory ()
00:12:01 verbose #17488 > > |> find_parent ("polyglot" </> ".paket") false
00:12:01 verbose #17489 > > |> fun root => root </> "polyglot"
00:12:01 verbose #17490 > >
00:12:01 verbose #17491 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:01 verbose #17492 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:01 verbose #17493 > > │ ## standardize_path │
00:12:01 verbose #17494 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:01 verbose #17495 > >
00:12:01 verbose #17496 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:01 verbose #17497 > > let standardize_path path =
00:12:01 verbose #17498 > > path |> get_full_path |> normalize_path
00:12:01 verbose #17499 > >
00:12:01 verbose #17500 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:01 verbose #17501 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:01 verbose #17502 > > │ ## absolute_path │
00:12:01 verbose #17503 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:01 verbose #17504 > >
00:12:01 verbose #17505 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:01 verbose #17506 > > let absolute_path path =
00:12:01 verbose #17507 > > inl current_dir = get_current_directory ()
00:12:01 verbose #17508 > > current_dir </> path |> standardize_path
00:12:01 verbose #17509 > >
00:12:01 verbose #17510 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:01 verbose #17511 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:01 verbose #17512 > > │ ## new_file_uri │
00:12:01 verbose #17513 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:01 verbose #17514 > >
00:12:01 verbose #17515 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:01 verbose #17516 > > inl new_file_uri (path : string) : string =
00:12:01 verbose #17517 > > inl path = path |> sm'.trim_start ;[[ '/' ]]
00:12:01 verbose #17518 > > $'$"file:///{!path}"'
00:12:01 verbose #17519 > >
00:12:01 verbose #17520 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:01 verbose #17521 > > //// test
00:12:01 verbose #17522 > >
00:12:01 verbose #17523 > > @"\\?\C:\test"
00:12:01 verbose #17524 > > |> normalize_path
00:12:01 verbose #17525 > > |> new_file_uri
00:12:01 verbose #17526 > > |> _assert_eq "file:///c:/test"
00:12:01 verbose #17527 > >
00:12:01 verbose #17528 > > ╭─[ 57.63ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:01 verbose #17529 > > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │
00:12:01 verbose #17530 > > │ │
00:12:01 verbose #17531 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:01 verbose #17532 > >
00:12:01 verbose #17533 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:01 verbose #17534 > > //// test
00:12:01 verbose #17535 > > ///! rust -d regex
00:12:01 verbose #17536 > >
00:12:01 verbose #17537 > > types ()
00:12:01 verbose #17538 > > @"\\?\C:\test"
00:12:01 verbose #17539 > > |> normalize_path
00:12:01 verbose #17540 > > |> new_file_uri
00:12:01 verbose #17541 > > |> _assert_eq "file:///c:/test"
00:12:04 verbose #17542 > >
00:12:04 verbose #17543 > > ╭─[ 2.88s - return value ]─────────────────────────────────────────────────────╮
00:12:04 verbose #17544 > > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │
00:12:04 verbose #17545 > > │ │
00:12:04 verbose #17546 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:04 verbose #17547 > >
00:12:04 verbose #17548 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:04 verbose #17549 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:04 verbose #17550 > > │ ## trace_file │
00:12:04 verbose #17551 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:04 verbose #17552 > >
00:12:04 verbose #17553 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:04 verbose #17554 > > let rec trace_file text =
00:12:04 verbose #17555 > > run_target function
00:12:04 verbose #17556 > > | Fsharp (Native) => fun () =>
00:12:04 verbose #17557 > > try_unit
00:12:04 verbose #17558 > > fun () =>
00:12:04 verbose #17559 > > inl assembly_name = env.get_entry_assembly_name ()
00:12:04 verbose #17560 > > inl guid = date_time.now () |> date_time.new_guid_from_date_time
00:12:04 verbose #17561 > > inl file_name = $'$"{!assembly_name}_{!guid}.txt"'
00:12:04 verbose #17562 > >
00:12:04 verbose #17563 > > inl workspace_root = get_workspace_root ()
00:12:04 verbose #17564 > > inl trace_dir = workspace_root </> "target/polyglot/trace"
00:12:04 verbose #17565 > > trace_dir |> create_directory |> ignore
00:12:04 verbose #17566 > > inl path = trace_dir </> file_name
00:12:04 verbose #17567 > > text |> write_all_text_async path |> async.run_synchronously
00:12:04 verbose #17568 > > fun ex =>
00:12:04 verbose #17569 > > trace_file $'$"file_system.trace_file / ex: %A{!ex}"'
00:12:04 verbose #17570 > > | _ => fun () => ()
00:12:04 verbose #17571 > >
00:12:04 verbose #17572 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:04 verbose #17573 > > //// test
00:12:04 verbose #17574 > >
00:12:04 verbose #17575 > > inl get_count dir : i64 =
00:12:04 verbose #17576 > > inl files = dir |> file_system.directory_get_files
00:12:04 verbose #17577 > > a files |> am'.length
00:12:04 verbose #17578 > >
00:12:04 verbose #17579 > > types ()
00:12:04 verbose #17580 > > inl trace_dir = file_system.get_workspace_root () </> "target/polyglot/trace"
00:12:04 verbose #17581 > > trace_dir |> file_system.create_directory |> ignore
00:12:04 verbose #17582 > >
00:12:04 verbose #17583 > > inl count = get_count trace_dir
00:12:04 verbose #17584 > >
00:12:04 verbose #17585 > > trace_file "test"
00:12:04 verbose #17586 > >
00:12:04 verbose #17587 > > get_count trace_dir
00:12:04 verbose #17588 > > |> _assert_eq (count + 1)
00:12:04 verbose #17589 > >
00:12:04 verbose #17590 > > ╭─[ 495.50ms - stdout ]────────────────────────────────────────────────────────╮
00:12:04 verbose #17591 > > │ assert_eq / actual: 78L / expected: 78L │
00:12:04 verbose #17592 > > │ │
00:12:04 verbose #17593 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:04 verbose #17594 > >
00:12:04 verbose #17595 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:04 verbose #17596 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:04 verbose #17597 > > │ ## init_trace_file │
00:12:04 verbose #17598 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:04 verbose #17599 > >
00:12:04 verbose #17600 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:04 verbose #17601 > > inl init_trace_file enabled =
00:12:04 verbose #17602 > > inl state_trace_file = get_trace_state_or_init None .trace_file
00:12:04 verbose #17603 > > state_trace_file <- if enabled then trace_file else ignore
00:12:04 verbose #17604 > >
00:12:04 verbose #17605 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:04 verbose #17606 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:04 verbose #17607 > > │ ## main │
00:12:04 verbose #17608 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:04 verbose #17609 > >
00:12:04 verbose #17610 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:04 verbose #17611 > > inl main () =
00:12:04 verbose #17612 > > types ()
00:12:04 verbose #17613 > > init_trace_state None
00:12:04 verbose #17614 > > $'let delete_directory_async x = !delete_directory_async x' : ()
00:12:04 verbose #17615 > > $'let wait_for_file_access x = !wait_for_file_access x' : ()
00:12:04 verbose #17616 > > $'let wait_for_file_access_read x = !wait_for_file_access_read x' : ()
00:12:04 verbose #17617 > > $'let read_all_text_async x = !read_all_text_async x' : ()
00:12:04 verbose #17618 > > $'let file_exists_content x = !file_exists_content x' : ()
00:12:04 verbose #17619 > > $'let write_all_text_async x = !write_all_text_async x' : ()
00:12:04 verbose #17620 > > $'let write_all_text_exists x = !write_all_text_exists x' : ()
00:12:04 verbose #17621 > > $'let delete_file_async x = !delete_file_async x' : ()
00:12:04 verbose #17622 > > $'let move_file_async x = !move_file_async x' : ()
00:12:04 verbose #17623 > > $'let read_all_text_retry_async x = !read_all_text_retry_async x' : ()
00:12:04 verbose #17624 > > $'let create_temp_directory_name () = !create_temp_directory_name ()' : ()
00:12:04 verbose #17625 > > $'let create_temp_directory () = !create_temp_directory ()' : ()
00:12:04 verbose #17626 > > $'let get_source_directory () = !get_source_directory ()' : ()
00:12:04 verbose #17627 > > $'let find_parent x = !find_parent x' : ()
00:12:04 verbose #17628 > > $'let normalize_path x = !normalize_path x' : ()
00:12:04 verbose #17629 > > $'let new_file_uri x = !new_file_uri x' : ()
00:12:04 verbose #17630 > > $'let get_workspace_root () = !get_workspace_root ()' : ()
00:12:04 verbose #17631 > > $'let init_trace_file x = !init_trace_file x' : ()
00:12:04 verbose #17632 > > inl combine x = (</>) x
00:12:04 verbose #17633 > > $'let (</>) x = !combine x' : ()
00:12:06 verbose #17634 > 00:00:44 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 85761
00:12:06 verbose #17635 > 00:00:44 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:12:08 verbose #17636 > 00:00:46 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb to html
00:12:08 verbose #17637 > 00:00:46 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:12:08 verbose #17638 > 00:00:46 verbose #7 ! validate(nb)
00:12:11 verbose #17639 > 00:00:49 verbose #8 ! [NbConvertApp] Writing 539163 bytes to c:\home\git\polyglot\lib\spiral\file_system.dib.html
00:12:11 verbose #17640 > 00:00:49 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 653
00:12:11 verbose #17641 > 00:00:49 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 653
00:12:11 verbose #17642 > 00:00:49 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:12:12 verbose #17643 > 00:00:50 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:12:12 verbose #17644 > 00:00:50 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:12:12 verbose #17645 > 00:00:51 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 86473
00:12:12 debug #17646 execute_with_options_async / exit_code: 0 / output.Length: 92445
00:12:12 debug #25 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path file_system.dib --retries 3
00:12:12 debug #17647 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path networking.dib --retries 3",
[||], None, None, true, None)
00:12:12 verbose #17648 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "networking.dib", "--retries", "3"])
00:12:12 verbose #17649 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/networking.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/networking.dib" --output-path "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:12:14 verbose #17650 > >
00:12:14 verbose #17651 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:14 verbose #17652 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:14 verbose #17653 > > │ # networking │
00:12:14 verbose #17654 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:14 verbose #17655 > >
00:12:14 verbose #17656 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:14 verbose #17657 > > open rust_operators
00:12:14 verbose #17658 > >
00:12:14 verbose #17659 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:12:14 verbose #17660 > > #r
00:12:14 verbose #17661 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:12:14 verbose #17662 > > otNet.Interactive.Spiral.dll"
00:12:14 verbose #17663 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:12:14 verbose #17664 > > #r
00:12:14 verbose #17665 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:12:14 verbose #17666 > > otNet.Interactive.dll"
00:12:14 verbose #17667 > > open type Microsoft.DotNet.Interactive.Kernel
00:12:19 verbose #17668 > >
00:12:19 verbose #17669 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17670 > > //// test
00:12:19 verbose #17671 > >
00:12:19 verbose #17672 > > open testing
00:12:19 verbose #17673 > >
00:12:19 verbose #17674 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17675 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17676 > > │ ## types │
00:12:19 verbose #17677 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17678 > >
00:12:19 verbose #17679 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17680 > > inl types () =
00:12:19 verbose #17681 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:12:19 verbose #17682 > > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class
00:12:19 verbose #17683 > > end"
00:12:19 verbose #17684 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:12:19 verbose #17685 > > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype
00:12:19 verbose #17686 > > reqwest_RequestBuilder = class end"
00:12:19 verbose #17687 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:12:19 verbose #17688 > > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response =
00:12:19 verbose #17689 > > class end"
00:12:19 verbose #17690 > >
00:12:19 verbose #17691 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17692 > > inl types () =
00:12:19 verbose #17693 > > types ()
00:12:19 verbose #17694 > > env.types ()
00:12:19 verbose #17695 > > rust.types ()
00:12:19 verbose #17696 > > sm'.types ()
00:12:19 verbose #17697 > >
00:12:19 verbose #17698 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17699 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17700 > > │ ## reqwest_response │
00:12:19 verbose #17701 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17702 > >
00:12:19 verbose #17703 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17704 > > nominal reqwest_response = $'reqwest_Response'
00:12:19 verbose #17705 > >
00:12:19 verbose #17706 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17707 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17708 > > │ ## reqwest_error │
00:12:19 verbose #17709 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17710 > >
00:12:19 verbose #17711 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17712 > > nominal reqwest_error = $'reqwest_Error'
00:12:19 verbose #17713 > >
00:12:19 verbose #17714 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17715 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17716 > > │ ## request_builder │
00:12:19 verbose #17717 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17718 > >
00:12:19 verbose #17719 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17720 > > nominal request_builder = $'reqwest_RequestBuilder'
00:12:19 verbose #17721 > >
00:12:19 verbose #17722 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17723 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17724 > > │ ## request_type │
00:12:19 verbose #17725 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17726 > >
00:12:19 verbose #17727 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17728 > > union request_type =
00:12:19 verbose #17729 > > | Get
00:12:19 verbose #17730 > > | Post
00:12:19 verbose #17731 > >
00:12:19 verbose #17732 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17733 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17734 > > │ ## request │
00:12:19 verbose #17735 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17736 > >
00:12:19 verbose #17737 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17738 > > type request =
00:12:19 verbose #17739 > > {
00:12:19 verbose #17740 > > url : string
00:12:19 verbose #17741 > > request_type : request_type
00:12:19 verbose #17742 > > body : string
00:12:19 verbose #17743 > > json : bool
00:12:19 verbose #17744 > > auto_refresh : bool
00:12:19 verbose #17745 > > }
00:12:19 verbose #17746 > >
00:12:19 verbose #17747 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17748 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17749 > > │ ## new_request_get │
00:12:19 verbose #17750 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17751 > >
00:12:19 verbose #17752 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17753 > > inl new_request_get (url : string) : request_builder =
00:12:19 verbose #17754 > > inl url = join url
00:12:19 verbose #17755 > > inl url = url |> sm'.to_std_string
00:12:19 verbose #17756 > > inl url = join url
00:12:19 verbose #17757 > > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:12:19 verbose #17758 > > err.to_string())?.get(!url)"')
00:12:19 verbose #17759 > >
00:12:19 verbose #17760 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17761 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17762 > > │ ## new_request_post │
00:12:19 verbose #17763 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17764 > >
00:12:19 verbose #17765 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17766 > > inl new_request_post (url : string) : request_builder =
00:12:19 verbose #17767 > > inl url = join url
00:12:19 verbose #17768 > > inl url = url |> sm'.to_std_string
00:12:19 verbose #17769 > > inl url = join url
00:12:19 verbose #17770 > > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:12:19 verbose #17771 > > err.to_string())?.post(!url)"')
00:12:19 verbose #17772 > >
00:12:19 verbose #17773 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17774 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17775 > > │ ## request_send │
00:12:19 verbose #17776 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17777 > >
00:12:19 verbose #17778 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17779 > > inl request_send (request : request_builder) : async.future_pin (resultm.result'
00:12:19 verbose #17780 > > reqwest_response reqwest_error) =
00:12:19 verbose #17781 > > inl request = join request
00:12:19 verbose #17782 > > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"')
00:12:19 verbose #17783 > >
00:12:19 verbose #17784 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17785 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17786 > > │ ## request_body │
00:12:19 verbose #17787 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17788 > >
00:12:19 verbose #17789 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17790 > > inl request_body (body : string) (request : request_builder) : request_builder =
00:12:19 verbose #17791 > > inl body = body |> sm'.to_std_string
00:12:19 verbose #17792 > > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"')
00:12:19 verbose #17793 > >
00:12:19 verbose #17794 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17795 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17796 > > │ ## request_header │
00:12:19 verbose #17797 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17798 > >
00:12:19 verbose #17799 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17800 > > inl request_header (key : string) (value : string) (request : request_builder) :
00:12:19 verbose #17801 > > request_builder =
00:12:19 verbose #17802 > > inl request = join request
00:12:19 verbose #17803 > > inl key = key |> sm'.to_std_string
00:12:19 verbose #17804 > > inl value = value |> sm'.to_std_string
00:12:19 verbose #17805 > > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"')
00:12:19 verbose #17806 > >
00:12:19 verbose #17807 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17808 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17809 > > │ ## request_json │
00:12:19 verbose #17810 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17811 > >
00:12:19 verbose #17812 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17813 > > inl request_json forall t. (obj : t) (request : request_builder) :
00:12:19 verbose #17814 > > request_builder =
00:12:19 verbose #17815 > > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"')
00:12:19 verbose #17816 > >
00:12:19 verbose #17817 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17818 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17819 > > │ ## response_text │
00:12:19 verbose #17820 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17821 > >
00:12:19 verbose #17822 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17823 > > inl response_text (response : reqwest_response) : async.future_pin
00:12:19 verbose #17824 > > (resultm.result' sm'.std_string reqwest_error) =
00:12:19 verbose #17825 > > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"')
00:12:19 verbose #17826 > >
00:12:19 verbose #17827 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17828 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17829 > > │ ## tcp_client │
00:12:19 verbose #17830 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17831 > >
00:12:19 verbose #17832 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17833 > > nominal tcp_client = $'System.Net.Sockets.TcpClient'
00:12:19 verbose #17834 > >
00:12:19 verbose #17835 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17836 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17837 > > │ ## new_tcp_client │
00:12:19 verbose #17838 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17839 > >
00:12:19 verbose #17840 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17841 > > inl new_tcp_client () : tcp_client =
00:12:19 verbose #17842 > > $'new `tcp_client ()'
00:12:19 verbose #17843 > >
00:12:19 verbose #17844 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17845 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17846 > > │ ## ip_address │
00:12:19 verbose #17847 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17848 > >
00:12:19 verbose #17849 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17850 > > nominal ip_address = $'System.Net.IPAddress'
00:12:19 verbose #17851 > >
00:12:19 verbose #17852 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17853 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17854 > > │ ## ip_address_parse │
00:12:19 verbose #17855 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17856 > >
00:12:19 verbose #17857 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17858 > > inl ip_address_parse (s : string) : ip_address =
00:12:19 verbose #17859 > > s |> $'`ip_address.Parse'
00:12:19 verbose #17860 > >
00:12:19 verbose #17861 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17862 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17863 > > │ ## tcp_listener │
00:12:19 verbose #17864 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17865 > >
00:12:19 verbose #17866 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17867 > > nominal tcp_listener = $'System.Net.Sockets.TcpListener'
00:12:19 verbose #17868 > >
00:12:19 verbose #17869 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17870 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17871 > > │ ## new_tcp_listener │
00:12:19 verbose #17872 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17873 > >
00:12:19 verbose #17874 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17875 > > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener =
00:12:19 verbose #17876 > > $'new `tcp_listener (!ip_address, !port)'
00:12:19 verbose #17877 > >
00:12:19 verbose #17878 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17879 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17880 > > │ ## listener_start │
00:12:19 verbose #17881 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17882 > >
00:12:19 verbose #17883 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17884 > > inl listener_start (listener : tcp_listener) : () =
00:12:19 verbose #17885 > > $'!listener.Start' ()
00:12:19 verbose #17886 > >
00:12:19 verbose #17887 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17888 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17889 > > │ ## listener_stop │
00:12:19 verbose #17890 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17891 > >
00:12:19 verbose #17892 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17893 > > inl listener_stop (listener : tcp_listener) : () =
00:12:19 verbose #17894 > > $'!listener.Stop' ()
00:12:19 verbose #17895 > >
00:12:19 verbose #17896 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17897 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17898 > > │ ## client_connect_async │
00:12:19 verbose #17899 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17900 > >
00:12:19 verbose #17901 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17902 > > inl client_connect_async
00:12:19 verbose #17903 > > (host : string)
00:12:19 verbose #17904 > > (port : i32)
00:12:19 verbose #17905 > > (ct : threading.cancellation_token)
00:12:19 verbose #17906 > > (client : tcp_client)
00:12:19 verbose #17907 > > : async.value_task
00:12:19 verbose #17908 > > =
00:12:19 verbose #17909 > > $'!client.ConnectAsync (!host, !port, !ct)'
00:12:19 verbose #17910 > >
00:12:19 verbose #17911 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:19 verbose #17912 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:19 verbose #17913 > > │ ## test_port_open │
00:12:19 verbose #17914 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:19 verbose #17915 > >
00:12:19 verbose #17916 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17917 > > inl test_port_open host port : _ bool = async.new_async fun () =>
00:12:19 verbose #17918 > > inl ct = async.cancellation_token () |> async.let'
00:12:19 verbose #17919 > > inl client = new_tcp_client () |> use
00:12:19 verbose #17920 > > try_unit
00:12:19 verbose #17921 > > fun () =>
00:12:19 verbose #17922 > > client |> client_connect_async host port ct |>
00:12:19 verbose #17923 > > async.await_value_task_unit |> async.do
00:12:19 verbose #17924 > > return true
00:12:19 verbose #17925 > > fun ex =>
00:12:19 verbose #17926 > > inl ex = ex |> sm'.format_exception
00:12:19 verbose #17927 > > trace Verbose (fun () => $'$"networking.test_port_open / port:
00:12:19 verbose #17928 > > {!port} / ex: {!ex}"') _locals
00:12:19 verbose #17929 > > return false
00:12:19 verbose #17930 > >
00:12:19 verbose #17931 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:19 verbose #17932 > > //// test
00:12:19 verbose #17933 > >
00:12:19 verbose #17934 > > test_port_open "127.0.0.1" 65536
00:12:19 verbose #17935 > > |> async.run_with_timeout 120
00:12:19 verbose #17936 > > |> _assert_eq (Some false)
00:12:21 verbose #17937 > >
00:12:21 verbose #17938 > > ╭─[ 1.99s - stdout ]───────────────────────────────────────────────────────────╮
00:12:21 verbose #17939 > > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │
00:12:21 verbose #17940 > > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │
00:12:21 verbose #17941 > > │ of valid values. (Parameter 'port') │
00:12:21 verbose #17942 > > │ assert_eq / actual: US2_0 false / expected: US2_0 false │
00:12:21 verbose #17943 > > │ │
00:12:21 verbose #17944 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:21 verbose #17945 > >
00:12:21 verbose #17946 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:21 verbose #17947 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:21 verbose #17948 > > │ ## test_port_open_timeout │
00:12:21 verbose #17949 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:21 verbose #17950 > >
00:12:21 verbose #17951 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:21 verbose #17952 > > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun
00:12:21 verbose #17953 > > () =>
00:12:21 verbose #17954 > > test_port_open host port
00:12:21 verbose #17955 > > |> async.run_with_timeout_async timeout
00:12:21 verbose #17956 > > |> async.let'
00:12:21 verbose #17957 > > |> function
00:12:21 verbose #17958 > > | None => false
00:12:21 verbose #17959 > > | Some result => result
00:12:21 verbose #17960 > > |> return
00:12:21 verbose #17961 > >
00:12:21 verbose #17962 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:21 verbose #17963 > > //// test
00:12:21 verbose #17964 > >
00:12:21 verbose #17965 > > test_port_open_timeout 120 "127.0.0.1" 65535
00:12:21 verbose #17966 > > |> async.run_synchronously
00:12:21 verbose #17967 > > |> _assert_eq false
00:12:22 verbose #17968 > >
00:12:22 verbose #17969 > > ╭─[ 692.93ms - stdout ]────────────────────────────────────────────────────────╮
00:12:22 verbose #17970 > > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │
00:12:22 verbose #17971 > > │ assert_eq / actual: false / expected: false │
00:12:22 verbose #17972 > > │ │
00:12:22 verbose #17973 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:22 verbose #17974 > >
00:12:22 verbose #17975 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:22 verbose #17976 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:22 verbose #17977 > > │ ## wait_for_port_access │
00:12:22 verbose #17978 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:22 verbose #17979 > >
00:12:22 verbose #17980 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:22 verbose #17981 > > inl wait_for_port_access timeout status host port : _ i64 =
00:12:22 verbose #17982 > > let rec loop retry : _ i64 = async.new_async_unit fun () =>
00:12:22 verbose #17983 > > inl isPortOpen =
00:12:22 verbose #17984 > > match timeout |> optionm'.unbox with
00:12:22 verbose #17985 > > | None => test_port_open host port
00:12:22 verbose #17986 > > | Some timeout => test_port_open_timeout timeout host port
00:12:22 verbose #17987 > > |> async.let'
00:12:22 verbose #17988 > >
00:12:22 verbose #17989 > > fix_condition
00:12:22 verbose #17990 > > fun () => isPortOpen = status
00:12:22 verbose #17991 > > fun () => retry |> return
00:12:22 verbose #17992 > > fun () =>
00:12:22 verbose #17993 > > if retry % 100 = 0 then
00:12:22 verbose #17994 > > inl _locals () = $'$"port: {!port} / retry: {!retry}
00:12:22 verbose #17995 > > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"'
00:12:22 verbose #17996 > > trace Verbose (fun () => "networking.wait_for_port_access")
00:12:22 verbose #17997 > > _locals
00:12:22 verbose #17998 > > async.sleep 10 |> async.do
00:12:22 verbose #17999 > > loop (retry + 1) |> async.return_await
00:12:22 verbose #18000 > > loop 0i64
00:12:22 verbose #18001 > >
00:12:22 verbose #18002 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:22 verbose #18003 > > //// test
00:12:22 verbose #18004 > >
00:12:22 verbose #18005 > > inl lock_port host port = async.new_async fun () =>
00:12:22 verbose #18006 > > trace Debug (fun () => "_1") _locals
00:12:22 verbose #18007 > > async.sleep 5000 |> async.do
00:12:22 verbose #18008 > > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use
00:12:22 verbose #18009 > > trace Debug (fun () => "_2") _locals
00:12:22 verbose #18010 > > listener |> listener_start
00:12:22 verbose #18011 > > trace Debug (fun () => "_3") _locals
00:12:22 verbose #18012 > > async.sleep 2000 |> async.do
00:12:22 verbose #18013 > > trace Debug (fun () => "_4") _locals
00:12:22 verbose #18014 > > $'!listener.Stop' ()
00:12:22 verbose #18015 > > trace Debug (fun () => "_5") _locals
00:12:22 verbose #18016 > >
00:12:22 verbose #18017 > > inl host = "127.0.0.1"
00:12:22 verbose #18018 > > inl port = 5555i32
00:12:22 verbose #18019 > >
00:12:22 verbose #18020 > > fun () =>
00:12:22 verbose #18021 > > trace Debug (fun () => "1") _locals
00:12:22 verbose #18022 > > inl child = lock_port host port |> async.start_child |> async.let'
00:12:22 verbose #18023 > > trace Debug (fun () => "2") _locals
00:12:22 verbose #18024 > > async.sleep 1 |> async.do
00:12:22 verbose #18025 > > trace Debug (fun () => "3") _locals
00:12:22 verbose #18026 > > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |>
00:12:22 verbose #18027 > > async.let'
00:12:22 verbose #18028 > > trace Debug (fun () => "4") _locals
00:12:22 verbose #18029 > > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port
00:12:22 verbose #18030 > > |> async.let'
00:12:22 verbose #18031 > > trace Debug (fun () => "5") _locals
00:12:22 verbose #18032 > > child |> async.do
00:12:22 verbose #18033 > > trace Debug (fun () => "6") _locals
00:12:22 verbose #18034 > > (retries1, retries2) |> return
00:12:22 verbose #18035 > > |> async.new_async_unit
00:12:22 verbose #18036 > > |> async.run_with_timeout 20000
00:12:22 verbose #18037 > > |> function
00:12:22 verbose #18038 > > | Some (retries1, retries2) =>
00:12:22 verbose #18039 > > retries1
00:12:22 verbose #18040 > > |> _assert_between
00:12:22 verbose #18041 > > if runtime.is_windows () then 2i64 else 2
00:12:22 verbose #18042 > > if runtime.is_windows () then 5 else 1500
00:12:22 verbose #18043 > >
00:12:22 verbose #18044 > > retries2
00:12:22 verbose #18045 > > |> _assert_between
00:12:22 verbose #18046 > > if runtime.is_windows () then 80i64 else 80
00:12:22 verbose #18047 > > if runtime.is_windows () then 150 else 600
00:12:22 verbose #18048 > >
00:12:22 verbose #18049 > > true
00:12:22 verbose #18050 > > | _ => false
00:12:22 verbose #18051 > > |> _assert_eq true
00:12:33 verbose #18052 > >
00:12:33 verbose #18053 > > ╭─[ 10.52s - stdout ]──────────────────────────────────────────────────────────╮
00:12:33 verbose #18054 > > │ 00:00:00 debug #1 1 │
00:12:33 verbose #18055 > > │ 00:00:00 debug #2 _1 │
00:12:33 verbose #18056 > > │ 00:00:00 debug #3 2 │
00:12:33 verbose #18057 > > │ 00:00:00 debug #4 3 │
00:12:33 verbose #18058 > > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │
00:12:33 verbose #18059 > > │ System.AggregateException: One or more errors occurred. (No connection could │
00:12:33 verbose #18060 > > │ be made because the target machine actively refused it.) │
00:12:33 verbose #18061 > > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:12:33 verbose #18062 > > │ / timeout: None / status: True │
00:12:33 verbose #18063 > > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │
00:12:33 verbose #18064 > > │ System.AggregateException: One or more errors occurred. (No connection could │
00:12:33 verbose #18065 > > │ be made because the target machine actively refused it.) │
00:12:33 verbose #18066 > > │ 00:00:05 debug #8 _2 │
00:12:33 verbose #18067 > > │ 00:00:05 debug #9 _3 │
00:12:33 verbose #18068 > > │ 00:00:05 debug #10 4 │
00:12:33 verbose #18069 > > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:12:33 verbose #18070 > > │ / timeout: None / status: False │
00:12:33 verbose #18071 > > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │
00:12:33 verbose #18072 > > │ 100 / timeout: None / status: False │
00:12:33 verbose #18073 > > │ 00:00:07 debug #13 _4 │
00:12:33 verbose #18074 > > │ 00:00:07 debug #14 _5 │
00:12:33 verbose #18075 > > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │
00:12:33 verbose #18076 > > │ System.AggregateException: One or more errors occurred. (No connection could │
00:12:33 verbose #18077 > > │ be made because the target machine actively refused it.) │
00:12:33 verbose #18078 > > │ 00:00:09 debug #16 5 │
00:12:33 verbose #18079 > > │ 00:00:09 debug #17 6 │
00:12:33 verbose #18080 > > │ assert_between / actual: 2L / expected: struct (2L, 5L) │
00:12:33 verbose #18081 > > │ assert_between / actual: 120L / expected: struct (80L, 150L) │
00:12:33 verbose #18082 > > │ assert_eq / actual: true / expected: true │
00:12:33 verbose #18083 > > │ │
00:12:33 verbose #18084 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:33 verbose #18085 > >
00:12:33 verbose #18086 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:33 verbose #18087 > > //// test
00:12:33 verbose #18088 > >
00:12:33 verbose #18089 > > inl lock_port host port = async.new_async_unit fun () =>
00:12:33 verbose #18090 > > trace Debug (fun () => "_1") _locals
00:12:33 verbose #18091 > > async.sleep 500 |> async.do
00:12:33 verbose #18092 > > inl listener = new_tcp_listener (ip_address_parse host) port |> use
00:12:33 verbose #18093 > > trace Debug (fun () => "_2") _locals
00:12:33 verbose #18094 > > listener |> listener_start
00:12:33 verbose #18095 > > trace Debug (fun () => "_3") _locals
00:12:33 verbose #18096 > > async.sleep 200 |> async.do
00:12:33 verbose #18097 > > trace Debug (fun () => "_4") _locals
00:12:33 verbose #18098 > > listener |> listener_stop
00:12:33 verbose #18099 > > trace Debug (fun () => "_5") _locals
00:12:33 verbose #18100 > >
00:12:33 verbose #18101 > > inl host = "127.0.0.1"
00:12:33 verbose #18102 > > inl port = 5555
00:12:33 verbose #18103 > >
00:12:33 verbose #18104 > > fun () =>
00:12:33 verbose #18105 > > trace Debug (fun () => "1") _locals
00:12:33 verbose #18106 > > inl child = lock_port host port |> async.start_child |> async.let'
00:12:33 verbose #18107 > > trace Debug (fun () => "2") _locals
00:12:33 verbose #18108 > > async.sleep 1 |> async.do
00:12:33 verbose #18109 > > trace Debug (fun () => "3") _locals
00:12:33 verbose #18110 > > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port
00:12:33 verbose #18111 > > |> async.let'
00:12:33 verbose #18112 > > trace Debug (fun () => "4") _locals
00:12:33 verbose #18113 > > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host
00:12:33 verbose #18114 > > port |> async.let'
00:12:33 verbose #18115 > > trace Debug (fun () => "5") _locals
00:12:33 verbose #18116 > > child |> async.do
00:12:33 verbose #18117 > > trace Debug (fun () => "6") _locals
00:12:33 verbose #18118 > > (retries1, retries2) |> return
00:12:33 verbose #18119 > > |> async.new_async_unit
00:12:33 verbose #18120 > > |> async.run_with_timeout 2000
00:12:33 verbose #18121 > > |> function
00:12:33 verbose #18122 > > | Some (retries1, retries2) =>
00:12:33 verbose #18123 > > retries1
00:12:33 verbose #18124 > > |> _assert_between
00:12:33 verbose #18125 > > if runtime.is_windows () then 4i64 else 2
00:12:33 verbose #18126 > > if runtime.is_windows () then 15 else 150
00:12:33 verbose #18127 > >
00:12:33 verbose #18128 > > retries2
00:12:33 verbose #18129 > > |> _assert_between
00:12:33 verbose #18130 > > if runtime.is_windows () then 5i64 else 0
00:12:33 verbose #18131 > > if runtime.is_windows () then 20 else 60
00:12:33 verbose #18132 > >
00:12:33 verbose #18133 > > true
00:12:33 verbose #18134 > > | _ => false
00:12:33 verbose #18135 > > |> _assert_eq true
00:12:35 verbose #18136 > >
00:12:35 verbose #18137 > > ╭─[ 2.18s - stdout ]───────────────────────────────────────────────────────────╮
00:12:35 verbose #18138 > > │ 00:00:00 debug #1 1 │
00:12:35 verbose #18139 > > │ 00:00:00 debug #2 2 │
00:12:35 verbose #18140 > > │ 00:00:00 debug #3 _1 │
00:12:35 verbose #18141 > > │ 00:00:00 debug #4 3 │
00:12:35 verbose #18142 > > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │
00:12:35 verbose #18143 > > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:12:35 verbose #18144 > > │ / timeout: Some 60 / status: True │
00:12:35 verbose #18145 > > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:12:35 verbose #18146 > > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │
00:12:35 verbose #18147 > > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │
00:12:35 verbose #18148 > > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │
00:12:35 verbose #18149 > > │ 00:00:00 debug #11 run_with_timeout_async / timeout: 60 │
00:12:35 verbose #18150 > > │ 00:00:00 debug #12 _2 │
00:12:35 verbose #18151 > > │ 00:00:00 debug #13 _3 │
00:12:35 verbose #18152 > > │ 00:00:00 debug #14 4 │
00:12:35 verbose #18153 > > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:12:35 verbose #18154 > > │ / timeout: Some 60 / status: False │
00:12:35 verbose #18155 > > │ 00:00:00 debug #16 _4 │
00:12:35 verbose #18156 > > │ 00:00:00 debug #17 _5 │
00:12:35 verbose #18157 > > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │
00:12:35 verbose #18158 > > │ 00:00:00 debug #19 5 │
00:12:35 verbose #18159 > > │ 00:00:00 debug #20 6 │
00:12:35 verbose #18160 > > │ assert_between / actual: 6L / expected: struct (4L, 15L) │
00:12:35 verbose #18161 > > │ assert_between / actual: 11L / expected: struct (5L, 20L) │
00:12:35 verbose #18162 > > │ assert_eq / actual: true / expected: true │
00:12:35 verbose #18163 > > │ │
00:12:35 verbose #18164 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:35 verbose #18165 > >
00:12:35 verbose #18166 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:35 verbose #18167 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:35 verbose #18168 > > │ ## get_available_port │
00:12:35 verbose #18169 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:35 verbose #18170 > >
00:12:35 verbose #18171 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:35 verbose #18172 > > inl get_available_port timeout host initial_port : _ i32 =
00:12:35 verbose #18173 > > let rec loop port = async.new_async_unit fun () =>
00:12:35 verbose #18174 > > inl is_port_open =
00:12:35 verbose #18175 > > match timeout |> optionm'.unbox with
00:12:35 verbose #18176 > > | None => test_port_open host port
00:12:35 verbose #18177 > > | Some timeout => test_port_open_timeout timeout host port
00:12:35 verbose #18178 > > |> async.let'
00:12:35 verbose #18179 > > fix_condition
00:12:35 verbose #18180 > > fun () => is_port_open |> not
00:12:35 verbose #18181 > > fun () => port |> return
00:12:35 verbose #18182 > > fun () => loop (port + 1) |> async.return_await
00:12:35 verbose #18183 > > loop initial_port
00:12:35 verbose #18184 > >
00:12:35 verbose #18185 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:35 verbose #18186 > > //// test
00:12:35 verbose #18187 > >
00:12:35 verbose #18188 > > inl lock_ports host port = async.new_async_unit fun () =>
00:12:35 verbose #18189 > > trace Debug (fun () => "_1") _locals
00:12:35 verbose #18190 > > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:12:35 verbose #18191 > > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:12:35 verbose #18192 > > trace Debug (fun () => "_2") _locals
00:12:35 verbose #18193 > > listener1 |> listener_start
00:12:35 verbose #18194 > > listener2 |> listener_start
00:12:35 verbose #18195 > > trace Debug (fun () => "_3") _locals
00:12:35 verbose #18196 > > async.sleep 4000 |> async.do
00:12:35 verbose #18197 > > trace Debug (fun () => "_4") _locals
00:12:35 verbose #18198 > > listener1 |> listener_stop
00:12:35 verbose #18199 > > listener2 |> listener_stop
00:12:35 verbose #18200 > > trace Debug (fun () => "_5") _locals
00:12:35 verbose #18201 > >
00:12:35 verbose #18202 > > inl host = "127.0.0.1"
00:12:35 verbose #18203 > > inl port = 5555
00:12:35 verbose #18204 > >
00:12:35 verbose #18205 > > fun () =>
00:12:35 verbose #18206 > > trace Debug (fun () => "1") _locals
00:12:35 verbose #18207 > > inl child = lock_ports host port |> async.start_child |> async.let'
00:12:35 verbose #18208 > > trace Debug (fun () => "2") _locals
00:12:35 verbose #18209 > > async.sleep 240 |> async.do
00:12:35 verbose #18210 > > trace Debug (fun () => "3") _locals
00:12:35 verbose #18211 > > inl available_port = get_available_port (None |> optionm'.box) host port |>
00:12:35 verbose #18212 > > async.let'
00:12:35 verbose #18213 > > trace Debug (fun () => "4") _locals
00:12:35 verbose #18214 > > inl retries = wait_for_port_access (None |> optionm'.box) false host port |>
00:12:35 verbose #18215 > > async.let'
00:12:35 verbose #18216 > > trace Debug (fun () => "5") _locals
00:12:35 verbose #18217 > > child |> async.do
00:12:35 verbose #18218 > > trace Debug (fun () => "6") _locals
00:12:35 verbose #18219 > > (available_port, retries) |> return
00:12:35 verbose #18220 > > |> async.new_async_unit
00:12:35 verbose #18221 > > |> async.run_with_timeout 15000
00:12:35 verbose #18222 > > |> function
00:12:35 verbose #18223 > > | Some (available_port, retries) =>
00:12:35 verbose #18224 > > available_port |> _assert_eq (port + 2)
00:12:35 verbose #18225 > >
00:12:35 verbose #18226 > > retries
00:12:35 verbose #18227 > > |> _assert_between
00:12:35 verbose #18228 > > if runtime.is_windows () then 100i64 else 100
00:12:35 verbose #18229 > > if runtime.is_windows () then 150 else 1200
00:12:35 verbose #18230 > >
00:12:35 verbose #18231 > > true
00:12:35 verbose #18232 > > | _ => false
00:12:35 verbose #18233 > > |> _assert_eq true
00:12:42 verbose #18234 > >
00:12:42 verbose #18235 > > ╭─[ 7.24s - stdout ]───────────────────────────────────────────────────────────╮
00:12:42 verbose #18236 > > │ 00:00:00 debug #1 1 │
00:12:42 verbose #18237 > > │ 00:00:00 debug #2 _1 │
00:12:42 verbose #18238 > > │ 00:00:00 debug #3 2 │
00:12:42 verbose #18239 > > │ 00:00:00 debug #4 _2 │
00:12:42 verbose #18240 > > │ 00:00:00 debug #5 _3 │
00:12:42 verbose #18241 > > │ 00:00:00 debug #6 3 │
00:12:42 verbose #18242 > > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │
00:12:42 verbose #18243 > > │ System.AggregateException: One or more errors occurred. (No connection could │
00:12:42 verbose #18244 > > │ be made because the target machine actively refused it.) │
00:12:42 verbose #18245 > > │ 00:00:02 debug #8 4 │
00:12:42 verbose #18246 > > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:12:42 verbose #18247 > > │ / timeout: None / status: False │
00:12:42 verbose #18248 > > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │
00:12:42 verbose #18249 > > │ 100 / timeout: None / status: False │
00:12:42 verbose #18250 > > │ 00:00:03 debug #11 _4 │
00:12:42 verbose #18251 > > │ 00:00:04 debug #12 _5 │
00:12:42 verbose #18252 > > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │
00:12:42 verbose #18253 > > │ System.AggregateException: One or more errors occurred. (No connection could │
00:12:42 verbose #18254 > > │ be made because the target machine actively refused it.) │
00:12:42 verbose #18255 > > │ 00:00:06 debug #14 5 │
00:12:42 verbose #18256 > > │ 00:00:06 debug #15 6 │
00:12:42 verbose #18257 > > │ assert_eq / actual: 5557 / expected: 5557 │
00:12:42 verbose #18258 > > │ assert_between / actual: 109L / expected: struct (100L, 150L) │
00:12:42 verbose #18259 > > │ assert_eq / actual: true / expected: true │
00:12:42 verbose #18260 > > │ │
00:12:42 verbose #18261 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:42 verbose #18262 > >
00:12:42 verbose #18263 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:42 verbose #18264 > > //// test
00:12:42 verbose #18265 > >
00:12:42 verbose #18266 > > inl lock_ports host port = async.new_async_unit fun () =>
00:12:42 verbose #18267 > > trace Debug (fun () => "_1") _locals
00:12:42 verbose #18268 > > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:12:42 verbose #18269 > > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:12:42 verbose #18270 > > trace Debug (fun () => "_2") _locals
00:12:42 verbose #18271 > > listener1 |> listener_start
00:12:42 verbose #18272 > > listener2 |> listener_start
00:12:42 verbose #18273 > > trace Debug (fun () => "_3") _locals
00:12:42 verbose #18274 > > async.sleep 400 |> async.do
00:12:42 verbose #18275 > > trace Debug (fun () => "_4") _locals
00:12:42 verbose #18276 > > listener1 |> listener_stop
00:12:42 verbose #18277 > > listener2 |> listener_stop
00:12:42 verbose #18278 > > trace Debug (fun () => "_5") _locals
00:12:42 verbose #18279 > >
00:12:42 verbose #18280 > > inl host = "127.0.0.1"
00:12:42 verbose #18281 > > inl port = 5555
00:12:42 verbose #18282 > >
00:12:42 verbose #18283 > > fun () =>
00:12:42 verbose #18284 > > trace Debug (fun () => "1") _locals
00:12:42 verbose #18285 > > inl child = lock_ports host port |> async.start_child |> async.let'
00:12:42 verbose #18286 > > trace Debug (fun () => "2") _locals
00:12:42 verbose #18287 > > async.sleep 240 |> async.do
00:12:42 verbose #18288 > > trace Debug (fun () => "3") _locals
00:12:42 verbose #18289 > > inl available_port = get_available_port (Some 60 |> optionm'.box) host port
00:12:42 verbose #18290 > > |> async.let'
00:12:42 verbose #18291 > > trace Debug (fun () => "4") _locals
00:12:42 verbose #18292 > > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port
00:12:42 verbose #18293 > > |> async.let'
00:12:42 verbose #18294 > > trace Debug (fun () => "5") _locals
00:12:42 verbose #18295 > > child |> async.do
00:12:42 verbose #18296 > > trace Debug (fun () => "6") _locals
00:12:42 verbose #18297 > > (available_port, retries) |> return
00:12:42 verbose #18298 > > |> async.new_async_unit
00:12:42 verbose #18299 > > |> async.run_with_timeout 1500
00:12:42 verbose #18300 > > |> function
00:12:42 verbose #18301 > > | Some (available_port, retries) =>
00:12:42 verbose #18302 > > available_port |> _assert_eq (port + 2)
00:12:42 verbose #18303 > >
00:12:42 verbose #18304 > > retries
00:12:42 verbose #18305 > > |> _assert_between
00:12:42 verbose #18306 > > (if runtime.is_windows () then 2i64 else 1)
00:12:42 verbose #18307 > > (if runtime.is_windows () then 10 else 120)
00:12:42 verbose #18308 > >
00:12:42 verbose #18309 > > true
00:12:42 verbose #18310 > > | _ => false
00:12:42 verbose #18311 > > |> _assert_eq true
00:12:43 verbose #18312 > >
00:12:43 verbose #18313 > > ╭─[ 1.46s - stdout ]───────────────────────────────────────────────────────────╮
00:12:43 verbose #18314 > > │ 00:00:00 debug #1 1 │
00:12:43 verbose #18315 > > │ 00:00:00 debug #2 _1 │
00:12:43 verbose #18316 > > │ 00:00:00 debug #3 2 │
00:12:43 verbose #18317 > > │ 00:00:00 debug #4 _2 │
00:12:43 verbose #18318 > > │ 00:00:00 debug #5 _3 │
00:12:43 verbose #18319 > > │ 00:00:00 debug #6 3 │
00:12:43 verbose #18320 > > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:12:43 verbose #18321 > > │ 00:00:00 debug #8 4 │
00:12:43 verbose #18322 > > │ 00:00:00 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:12:43 verbose #18323 > > │ / timeout: Some 60 / status: False │
00:12:43 verbose #18324 > > │ 00:00:00 debug #10 _4 │
00:12:43 verbose #18325 > > │ 00:00:00 debug #11 _5 │
00:12:43 verbose #18326 > > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │
00:12:43 verbose #18327 > > │ 00:00:00 debug #13 5 │
00:12:43 verbose #18328 > > │ 00:00:00 debug #14 6 │
00:12:43 verbose #18329 > > │ assert_eq / actual: 5557 / expected: 5557 │
00:12:43 verbose #18330 > > │ assert_between / actual: 3L / expected: struct (2L, 10L) │
00:12:43 verbose #18331 > > │ assert_eq / actual: true / expected: true │
00:12:43 verbose #18332 > > │ │
00:12:43 verbose #18333 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:43 verbose #18334 > >
00:12:43 verbose #18335 > > ── markdown ────────────────────────────────────────────────────────────────────
00:12:43 verbose #18336 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:43 verbose #18337 > > │ ## main │
00:12:43 verbose #18338 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:43 verbose #18339 > >
00:12:43 verbose #18340 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:43 verbose #18341 > > inl main () =
00:12:43 verbose #18342 > > types ()
00:12:43 verbose #18343 > > init_trace_state None
00:12:43 verbose #18344 > > $'let test_port_open x = !test_port_open x' : ()
00:12:43 verbose #18345 > > $'let test_port_open_timeout x = !test_port_open_timeout x' : ()
00:12:43 verbose #18346 > > $'let wait_for_port_access x = !wait_for_port_access x' : ()
00:12:43 verbose #18347 > > $'let get_available_port x = !get_available_port x' : ()
00:12:45 verbose #18348 > 00:00:32 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 34338
00:12:45 verbose #18349 > 00:00:32 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:12:46 verbose #18350 > 00:00:34 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/networking.dib.ipynb to html
00:12:46 verbose #18351 > 00:00:34 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:12:46 verbose #18352 > 00:00:34 verbose #7 ! validate(nb)
00:12:48 verbose #18353 > 00:00:35 verbose #8 ! [NbConvertApp] Writing 367383 bytes to c:\home\git\polyglot\lib\spiral\networking.dib.html
00:12:48 verbose #18354 > 00:00:36 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 651
00:12:48 verbose #18355 > 00:00:36 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 651
00:12:48 verbose #18356 > 00:00:36 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:12:49 verbose #18357 > 00:00:36 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:12:49 verbose #18358 > 00:00:36 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:12:50 verbose #18359 > 00:00:37 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 35048
00:12:50 debug #18360 execute_with_options_async / exit_code: 0 / output.Length: 38709
00:12:50 debug #26 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path networking.dib --retries 3
00:12:50 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:12:50 debug #8 run_with_timeout_async / timeout: 100
00:00:00 debug #8 writeDibCode / output: Spi / path: common.dib
00:00:00 debug #8 writeDibCode / output: Spi / path: trace.dib
00:00:00 debug #8 writeDibCode / output: Spi / path: runtime.dib
00:00:00 debug #8 writeDibCode / output: Spi / path: networking.dib
00:00:00 debug #8 writeDibCode / output: Spi / path: testing.dib
00:00:00 debug #8 writeDibCode / output: Spi / path: threading.dib
00:00:00 debug #8 writeDibCode / output: Spi / path: async.dib
00:00:00 debug #8 writeDibCode / output: Spi / path: crypto.dib
00:00:00 debug #10 parseDibCode / output: Spi / file: networking.dib
00:00:00 debug #14 parseDibCode / output: Spi / file: testing.dib
00:00:00 debug #10 parseDibCode / output: Spi / file: async.dib
00:00:00 debug #12 parseDibCode / output: Spi / file: runtime.dib
00:00:00 debug #13 parseDibCode / output: Spi / file: common.dib
00:00:00 debug #15 parseDibCode / output: Spi / file: trace.dib
00:00:00 debug #16 parseDibCode / output: Spi / file: threading.dib
00:00:00 debug #11 parseDibCode / output: Spi / file: crypto.dib
00:00:00 debug #19 writeDibCode / output: Spi / path: base.dib
00:00:00 debug #19 writeDibCode / output: Spi / path: resultm.dib
00:00:00 debug #20 writeDibCode / output: Spi / path: console.dib
00:00:00 debug #21 writeDibCode / output: Spi / path: date_time.dib
00:00:00 debug #22 writeDibCode / output: Spi / path: file_system.dib
00:00:00 debug #19 writeDibCode / output: Spi / path: iter.dib
00:00:00 debug #24 parseDibCode / output: Spi / file: resultm.dib
00:00:00 debug #25 parseDibCode / output: Spi / file: console.dib
00:00:00 debug #23 parseDibCode / output: Spi / file: base.dib
00:00:00 debug #26 parseDibCode / output: Spi / file: date_time.dib
00:00:00 debug #27 parseDibCode / output: Spi / file: file_system.dib
00:00:00 debug #28 parseDibCode / output: Spi / file: iter.dib
00:00:00 debug #29 writeDibCode / output: Spi / path: guid.dib
00:00:00 debug #30 parseDibCode / output: Spi / file: guid.dib
00:00:00 debug #31 writeDibCode / output: Spi / path: math.dib
00:00:00 debug #32 parseDibCode / output: Spi / file: math.dib
00:00:00 debug #33 writeDibCode / output: Spi / path: optionm'.dib
00:00:00 debug #34 parseDibCode / output: Spi / file: optionm'.dib
00:00:00 debug #35 writeDibCode / output: Spi / path: am'.dib
00:00:00 debug #36 parseDibCode / output: Spi / file: am'.dib
00:00:00 debug #37 writeDibCode / output: Spi / path: sm'.dib
00:00:00 debug #38 parseDibCode / output: Spi / file: sm'.dib
00:00:00 debug #39 writeDibCode / output: Spi / path: listm'.dib
00:00:00 debug #41 parseDibCode / output: Spi / file: listm'.dib
00:00:00 debug #40 writeDibCode / output: Spi / path: stream.dib
00:00:00 debug #42 writeDibCode / output: Spi / path: seq.dib
00:00:00 debug #43 parseDibCode / output: Spi / file: stream.dib
00:00:00 debug #44 parseDibCode / output: Spi / file: seq.dib
00:00:00 debug #45 writeDibCode / output: Spi / path: util.dib
00:00:00 debug #46 parseDibCode / output: Spi / file: util.dib
00:00:00 debug #47 writeDibCode / output: Spi / path: benchmark.dib
00:00:00 debug #48 parseDibCode / output: Spi / file: benchmark.dib
00:00:00 debug #49 writeDibCode / output: Spi / path: rust.dib
00:00:00 debug #50 parseDibCode / output: Spi / file: rust.dib
00:00:00 debug #51 writeDibCode / output: Spi / path: physics.dib
00:00:00 debug #52 parseDibCode / output: Spi / file: physics.dib
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 500
00:00:02 debug #8 run_with_timeout_async / timeout: 500
00:00:02 debug #8 run_with_timeout_async / timeout: 500
00:00:02 debug #9 run_with_timeout_async / timeout: 500
00:00:02 debug #10 run_with_timeout_async / timeout: 500
00:00:02 debug #7 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #6 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #5 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #6 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #3 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #10 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #10 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #10 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #10 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #10 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 verbose #13 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # trace\n\n/// ## types\ninl types () =\n rust.types ()\n sm\u0027...0027let trace x = !trace x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result:
00:00:02 verbose #14 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # threading\nopen rust_operators\n\n/// ## types\ninl types () =\n gl...new_disposable_token x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result:
00:00:02 verbose #15 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # async\nopen rust_operators\n\n/// ## types\ninl types () =\n global...token_with_default_async x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result:
00:00:02 verbose #11 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # networking\nopen rust_operators\n\n/// ## types\ninl types () =\n g...!get_available_port x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result:
00:00:02 verbose #13 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # runtime\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## types\...t_args x = !split_args x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result:
00:00:02 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result:
00:00:02 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result:
00:00:02 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result:
00:00:02 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result:
00:00:02 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result:
00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/threading.spi
00:00:03 verbose #8 > 00:00:02 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/runtime.spi
00:00:03 verbose #9 > 00:00:02 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/trace.spi
00:00:03 verbose #10 > 00:00:02 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/networking.spi
00:00:03 verbose #11 > 00:00:02 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/async.spi
00:00:03 debug #21 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #21 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #23 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #24 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #22 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #27 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #27 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #27 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #28 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #29 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #31 buildFile / takeWhileInclusive / path: async.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]
#endif
type async_std_task_JoinHandle<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit...base.run_target / _v1=None"
v23
let v0 : (System.Threading.CancellationToken -> Async<System.Threading.CancellationToken>) = closure0()
let merge_cancellation_token_with_default_async x = v0 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #31 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]
#endif
type std_thread_JoinHandle<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::s...=None"
struct (v37, v38)
let v0 : (System.Threading.CancellationToken option -> struct (System.Threading.CancellationToken * System.IDisposable)) = closure0()
let new_disposable_token x = v0 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #32 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type core_ops_Try<'...osure0()
let v1 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v0 v1 |> Some
let v2 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure2()
let trace x = v2 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #33 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]
#endif
type reqwest_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuild...> (string -> (int32 -> Async<int64>)))) = closure15()
let wait_for_port_access x = v4 x
let v5 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure21()
let get_available_port x = v5 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #34 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #35 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #36 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #37 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #38 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]
#endif
type clap_Arg = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]
#endif
type clap_ArgA...std_sync_Mutex<std_process_ChildStdin>> -> unit) option * bool * string option)) = closure17()
let execution_options x = v6 x
let v7 : (string -> (string [])) = closure18()
let split_args x = v7 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #39 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 debug #11 run_with_timeout_async / timeout: 500
00:00:06 debug #40 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #41 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #12 run_with_timeout_async / timeout: 500
00:00:06 verbose #42 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # common\n\n/// ## types\ninl types () =\n env.types ()\n rust.typ...et memoize x = !memoize x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result:
00:00:06 debug #43 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #44 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 verbose #12 > 00:00:04 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/common.spi
00:00:06 verbose #45 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result:
00:00:06 verbose #46 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # crypto\nopen rust_operators\n\n/// ## types\ninl types () =\n globa...ash_text x = !hash_text x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result:
00:00:06 verbose #13 > 00:00:04 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/crypto.spi
00:00:06 verbose #47 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result:
00:00:06 debug #13 run_with_timeout_async / timeout: 500
00:00:06 debug #14 run_with_timeout_async / timeout: 500
00:00:06 debug #15 run_with_timeout_async / timeout: 500
00:00:06 debug #48 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #49 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #50 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #51 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #52 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #53 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 verbose #54 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # date_time\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## type... x = !format_iso8601 x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result:
00:00:06 verbose #55 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # file_system\nopen sm\u0027_operators\nopen rust_operators\n\n/// ## ty...003E) x = !combine x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result:
00:00:06 verbose #56 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # guid\n\n/// ## guid\nnominal guid = $\u0027System.Guid\u0027\n\n/// ##...aw_guid x = !new_raw_guid x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result:
00:00:06 verbose #14 > 00:00:05 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/date_time.spi
00:00:06 verbose #57 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result:
00:00:06 verbose #58 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result:
00:00:06 verbose #15 > 00:00:05 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/file_system.spi
00:00:06 verbose #16 > 00:00:05 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/guid.spi
00:00:06 verbose #59 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result:
00:00:06 debug #60 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type core_ops_Try<'... |> fun x -> _v1 <- Some x
let v39 : string = match _v1 with Some x -> x | None -> failwith "base.run_target / _v1=None"
v39
let v0 : (string -> string) = closure0()
let hash_text x = v0 x
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #61 buildFile / takeWhileInclusive / path: common.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]
#endi...()
let new_disposable x = v2 x
let v3 : (int32 -> ((unit -> unit) -> unit option)) = closure3()
let retry_fn x = v3 x
let v4 : ((unit -> unit) -> (unit -> unit)) = closure12()
let memoize x = v4 x
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #62 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 debug #63 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 debug #64 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: let rec closure0 () (v0 : string) : System.Guid =
let v1 : System.Guid = v0 |> System.Guid
v1
and closure1 () () : System.Guid =
let v0 : (unit -> System.Guid) = System.Guid.NewGuid
v0 ()
let v0 : (string -> System.Guid) = closure0()
let new_guid x = v0 x
let v1 : (unit -> System.Guid) = closure1()
let new_raw_guid x = v1 x
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #65 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 debug #66 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type core_ops_Try<'...t new_guid_from_timestamp x = v5 x
let v6 : (string -> (System.DateTime -> string)) = closure11()
let format x = v6 x
let v7 : (System.DateTime -> string) = closure13()
let format_iso8601 x = v7 x
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #67 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 debug #16 run_with_timeout_async / timeout: 500
00:00:07 debug #68 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:07 debug #69 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:07 verbose #70 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # sm\u0027\nopen rust_operators\n\n/// ## types\ninl types () =\n glo...tring std_string = from_std_string\n","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result:
00:00:07 debug #71 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]
#endif
type std_fs_File = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]
#endif
type ...ng) = closure57()
let get_workspace_root () = v18 ()
let v19 : (bool -> unit) = closure58()
let init_trace_file x = v19 x
let v20 : (string -> (string -> string)) = closure60()
let (</>) x = v20 x
()
/ errors: [] / typeErrorCount: 0
00:00:07 verbose #17 > 00:00:05 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/sm'.spi
00:00:07 verbose #72 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result:
00:00:07 debug #73 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:07 debug #74 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]
#endif
type core_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type core_ops_Try<'...tring)) = closure42()
let concat x = v20 x
let v21 : (string -> ((string []) -> string)) = closure44()
let join' x = v21 x
let v22 : (string -> (char [])) = closure46()
let to_char_array x = v22 x
()
/ errors: [] / typeErrorCount: 0
00:00:07 debug #75 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:07 verbose #17 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:07 debug #18 run_with_timeout_async / timeout: 100
In [ ]:
{ pwsh ../apps/scheduler/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../workspace/target/release/spiral_builder.exe dib --path Tasks.dib --retries 3",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Tasks.dib", "--retries", "3"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/scheduler/Tasks.dib", "--output-path", "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/scheduler/Tasks.dib" --output-path "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:04 verbose #10 > >
00:00:04 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:04 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:04 verbose #13 > > │ ## Tasks (Polyglot) │
00:00:04 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:04 verbose #15 > >
00:00:04 verbose #16 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:04 verbose #17 > > //// test
00:00:04 verbose #18 > >
00:00:04 verbose #19 > > open testing
00:00:04 verbose #20 > >
00:00:04 verbose #21 > > ── spiral - import ─────────────────────────────────────────────────────────────
00:00:04 verbose #22 > > #r
00:00:04 verbose #23 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #24 > > otNet.Interactive.Spiral.dll"
00:00:04 verbose #25 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:00:04 verbose #26 > > #r
00:00:04 verbose #27 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:04 verbose #28 > > otNet.Interactive.dll"
00:00:04 verbose #29 > > open type Microsoft.DotNet.Interactive.Kernel
00:00:08 verbose #30 > >
00:00:08 verbose #31 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 verbose #32 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 verbose #33 > > │ ## types │
00:00:08 verbose #34 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 verbose #35 > >
00:00:08 verbose #36 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 verbose #37 > > inl types () =
00:00:08 verbose #38 > > rust.types ()
00:00:08 verbose #39 > > sm'.types ()
00:00:09 verbose #40 > 00:00:08 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5511d5468be9fed5ed097108bef0268c55058733dc91249e3f198c656498a651/main.spi
00:00:12 verbose #41 > >
00:00:12 verbose #42 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 verbose #43 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 verbose #44 > > │ ## task_name │
00:00:12 verbose #45 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 verbose #46 > >
00:00:12 verbose #47 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 verbose #48 > > nominal task_name = string
00:00:13 verbose #49 > 00:00:12 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/98e9ddb8c04b8769bfd195eec77ff33aacef8adf9c73211d974c5c7aa99d52cf/main.spi
00:00:13 verbose #50 > >
00:00:13 verbose #51 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 verbose #52 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 verbose #53 > > │ ## manual_scheduling │
00:00:13 verbose #54 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 verbose #55 > >
00:00:13 verbose #56 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 verbose #57 > > union manual_scheduling =
00:00:13 verbose #58 > > | WithSuggestion
00:00:13 verbose #59 > > | WithoutSuggestion
00:00:14 verbose #60 > 00:00:13 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0f846052ff17a2bd43de78cda02e7c335f7c391e1b3cb629110c2faba5405339/main.spi
00:00:14 verbose #61 > >
00:00:14 verbose #62 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 verbose #63 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 verbose #64 > > │ ## recurrency_offset │
00:00:14 verbose #65 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 verbose #66 > >
00:00:14 verbose #67 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 verbose #68 > > union recurrency_offset =
00:00:14 verbose #69 > > | Days : i32
00:00:14 verbose #70 > > | Weeks : i32
00:00:14 verbose #71 > > | Months : i32
00:00:14 verbose #72 > 00:00:13 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/84b83718e46950e944143dd7f98939df744db89ea2e7c5fec551e21de33ed9b1/main.spi
00:00:15 verbose #73 > >
00:00:15 verbose #74 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 verbose #75 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 verbose #76 > > │ ## day_of_week │
00:00:15 verbose #77 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 verbose #78 > >
00:00:15 verbose #79 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 verbose #80 > > union day_of_week =
00:00:15 verbose #81 > > | Sunday
00:00:15 verbose #82 > > | Monday
00:00:15 verbose #83 > > | Tuesday
00:00:15 verbose #84 > > | Wednesday
00:00:15 verbose #85 > > | Thursday
00:00:15 verbose #86 > > | Friday
00:00:15 verbose #87 > > | Saturday
00:00:15 verbose #88 > 00:00:14 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/89164b695151934735c8e97f8491a871b4d4845cad3fceaa785531c67c37c879/main.spi
00:00:15 verbose #89 > >
00:00:15 verbose #90 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 verbose #91 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 verbose #92 > > │ ## month │
00:00:15 verbose #93 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 verbose #94 > >
00:00:15 verbose #95 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 verbose #96 > > union month =
00:00:15 verbose #97 > > | January
00:00:15 verbose #98 > > | February
00:00:15 verbose #99 > > | March
00:00:15 verbose #100 > > | April
00:00:15 verbose #101 > > | May
00:00:15 verbose #102 > > | June
00:00:15 verbose #103 > > | July
00:00:15 verbose #104 > > | August
00:00:15 verbose #105 > > | September
00:00:15 verbose #106 > > | October
00:00:15 verbose #107 > > | November
00:00:15 verbose #108 > > | December
00:00:16 verbose #109 > 00:00:15 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/97f850c436c9fd155abf96f4562aef67e0eee9f180b0f762899eb1ea86ae8e6c/main.spi
00:00:16 verbose #110 > >
00:00:16 verbose #111 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 verbose #112 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 verbose #113 > > │ ## day │
00:00:16 verbose #114 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 verbose #115 > >
00:00:16 verbose #116 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 verbose #117 > > nominal day = i32
00:00:17 verbose #118 > 00:00:16 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1bd5ca0905b615379ac214070c519993d5ff997c6ac65e547f40339b80966ef6/main.spi
00:00:17 verbose #119 > >
00:00:17 verbose #120 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 verbose #121 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 verbose #122 > > │ ## year │
00:00:17 verbose #123 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 verbose #124 > >
00:00:17 verbose #125 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 verbose #126 > > nominal year = i32
00:00:17 verbose #127 > 00:00:16 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6d79755f3678a8d3bc962269daa5fcf6fca6e7c56dbbb769f39fa85995a2d2f8/main.spi
00:00:18 verbose #128 > >
00:00:18 verbose #129 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 verbose #130 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 verbose #131 > > │ ## fixed_recurrency │
00:00:18 verbose #132 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 verbose #133 > >
00:00:18 verbose #134 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 verbose #135 > > union fixed_recurrency =
00:00:18 verbose #136 > > | Weekly : day_of_week
00:00:18 verbose #137 > > | Monthly : day
00:00:18 verbose #138 > > | Yearly : day * month
00:00:18 verbose #139 > 00:00:17 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2205a223e1d7a21e2e56d8126da4b76425b9160568783c7b7c965b76110cac9c/main.spi
00:00:18 verbose #140 > >
00:00:18 verbose #141 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 verbose #142 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 verbose #143 > > │ ## recurrency │
00:00:18 verbose #144 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 verbose #145 > >
00:00:18 verbose #146 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 verbose #147 > > union recurrency =
00:00:18 verbose #148 > > | Offset : recurrency_offset
00:00:18 verbose #149 > > | Fixed : list fixed_recurrency
00:00:19 verbose #150 > 00:00:18 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/353566bc449c392889277d2b2f62300a0610dd4b60ea4923c4400c1312b9c596/main.spi
00:00:19 verbose #151 > >
00:00:19 verbose #152 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 verbose #153 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 verbose #154 > > │ ## scheduling │
00:00:19 verbose #155 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 verbose #156 > >
00:00:19 verbose #157 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 verbose #158 > > union scheduling =
00:00:19 verbose #159 > > | Manual : manual_scheduling
00:00:19 verbose #160 > > | Recurrent : recurrency
00:00:20 verbose #161 > 00:00:19 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9cfaf578e1cf8e17fe3e029195569653591f762be367a8eafd7fe8eb30442dbc/main.spi
00:00:20 verbose #162 > >
00:00:20 verbose #163 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #164 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #165 > > │ ## task │
00:00:20 verbose #166 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #167 > >
00:00:20 verbose #168 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #169 > > type task =
00:00:20 verbose #170 > > {
00:00:20 verbose #171 > > name : task_name
00:00:20 verbose #172 > > scheduling : scheduling
00:00:20 verbose #173 > > }
00:00:20 verbose #174 > 00:00:19 debug #15 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/621e6e08d694eb6d7bfdddfbe50facd2f1d433babae0b6496bab8d99df3edb8c/main.spi
00:00:20 verbose #175 > >
00:00:20 verbose #176 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #177 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #178 > > │ ## date │
00:00:20 verbose #179 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #180 > >
00:00:20 verbose #181 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #182 > > type date =
00:00:20 verbose #183 > > {
00:00:20 verbose #184 > > year : year
00:00:20 verbose #185 > > month : month
00:00:20 verbose #186 > > day : day
00:00:20 verbose #187 > > }
00:00:21 verbose #188 > 00:00:20 debug #16 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/797553aafa3a62a67183e0642d2ea45f9123617cf4cb08f00ebcc560b5bec52f/main.spi
00:00:21 verbose #189 > >
00:00:21 verbose #190 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #191 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #192 > > │ ## status │
00:00:21 verbose #193 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #194 > >
00:00:21 verbose #195 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #196 > > union status =
00:00:21 verbose #197 > > | Postponed : option ()
00:00:22 verbose #198 > 00:00:21 debug #17 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ece83a259b756fd5c41b4aeae333bad2411ce5df6bc315fa1cf3960b0dc80f15/main.spi
00:00:22 verbose #199 > >
00:00:22 verbose #200 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:22 verbose #201 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:22 verbose #202 > > │ ## event │
00:00:22 verbose #203 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #204 > >
00:00:22 verbose #205 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #206 > > type event =
00:00:22 verbose #207 > > {
00:00:22 verbose #208 > > date : date
00:00:22 verbose #209 > > status : status
00:00:22 verbose #210 > > }
00:00:22 verbose #211 > 00:00:21 debug #18 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e0f4234551693f60b1cef493aa8096cab34b09982b662f2fb3d04c6782579e6f/main.spi
00:00:22 verbose #212 > >
00:00:22 verbose #213 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:22 verbose #214 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:22 verbose #215 > > │ ## task_template │
00:00:22 verbose #216 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 verbose #217 > >
00:00:22 verbose #218 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:22 verbose #219 > > type task_template =
00:00:22 verbose #220 > > {
00:00:22 verbose #221 > > task : task
00:00:22 verbose #222 > > events : list event
00:00:22 verbose #223 > > }
00:00:23 verbose #224 > 00:00:22 debug #19 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/992671a734689e9f5b05323e539f3e0d13a70a7f634ad896f526a1b8dd441c31/main.spi
00:00:23 verbose #225 > >
00:00:23 verbose #226 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:23 verbose #227 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:23 verbose #228 > > │ ## get_tasks (test) │
00:00:23 verbose #229 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 verbose #230 > >
00:00:23 verbose #231 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:23 verbose #232 > > //// test
00:00:23 verbose #233 > >
00:00:23 verbose #234 > > inl get_tasks () : list task_template =
00:00:23 verbose #235 > > [[
00:00:23 verbose #236 > > {
00:00:23 verbose #237 > > task =
00:00:23 verbose #238 > > {
00:00:23 verbose #239 > > name = task_name "01"
00:00:23 verbose #240 > > scheduling = Manual WithSuggestion
00:00:23 verbose #241 > > }
00:00:23 verbose #242 > > events = [[]]
00:00:23 verbose #243 > > }
00:00:23 verbose #244 > > {
00:00:23 verbose #245 > > task =
00:00:23 verbose #246 > > {
00:00:23 verbose #247 > > name = task_name "02"
00:00:23 verbose #248 > > scheduling = Manual WithSuggestion
00:00:23 verbose #249 > > }
00:00:23 verbose #250 > > events = [[]]
00:00:23 verbose #251 > > }
00:00:23 verbose #252 > > {
00:00:23 verbose #253 > > task =
00:00:23 verbose #254 > > {
00:00:23 verbose #255 > > name = task_name "03"
00:00:23 verbose #256 > > scheduling = Manual WithSuggestion
00:00:23 verbose #257 > > }
00:00:23 verbose #258 > > events = [[]]
00:00:23 verbose #259 > > }
00:00:23 verbose #260 > > ]]
00:00:23 verbose #261 > 00:00:22 debug #20 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3710c513ae0af6896ec09b13a42eb231949124aaca4657cbfcfeccdbce150c56/main.spi
00:00:24 verbose #262 > >
00:00:24 verbose #263 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:24 verbose #264 > > //// test
00:00:24 verbose #265 > > ///! rust
00:00:24 verbose #266 > >
00:00:24 verbose #267 > > types ()
00:00:24 verbose #268 > > get_tasks ()
00:00:24 verbose #269 > > |> sm'.format_pretty'
00:00:24 verbose #270 > > |> sm'.from_std_string
00:00:24 verbose #271 > > |> _assert_string_contains "01"
00:00:24 verbose #272 > 00:00:23 debug #21 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2939df7cb5478584d8d1ab9a59eea22404ee47813bec8372fb3967fd6364e15b/main.spi
00:00:47 verbose #273 > >
00:00:47 verbose #274 > > ╭─[ 23.09s - return value ]────────────────────────────────────────────────────╮
00:00:47 verbose #275 > > │ assert_string_contains / actual: "01" / expected: "UH2_1( │
00:00:47 verbose #276 > > │ UH0_0, │
00:00:47 verbose #277 > > │ "01", │
00:00:47 verbose #278 > > │ US4_0( │
00:00:47 verbose #279 > > │ US3_0, │
00:00:47 verbose #280 > > │ ), │
00:00:47 verbose #281 > > │ UH2_1( │
00:00:47 verbose #282 > > │ UH0_0, │
00:00:47 verbose #283 > > │ "02", │
00:00:47 verbose #284 > > │ US4_0( │
00:00:47 verbose #285 > > │ US3_0, │
00:00:47 verbose #286 > > │ ), │
00:00:47 verbose #287 > > │ UH2_1( │
00:00:47 verbose #288 > > │ UH0_0, │
00:00:47 verbose #289 > > │ "03", │
00:00:47 verbose #290 > > │ US4_0( │
00:00:47 verbose #291 > > │ US3_0, │
00:00:47 verbose #292 > > │ ), │
00:00:47 verbose #293 > > │ UH2_0, │
00:00:47 verbose #294 > > │ ), │
00:00:47 verbose #295 > > │ ), │
00:00:47 verbose #296 > > │ )" │
00:00:47 verbose #297 > > │ │
00:00:47 verbose #298 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:47 verbose #299 > >
00:00:47 verbose #300 > > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:47 verbose #301 > > //// test
00:00:47 verbose #302 > > ///! rust
00:00:47 verbose #303 > >
00:00:47 verbose #304 > > get_tasks ()
00:00:47 verbose #305 > > |> listm'.try_item 0i32
00:00:47 verbose #306 > > |> fun (Some task) => task.task.name
00:00:47 verbose #307 > > |> _assert_eq (task_name "01")
00:00:47 verbose #308 > 00:00:46 debug #22 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/670f824af0f591cbdb52b3a66cd8daff21f5802bcfbb93a7887f4e19f5af3825/main.spi
00:01:07 verbose #309 > >
00:01:07 verbose #310 > > ╭─[ 20.65s - return value ]────────────────────────────────────────────────────╮
00:01:07 verbose #311 > > │ assert_eq / actual: "01" / expected: "01" │
00:01:07 verbose #312 > > │ │
00:01:07 verbose #313 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:07 verbose #314 > 00:01:05 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12363
00:01:07 verbose #315 > 00:01:05 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:10 verbose #316 > 00:01:08 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb to html
00:01:10 verbose #317 > 00:01:08 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:10 verbose #318 > 00:01:08 verbose #7 ! validate(nb)
00:01:11 verbose #319 > 00:01:09 verbose #8 ! [NbConvertApp] Writing 299994 bytes to c:\home\git\polyglot\apps\scheduler\Tasks.dib.html
00:01:11 verbose #320 > 00:01:09 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649
00:01:11 verbose #321 > 00:01:09 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649
00:01:11 verbose #322 > 00:01:09 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:12 verbose #323 > 00:01:10 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:12 verbose #324 > 00:01:10 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:13 verbose #325 > 00:01:10 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 13071
00:01:13 debug #326 execute_with_options_async / exit_code: 0 / output.Length: 15893
00:01:13 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Tasks.dib --retries 3
00:01:13 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:01:13 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Spi / path: Tasks.dib
00:00:00 debug #2 parseDibCode / output: Spi / file: Tasks.dib
In [ ]:
{ pwsh ../apps/chat/build.ps1 } | Invoke-Block
Finished `release` profile [optimized] target(s) in 1.74s Compiling proc-macro2 v1.0.83 Compiling crossbeam-utils v0.8.20 Compiling quote v1.0.36 Compiling secp256k1-sys v0.8.1 Compiling syn v2.0.65 Compiling syn v1.0.109 Compiling crossbeam-channel v0.5.13 Compiling proc-macro-error-attr v1.0.4 Compiling borsh-schema-derive-internal v0.9.3 Compiling borsh-derive-internal v0.9.3 Compiling darling_core v0.20.9 Compiling proc-macro-error v1.0.4 Compiling serde_derive_internals v0.29.1 Compiling secp256k1 v0.27.0 Compiling prost-derive v0.9.0 Compiling strum_macros v0.24.3 Compiling derive_more v0.99.17 Compiling smart-default v0.6.0 Compiling clap_derive v3.2.25 Compiling serde_derive v1.0.202 Compiling tokio-macros v2.2.0 Compiling thiserror-impl v1.0.61 Compiling tracing-attributes v0.1.27 Compiling tokio v1.37.0 Compiling thiserror v1.0.61 Compiling syn_derive v0.1.8 Compiling pin-project-internal v1.1.5 Compiling darling_macro v0.20.9 Compiling tokio-util v0.7.11 Compiling prost v0.9.0 Compiling tokio-stream v0.1.15 Compiling prost-types v0.9.0 Compiling serde v1.0.202 Compiling derive_arbitrary v1.3.2 Compiling enum-map-derive v0.17.0 Compiling async-trait v0.1.80 Compiling serde_json v1.0.117 Compiling hex v0.4.3 Compiling num-rational v0.3.2 Compiling prost-build v0.9.0 Compiling tracing v0.1.40 Compiling h2 v0.3.26 Compiling strum v0.24.1 Compiling curve25519-dalek-derive v0.1.1 Compiling borsh-derive v1.5.0 Compiling pin-project v1.1.5 Compiling serde_repr v0.1.19 Compiling hyper v0.14.28 Compiling enum-map v2.7.3 Compiling tonic-build v0.6.2 Compiling arbitrary v1.3.2 Compiling uint v0.9.5 Compiling tokio-io-timeout v1.2.0 Compiling darling v0.20.9 Compiling async-stream-impl v0.3.5 Compiling serde_with_macros v3.8.1 Compiling opentelemetry-otlp v0.10.0 Compiling opentelemetry v0.17.0 Compiling hyper-timeout v0.4.1 Compiling primitive-types v0.10.1 Compiling tracing-futures v0.2.5 Compiling tower v0.4.13 Compiling tracing-subscriber v0.3.18 Compiling curve25519-dalek v4.1.2 Compiling ed25519-dalek v2.1.1 Compiling near-config-utils v0.20.1 Compiling tokio-util v0.6.10 Compiling serde_yaml v0.9.34+deprecated Compiling actix-rt v2.9.0 Compiling actix-macros v0.2.4 Compiling actix_derive v0.6.1 Compiling clap_derive v4.5.4 Compiling openssl-macros v0.1.1 Compiling async-stream v0.3.5 Compiling tonic v0.6.2 Compiling borsh v1.5.0 Compiling serde_with v3.8.1 Compiling tracing-opentelemetry v0.17.4 Compiling near-account-id v1.0.0 Compiling near-crypto v0.20.1 Compiling tracing-appender v0.2.3 Compiling near-primitives-core v0.20.1 Compiling opentelemetry-semantic-conventions v0.9.0 Compiling url v2.5.0 Compiling openssl v0.10.64 Compiling actix v0.13.3 Compiling near-parameters v0.20.1 Compiling near-fmt v0.20.1 Compiling chrono v0.4.38 Compiling semver v1.0.23 Compiling near-rpc-error-core v0.20.1 Compiling toml v0.5.11 Compiling prometheus v0.13.4 Compiling proc-macro-crate v0.1.5 Compiling near-vm-runner v0.20.1 Compiling near-rpc-error-macro v0.20.1 Compiling bytesize v1.3.0 Compiling scroll_derive v0.11.1 Compiling schemars_derive v0.8.20 Compiling borsh-derive v0.9.3 Compiling clap v4.5.4 Compiling camino v1.1.7 Compiling string_cache v0.8.7 Compiling cargo-platform v0.1.8 Compiling elementtree v0.7.0 Compiling ureq v2.9.7 Compiling serde_urlencoded v0.7.1 Compiling zip v0.5.13 Compiling native-tls v0.2.11 Compiling binary-install v0.2.0 Compiling tokio-native-tls v0.3.1 Compiling cargo_metadata v0.14.2 Compiling hyper-tls v0.5.0 Compiling rustc_version v0.4.0 Compiling clap v3.2.25 Compiling near-sandbox-utils v0.7.0 Compiling reqwest v0.11.27 Compiling cargo_metadata v0.18.1 Compiling tokio-retry v0.3.0 Compiling json-patch v1.4.0 Compiling near-token v0.2.0 Compiling scroll v0.11.0 Compiling goblin v0.5.4 Compiling symbolic-debuginfo v8.8.0 Compiling near-o11y v0.20.1 Compiling borsh v0.9.3 Compiling schemars v0.8.20 Compiling near-abi v0.3.0 Compiling near-gas v0.2.5 Compiling near-primitives v0.20.1 Compiling cargo-near v0.3.1 Compiling near-chain-configs v0.20.1 Compiling near-jsonrpc-primitives v0.20.1 Compiling near-jsonrpc-client v0.8.0 Compiling near-workspaces v0.10.0 Compiling chat_contract_tests v0.0.1 (/mnt/c/home/git/polyglot/apps/chat/contract/tests) Finished `release` profile [optimized] target(s) in 10m 28s Running `/mnt/c/home/git/polyglot/workspace/target/release/chat_contract_tests` Updated the logging layer according to `log_config.json` new: ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5282857260330, }, transaction: ExecutionOutcome { transaction_hash: HkUqAN7wJTuCWALJeTV1Bp9vU8ZsBX1Ua9kSimPa6ZrJ, block_hash: 289yhjAZYqvc6JuqUuqQSo22G6ko3Edbic79MQxxGaeR, logs: [], receipt_ids: [ Gn4Je5EcNMqFWTgu51uTbXmDcdYhU99kqZD8wsZ1SFaa, ], gas_burnt: NearGas { inner: 2427927707802, }, tokens_burnt: NearToken { inner: 242792770780200000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessReceiptId(Gn4Je5EcNMqFWTgu51uTbXmDcdYhU99kqZD8wsZ1SFaa), }, receipts: [ ExecutionOutcome { transaction_hash: Gn4Je5EcNMqFWTgu51uTbXmDcdYhU99kqZD8wsZ1SFaa, block_hash: 289yhjAZYqvc6JuqUuqQSo22G6ko3Edbic79MQxxGaeR, logs: [], receipt_ids: [ J7Cb7tdGxAGVN1tLyNvPRdCvQoHbKNzRamBEgyCQ1Ajr, ], gas_burnt: NearGas { inner: 2631746990028, }, tokens_burnt: NearToken { inner: 263174699002800000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: J7Cb7tdGxAGVN1tLyNvPRdCvQoHbKNzRamBEgyCQ1Ajr, block_hash: Bj8NwK4yb9QNmHa7jTATRuN2tenR71bpszhWY6qaFHQB, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.0035289486499004395 outcome (success: true): outcome_gas_burnt_usd: 0.001621855708811736 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.001758006989338704 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(contract, ''): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5279558708764, }, transaction: ExecutionOutcome { transaction_hash: CANVaDjAXJbBzp1vYu1Fw2egSvA2MVNs9vMnAvnQP6gd, block_hash: 9Eip1HGsu65vddVCMzWLMPNTEYVNuSUCwPusz9kES8Wo, logs: [], receipt_ids: [ 5v8UfomcSHMuUiddkq3CpAZGRYw59ts8thvetbte4zY, ], gas_burnt: NearGas { inner: 2427972426482, }, tokens_burnt: NearToken { inner: 242797242648200000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessReceiptId(5v8UfomcSHMuUiddkq3CpAZGRYw59ts8thvetbte4zY), }, receipts: [ ExecutionOutcome { transaction_hash: 5v8UfomcSHMuUiddkq3CpAZGRYw59ts8thvetbte4zY, block_hash: 9Eip1HGsu65vddVCMzWLMPNTEYVNuSUCwPusz9kES8Wo, logs: [ "claim_alias / alias: \"\" / account_id: AccountId(\n \"dev-20240521021658-57257133607338\",\n) / timestamp: 1716257820358531686", ], receipt_ids: [ 6QxQC9B2X2tH2WApAhGAfpNJ7XzbX5jCmuV3VGcdtEKF, ], gas_burnt: NearGas { inner: 2628403719782, }, tokens_burnt: NearToken { inner: 262840371978200000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: Invalid alias")) })), }, ExecutionOutcome { transaction_hash: 6QxQC9B2X2tH2WApAhGAfpNJ7XzbX5jCmuV3VGcdtEKF, block_hash: 29ifWKcQSgXFL76jAWcd9j8K5NqwG6ukDqeSCsDS7gZ5, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ], status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: Invalid alias")) })), } total_gas_burnt_usd: 0.0035267452174543514 outcome (success: true): outcome_gas_burnt_usd: 0.001621885580889976 outcome_tokens_burnt_usd: 0.0 outcome (success: false): outcome_gas_burnt_usd: 0.001755773684814376 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 dev_create_account(account1): Account { id: AccountId( "dev-20240521021700-97937882496481", ), } generate_cid_borsh(account1): ViewResultDetails { result: [ 59, 0, 0, 0, 98, 97, 102, 107, 114, 101, 105, 104, 100, 119, 100, 99, 101, 102, 103, 104, 52, 100, 113, 107, 106, 118, 54, 55, 117, 122, 99, 109, 119, 55, 111, 106, 101, 101, 54, 120, 101, 100, 122, 100, 101, 116, 111, 106, 117, 122, 106, 101, 118, 116, 101, 110, 120, 113, 117, 118, 121, 107, 117, ], logs: [], } claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5700176277529, }, transaction: ExecutionOutcome { transaction_hash: HkTLuo7XApfPawXbnPStFatvam9fEQ8gd16eRTUco5Hr, block_hash: GSHHxxb4x8FYp91QApUUxSDzb65qzT3XHxxAG4cyPHiT, logs: [], receipt_ids: [ B7Z3VtstrhfxWdy9BFG7qQpDL1GF5kpjhH1WXQhtruDK, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessReceiptId(B7Z3VtstrhfxWdy9BFG7qQpDL1GF5kpjhH1WXQhtruDK), }, receipts: [ ExecutionOutcome { transaction_hash: B7Z3VtstrhfxWdy9BFG7qQpDL1GF5kpjhH1WXQhtruDK, block_hash: BZu7awvER9ejsXv2CSJALAjx6MvactZpfhheFpSNHbgJ, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240521021700-97937882496481\",\n) / timestamp: 1716257822585484577", ], receipt_ids: [ 6moW76BZchzjBJX98w5wDz7dPLj3FU4F7pzk2DSMLMJp, ], gas_burnt: NearGas { inner: 3049007872943, }, tokens_burnt: NearToken { inner: 304900787294300000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 6moW76BZchzjBJX98w5wDz7dPLj3FU4F7pzk2DSMLMJp, block_hash: DPEMmUEBki6bgHBD5SUd2owKEsuavqmrVHPL1PyNgRb8, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.003807717753389372 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0020367372591259237 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5524492644766, }, transaction: ExecutionOutcome { transaction_hash: DLuyqzJ8DsfA73YRRhRk5cmVvK1qfGf5hrFyXz7g5eHW, block_hash: BjCcApLdPKyB7bK8Kvtn7ciiqcbRYTN6ULZ2SWPJzQSv, logs: [], receipt_ids: [ 5rwh3pPXFKQS9WGLmmby62N8mn6Fq1vFiybfrfhvDezo, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessReceiptId(5rwh3pPXFKQS9WGLmmby62N8mn6Fq1vFiybfrfhvDezo), }, receipts: [ ExecutionOutcome { transaction_hash: 5rwh3pPXFKQS9WGLmmby62N8mn6Fq1vFiybfrfhvDezo, block_hash: GJaZkmCJHztnnnrLvqdfpAwYQHahqgGujhUzouRvpeWT, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240521021700-97937882496481\",\n) / timestamp: 1716257823596870774", "Alias already claimed", ], receipt_ids: [ 2yFEXTjhsbqx5ADutVmHKRRcEFDQcZD193ussw3y9Pvg, ], gas_burnt: NearGas { inner: 2873324240180, }, tokens_burnt: NearToken { inner: 287332424018000000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 2yFEXTjhsbqx5ADutVmHKRRcEFDQcZD193ussw3y9Pvg, block_hash: 5i1d6wi71DZiK9ahLhPiyKxnFtrB7NWb9m5HEH7jWe4W, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.003690361086703688 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0019193805924402401 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", ( 1716257822585484577, 0, ), ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240521021700-97937882496481", ): ( 1716257822585484577, 0, ), }, ) dev_create_account(account2): Account { id: AccountId( "dev-20240521021704-55439319348812", ), } claim_alias(alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5787526057159, }, transaction: ExecutionOutcome { transaction_hash: S3YrKJnSDuaQVRTrRiXDMgegkfbr2ShmocHb5YjCYw4, block_hash: GLVzNLYSNnYXrJxxp2Hgrt2oriQ6hmTqjXaH3yns4uh3, logs: [], receipt_ids: [ udGF8pYA95Qd6DgVmb2U6j8Acd4Arw75CKQmmEXD6xa, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240521021704-55439319348812", ), status: SuccessReceiptId(udGF8pYA95Qd6DgVmb2U6j8Acd4Arw75CKQmmEXD6xa), }, receipts: [ ExecutionOutcome { transaction_hash: udGF8pYA95Qd6DgVmb2U6j8Acd4Arw75CKQmmEXD6xa, block_hash: CRUQLaB2HyFpDSr1uZoKGDHwNVygQmzAC7dPpKpqq5r1, logs: [ "claim_alias / alias: \"alias2\" / account_id: AccountId(\n \"dev-20240521021704-55439319348812\",\n) / timestamp: 1716257825628924026", ], receipt_ids: [ FFP39diRDd95JJs1kM9ta6bU7GvhV4vg9VCaLxHeB1Sr, ], gas_burnt: NearGas { inner: 3136357652573, }, tokens_burnt: NearToken { inner: 313635765257300000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: FFP39diRDd95JJs1kM9ta6bU7GvhV4vg9VCaLxHeB1Sr, block_hash: 9mwLbbRzAX9cKyPvRdRi7rCm4Zs4Yf6mPBsRhRay1rs2, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021704-55439319348812", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.0038660674061822124 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.002095086911918764 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias2", ( 1716257825628924026, 0, ), ), ) get_alias_map_borsh(alias2): Some( { AccountId( "dev-20240521021704-55439319348812", ): ( 1716257825628924026, 0, ), }, ) claim_alias(account2, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6091991917582, }, transaction: ExecutionOutcome { transaction_hash: 8hKZaAsS7p5XmRc5tUoVn1Pjzi17RZD1LnA9V4DQkgZm, block_hash: 4zbqdVhNJuLPahSLeVhsp2UEmAr9tGbvdeFJMxLmefpo, logs: [], receipt_ids: [ 2GP7rbj5rjf5Yegk2MvixBkSyNBTQ981hc9Ws4Lfua5g, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240521021704-55439319348812", ), status: SuccessReceiptId(2GP7rbj5rjf5Yegk2MvixBkSyNBTQ981hc9Ws4Lfua5g), }, receipts: [ ExecutionOutcome { transaction_hash: 2GP7rbj5rjf5Yegk2MvixBkSyNBTQ981hc9Ws4Lfua5g, block_hash: FJZPa5y41oVxXeW7WmuxQmWSQf2MLZbRNXsk5f4G9UCi, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240521021704-55439319348812\",\n) / timestamp: 1716257826641259203", ], receipt_ids: [ 6FEbqm9jMVXaiT3oXuwJXYWW2Dr2E9YtntEaxMmarMpG, ], gas_burnt: NearGas { inner: 3440823512996, }, tokens_burnt: NearToken { inner: 344082351299600000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 6FEbqm9jMVXaiT3oXuwJXYWW2Dr2E9YtntEaxMmarMpG, block_hash: 4RHD3uDqzC4QLHRQqo3a5jwGB4VJ33mnMdsHbTGzXoZJ, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021704-55439319348812", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004069450600944775 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0022984701066813278 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias1", ( 1716257826641259203, 1, ), ), ) get_alias_map(account2, alias1): Some( { AccountId( "dev-20240521021704-55439319348812", ): ( 1716257826641259203, 1, ), AccountId( "dev-20240521021700-97937882496481", ): ( 1716257822585484577, 0, ), }, ) get_alias_map(account2, alias2): Some( {}, ) claim_alias(account1, alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6086666217994, }, transaction: ExecutionOutcome { transaction_hash: 68fxqYKQcB1BjohrVYa2GnJJfWxf2gctGoFYbUnNdZ2S, block_hash: 4wRnULbTfxZqGrjTugGFvXLe4HbpZR76s5GVNN1Njvmj, logs: [], receipt_ids: [ 8sSr1pCqEFH2WAxCvXih4art77kbTRttjxenWYEw3ufF, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessReceiptId(8sSr1pCqEFH2WAxCvXih4art77kbTRttjxenWYEw3ufF), }, receipts: [ ExecutionOutcome { transaction_hash: 8sSr1pCqEFH2WAxCvXih4art77kbTRttjxenWYEw3ufF, block_hash: 5u5gHboFWMBhUR1KNDXxu1iHxx9RDJSeZwDgNp7qYcU3, logs: [ "claim_alias / alias: \"alias2\" / account_id: AccountId(\n \"dev-20240521021700-97937882496481\",\n) / timestamp: 1716257827654671380", ], receipt_ids: [ DGxrd7fDGK1Uo7GRGHiu5WNaw7djDkEiAFmWUoyKeKuC, ], gas_burnt: NearGas { inner: 3435497813408, }, tokens_burnt: NearToken { inner: 343549781340800000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: DGxrd7fDGK1Uo7GRGHiu5WNaw7djDkEiAFmWUoyKeKuC, block_hash: DjozfAKAiTG2ahJ11277LY9DEiQLUd2p3mnUGhbNrkqW, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.0040658930336199915 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.002294912539356544 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias2", ( 1716257827654671380, 0, ), ), ) get_alias_map(account1, alias2): Some( { AccountId( "dev-20240521021700-97937882496481", ): ( 1716257827654671380, 0, ), }, ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240521021704-55439319348812", ): ( 1716257826641259203, 1, ), }, ) claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6092014954750, }, transaction: ExecutionOutcome { transaction_hash: 2EAYUsQKkxio3e9ixZoNunGJA8fnnsBRq4zPcCYYZX9o, block_hash: 4ufeYJQLu1ohQgLkwc3TM1zTAsUw5eneYe9vgjXfXpRN, logs: [], receipt_ids: [ EScn3KCPffZmaFExuNyEfDYMd72K9DytDzK43A2Dx89t, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessReceiptId(EScn3KCPffZmaFExuNyEfDYMd72K9DytDzK43A2Dx89t), }, receipts: [ ExecutionOutcome { transaction_hash: EScn3KCPffZmaFExuNyEfDYMd72K9DytDzK43A2Dx89t, block_hash: C78KPLg6ykbVmDFPbG9tRGnqBuVaJHDaLrM48UycwT91, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240521021700-97937882496481\",\n) / timestamp: 1716257828666185456", ], receipt_ids: [ 5rqRMYRgXbXZ5uegZUUw3rq9w15bGa2NvJSdq8R7Tufc, ], gas_burnt: NearGas { inner: 3440846550164, }, tokens_burnt: NearToken { inner: 344084655016400000000, }, executor_id: AccountId( "dev-20240521021658-57257133607338", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 5rqRMYRgXbXZ5uegZUUw3rq9w15bGa2NvJSdq8R7Tufc, block_hash: 4htH3JASEhRywZ8y1LQ5PLUcvYgCfaVuETgdWdktzJLo, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240521021700-97937882496481", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004069465989773 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0022984854955095516 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", ( 1716257828666185456, 1, ), ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240521021700-97937882496481", ): ( 1716257828666185456, 1, ), AccountId( "dev-20240521021704-55439319348812", ): ( 1716257826641259203, 0, ), }, ) get_alias_map(account1, alias2): Some( {}, )
In [ ]:
{ pwsh ../apps/spiral/temp/extension/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c) Checked 11 installs across 13 packages (no changes) [171.00ms] [INFO]: 🎯 Checking for the Wasm target... [INFO]: 🌀 Compiling to Wasm... Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.53s [INFO]: ⬇️ Installing wasm-bindgen... [INFO]: Optional field missing from Cargo.toml: 'description'. This is not necessary, but recommended [INFO]: origin crate has no LICENSE [INFO]: ✨ Done in 5.06s [INFO]: 📦 Your wasm pkg is ready to publish at C:\home\git\polyglot\apps\spiral\temp\extension\pkg. ▲ [WARNING] "import.meta" is not available with the "iife" output format and will be empty [empty-import-meta] pkg/spiral_temp_extension.js:1504:57: 1504 │ ...put = new URL('spiral_temp_extension_bg.wasm', import.meta.url); ╵ ~~~~~~~~~~~ You need to set the output format to "esm" for "import.meta" to work correctly. 1 warning dist\spiral_temp_extension_bg-UAUTC6GG.wasm 4.5mb ⚠️ dist\devtools.js 29.0kb dist\content_script.js 27.4kb dist\service_worker.js 2.2kb ⚡ Done in 157ms $ playwright test [WebServer] (node:13736) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Running 3 tests using 3 workers [1/3] [Desktop Chrome] › extension.spec.ts:8:5 › popup extension [2/3] [Desktop Chrome] › extension.spec.ts:13:5 › libgen [3/3] [Desktop Chrome] › extension.spec.ts:3:5 › popup localhost 3 passed (15.2s) To open last HTML report run: npx playwright show-report
In [ ]:
{ pwsh ../apps/spiral/temp/test/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../../../workspace/target/release/spiral_builder.exe dib --path build.dib",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "build.dib"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/temp/test/build.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/temp/test/build.dib" --output-path "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:06 verbose #10 > >
00:00:06 verbose #11 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #13 > > │ # test │
00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #15 > >
00:00:06 verbose #16 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #17 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #18 > > │ ## include scripts │
00:00:06 verbose #19 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #20 > >
00:00:06 verbose #21 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #22 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #23 > > │ ### include notebook core │
00:00:06 verbose #24 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #25 > >
00:00:06 verbose #26 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:06 verbose #27 > > . ../../../../scripts/nbs_header.ps1
00:00:06 verbose #28 > >
00:00:06 verbose #29 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #30 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #31 > > │ ### Include core functions script │
00:00:06 verbose #32 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #33 > >
00:00:06 verbose #34 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:06 verbose #35 > > . ../../../../scripts/core.ps1
00:00:06 verbose #36 > >
00:00:06 verbose #37 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 verbose #38 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 verbose #39 > > │ ### Include spiral library │
00:00:06 verbose #40 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 verbose #41 > >
00:00:06 verbose #42 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:06 verbose #43 > > . ../../../../lib/spiral/lib.ps1
00:00:07 verbose #44 > >
00:00:07 verbose #45 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 verbose #46 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 verbose #47 > > │ ## execute project commands │
00:00:07 verbose #48 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 verbose #49 > >
00:00:07 verbose #50 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 verbose #51 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 verbose #52 > > │ ### run notebook with retries using spiral supervisor │
00:00:07 verbose #53 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 verbose #54 > >
00:00:07 verbose #55 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:07 verbose #56 > > { . ../../../../apps/spiral/dist/Supervisor$(_exe) --execute-command
00:00:07 verbose #57 > > "../../../../workspace/target/release/spiral_builder$(_exe) dib --path test.dib
00:00:07 verbose #58 > > --retries 3" } | Invoke-Block
00:00:17 verbose #59 > 00:00:16 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d24ded1979d573bb8c7fdc68dd7b50e61796e85d8e6beee1e31f434c205a2304/main.spi
00:00:25 verbose #60 > 00:00:23 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/636c1450b5bba43a635d15869ed430c88bdc1323c4a033dd9d7f4ddd7be6c05c/main.spi
00:00:25 verbose #61 > 00:00:24 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f3f55697b283678b3e5227b9b9c5c0bcc24e9fc601f8eb946a63ae575baf9d65/main.spi
00:00:26 verbose #62 > <test>
00:00:26 verbose #63 > </test>
00:00:32 verbose #64 > >
00:00:32 verbose #65 > > ╭─[ 25.42s - stdout ]──────────────────────────────────────────────────────────╮
00:00:32 verbose #66 > > │ 00:00:01 debug #1 run_with_timeout_async / timeout: 500 │
00:00:32 verbose #67 > > │ 00:00:01 debug #1 execute_with_options_async / options: struct (Some │
00:00:32 verbose #68 > > │ System.Threading.CancellationToken, │
00:00:32 verbose #69 > > │ "../../../../workspace/target/release/spiral_builder.exe dib --path │
00:00:32 verbose #70 > > │ test.dib --retries 3", │
00:00:32 verbose #71 > > │ [||], None, None, true, None) │
00:00:32 verbose #72 > > │ 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / args: │
00:00:32 verbose #73 > > │ MutCell(["dib", "--path", "test.dib", "--retries", "3"]) │
00:00:32 verbose #74 > > │ 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options │
00:00:32 verbose #75 > > │ / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", │
00:00:32 verbose #76 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib", "--output-path", │
00:00:32 verbose #77 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb"] / options: │
00:00:32 verbose #78 > > │ (None, "dotnet repl --exit-after-run --run │
00:00:32 verbose #79 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib" --output-path │
00:00:32 verbose #80 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb"", Array(MutCell( │
00:00:32 verbose #81 > > │ [("AUTOMATION", "True")])), None, None, false, None) │
00:00:32 verbose #82 > > │ 00:00:04 verbose #4 > > │
00:00:32 verbose #83 > > │ 00:00:04 verbose #5 > > ── markdown │
00:00:32 verbose #84 > > │ ──────────────────────────────────────────────────────────────────── │
00:00:32 verbose #85 > > │ 00:00:04 verbose #6 > > │
00:00:32 verbose #86 > > │ ╭─────────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #87 > > │ ───╮ │
00:00:32 verbose #88 > > │ 00:00:04 verbose #7 > > │ # test (Polyglot) │
00:00:32 verbose #89 > > │ │ │
00:00:32 verbose #90 > > │ 00:00:04 verbose #8 > > │
00:00:32 verbose #91 > > │ ╰─────────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #92 > > │ ───╯ │
00:00:32 verbose #93 > > │ 00:00:04 verbose #9 > > │
00:00:32 verbose #94 > > │ 00:00:04 verbose #10 > > ── spiral │
00:00:32 verbose #95 > > │ ────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #96 > > │ 00:00:04 verbose #11 > > //// test │
00:00:32 verbose #97 > > │ 00:00:04 verbose #12 > > │
00:00:32 verbose #98 > > │ 00:00:04 verbose #13 > > open testing │
00:00:32 verbose #99 > > │ 00:00:04 verbose #14 > > │
00:00:32 verbose #100 > > │ 00:00:04 verbose #15 > > ── spiral - import │
00:00:32 verbose #101 > > │ ───────────────────────────────────────────────────────────── │
00:00:32 verbose #102 > > │ 00:00:04 verbose #16 > > #r │
00:00:32 verbose #103 > > │ 00:00:04 verbose #17 > > │
00:00:32 verbose #104 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #105 > > │ ft.D │
00:00:32 verbose #106 > > │ 00:00:04 verbose #18 > > otNet.Interactive.Spiral.dll" │
00:00:32 verbose #107 > > │ 00:00:04 verbose #19 > > open │
00:00:32 verbose #108 > > │ Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers │
00:00:32 verbose #109 > > │ 00:00:04 verbose #20 > > #r │
00:00:32 verbose #110 > > │ 00:00:04 verbose #21 > > │
00:00:32 verbose #111 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #112 > > │ ft.D │
00:00:32 verbose #113 > > │ 00:00:04 verbose #22 > > otNet.Interactive.dll" │
00:00:32 verbose #114 > > │ 00:00:04 verbose #23 > > open type Microsoft.DotNet.Interactive.Kernel │
00:00:32 verbose #115 > > │ 00:00:08 verbose #24 > > │
00:00:32 verbose #116 > > │ 00:00:08 verbose #25 > > ── spiral │
00:00:32 verbose #117 > > │ ────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #118 > > │ 00:00:08 verbose #26 > > nominal i = () │
00:00:32 verbose #119 > > │ 00:00:08 verbose #27 > > nominal e = () │
00:00:32 verbose #120 > > │ 00:00:08 verbose #28 > > nominal s = () │
00:00:32 verbose #121 > > │ 00:00:08 verbose #29 > > nominal n = () │
00:00:32 verbose #122 > > │ 00:00:08 verbose #30 > > nominal t = () │
00:00:32 verbose #123 > > │ 00:00:08 verbose #31 > > nominal f = () │
00:00:32 verbose #124 > > │ 00:00:08 verbose #32 > > nominal j = () │
00:00:32 verbose #125 > > │ 00:00:08 verbose #33 > > nominal p = () │
00:00:32 verbose #126 > > │ 00:00:08 verbose #34 > > │
00:00:32 verbose #127 > > │ 00:00:08 verbose #35 > > union sensing = │
00:00:32 verbose #128 > > │ 00:00:08 verbose #36 > > | Si : s * i │
00:00:32 verbose #129 > > │ 00:00:08 verbose #37 > > | Se : s * e │
00:00:32 verbose #130 > > │ 00:00:08 verbose #38 > > │
00:00:32 verbose #131 > > │ 00:00:08 verbose #39 > > union intuition = │
00:00:32 verbose #132 > > │ 00:00:08 verbose #40 > > | Ni : n * i │
00:00:32 verbose #133 > > │ 00:00:08 verbose #41 > > | Ne : n * e │
00:00:32 verbose #134 > > │ 00:00:08 verbose #42 > > │
00:00:32 verbose #135 > > │ 00:00:08 verbose #43 > > union thinking = │
00:00:32 verbose #136 > > │ 00:00:08 verbose #44 > > | Ti : t * i │
00:00:32 verbose #137 > > │ 00:00:08 verbose #45 > > | Te : t * e │
00:00:32 verbose #138 > > │ 00:00:08 verbose #46 > > │
00:00:32 verbose #139 > > │ 00:00:08 verbose #47 > > union feeling = │
00:00:32 verbose #140 > > │ 00:00:08 verbose #48 > > | Fi : f * i │
00:00:32 verbose #141 > > │ 00:00:08 verbose #49 > > | Fe : f * e │
00:00:32 verbose #142 > > │ 00:00:08 verbose #50 > > │
00:00:32 verbose #143 > > │ 00:00:08 verbose #51 > > union function_stack = │
00:00:32 verbose #144 > > │ 00:00:08 verbose #52 > > | FS : sensing * intuition * thinking * feeling │
00:00:32 verbose #145 > > │ 00:00:08 verbose #53 > > │
00:00:32 verbose #146 > > │ 00:00:08 verbose #54 > > union personality_type = │
00:00:32 verbose #147 > > │ 00:00:08 verbose #55 > > | ISTJ : i * s * t * j * function_stack │
00:00:32 verbose #148 > > │ 00:00:08 verbose #56 > > | ISFJ : i * s * f * j * function_stack │
00:00:32 verbose #149 > > │ 00:00:08 verbose #57 > > | INFJ : i * n * f * j * function_stack │
00:00:32 verbose #150 > > │ 00:00:08 verbose #58 > > | INTJ : i * n * t * j * function_stack │
00:00:32 verbose #151 > > │ 00:00:08 verbose #59 > > | ISTP : i * s * t * p * function_stack │
00:00:32 verbose #152 > > │ 00:00:08 verbose #60 > > | ISFP : i * s * f * p * function_stack │
00:00:32 verbose #153 > > │ 00:00:08 verbose #61 > > | INFP : i * n * f * p * function_stack │
00:00:32 verbose #154 > > │ 00:00:08 verbose #62 > > | INTP : i * n * t * p * function_stack │
00:00:32 verbose #155 > > │ 00:00:08 verbose #63 > > | ESTP : e * s * t * p * function_stack │
00:00:32 verbose #156 > > │ 00:00:08 verbose #64 > > | ESFP : e * s * f * p * function_stack │
00:00:32 verbose #157 > > │ 00:00:08 verbose #65 > > | ENFP : e * n * f * p * function_stack │
00:00:32 verbose #158 > > │ 00:00:08 verbose #66 > > | ENTP : e * n * t * p * function_stack │
00:00:32 verbose #159 > > │ 00:00:08 verbose #67 > > | ESTJ : e * s * t * j * function_stack │
00:00:32 verbose #160 > > │ 00:00:08 verbose #68 > > | ESFJ : e * s * f * j * function_stack │
00:00:32 verbose #161 > > │ 00:00:08 verbose #69 > > | ENFJ : e * n * f * j * function_stack │
00:00:32 verbose #162 > > │ 00:00:08 verbose #70 > > | ENTJ : e * n * t * j * function_stack │
00:00:32 verbose #163 > > │ 00:00:08 verbose #71 > > │
00:00:32 verbose #164 > > │ 00:00:08 verbose #72 > > │
00:00:32 verbose #165 > > │ 00:00:08 verbose #73 > > inl main () = │
00:00:32 verbose #166 > > │ 00:00:08 verbose #74 > > inl istj_stack = FS ((Si (s, i)), Ne (n, e), │
00:00:32 verbose #167 > > │ (Te (t, e)), (Fi (f, i))) │
00:00:32 verbose #168 > > │ 00:00:08 verbose #75 > > inl istj_personality = ISTJ (i, s, t, j, │
00:00:32 verbose #169 > > │ istj_stack) │
00:00:32 verbose #170 > > │ 00:00:08 verbose #76 > > // inl isfj_stack = FS ((Si (s, i)), Ne (n, e), │
00:00:32 verbose #171 > > │ (Fe (f, e)), (Ti (t, i))) │
00:00:32 verbose #172 > > │ 00:00:08 verbose #77 > > // inl isfj_personality = ISFJ (i, s, f, j, │
00:00:32 verbose #173 > > │ isfj_stack) │
00:00:32 verbose #174 > > │ 00:00:08 verbose #78 > > │
00:00:32 verbose #175 > > │ 00:00:08 verbose #79 > > ;[[ │
00:00:32 verbose #176 > > │ 00:00:08 verbose #80 > > istj_personality │
00:00:32 verbose #177 > > │ 00:00:08 verbose #81 > > ]] │
00:00:32 verbose #178 > > │ 00:00:08 verbose #82 > > |> fun x => $'$"%A{!x}"' : string │
00:00:32 verbose #179 > > │ 00:00:08 verbose #83 > > |> console.write_line │
00:00:32 verbose #180 > > │ 00:00:08 verbose #84 > > │
00:00:32 verbose #181 > > │ 00:00:08 verbose #85 > > inl main () = │
00:00:32 verbose #182 > > │ 00:00:08 verbose #86 > > $'!main ()' : () │
00:00:32 verbose #183 > > │ 00:00:14 verbose #87 > > │
00:00:32 verbose #184 > > │ 00:00:14 verbose #88 > > ╭─[ 5.72s - stdout │
00:00:32 verbose #185 > > │ ]───────────────────────────────────────────────────────────╮ │
00:00:32 verbose #186 > > │ 00:00:14 verbose #89 > > │ [|US5_0 (US4_0 (US0_0, US1_1, US2_1, US3_0))|] │
00:00:32 verbose #187 > > │ │ │
00:00:32 verbose #188 > > │ 00:00:14 verbose #90 > > │ │
00:00:32 verbose #189 > > │ │
00:00:32 verbose #190 > > │ │ │
00:00:32 verbose #191 > > │ 00:00:14 verbose #91 > > │
00:00:32 verbose #192 > > │ ╰─────────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #193 > > │ ───╯ │
00:00:32 verbose #194 > > │ 00:00:14 verbose #92 > > │
00:00:32 verbose #195 > > │ 00:00:14 verbose #93 > > ── fsharp │
00:00:32 verbose #196 > > │ ────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #197 > > │ 00:00:14 verbose #94 > > type PhonologicalFeature = │
00:00:32 verbose #198 > > │ 00:00:14 verbose #95 > > | VowelFeature of │
00:00:32 verbose #199 > > │ 00:00:14 verbose #96 > > height: Height │
00:00:32 verbose #200 > > │ 00:00:14 verbose #97 > > * backness: Backness │
00:00:32 verbose #201 > > │ 00:00:14 verbose #98 > > * roundedness: Roundedness │
00:00:32 verbose #202 > > │ 00:00:14 verbose #99 > > * tone: Option<Tone> │
00:00:32 verbose #203 > > │ 00:00:14 verbose #100 > > * stress: Option<Stress> │
00:00:32 verbose #204 > > │ 00:00:14 verbose #101 > > * length: Option<Length> │
00:00:32 verbose #205 > > │ 00:00:14 verbose #102 > > | ConsonantFeature of │
00:00:32 verbose #206 > > │ 00:00:14 verbose #103 > > place: PlaceOfArticulation │
00:00:32 verbose #207 > > │ 00:00:14 verbose #104 > > * manner: MannerOfArticulation │
00:00:32 verbose #208 > > │ 00:00:14 verbose #105 > > * voicing: Voicing │
00:00:32 verbose #209 > > │ 00:00:14 verbose #106 > > * length: Option<Length> │
00:00:32 verbose #210 > > │ 00:00:14 verbose #107 > > | VowelHarmonyFeature │
00:00:32 verbose #211 > > │ 00:00:14 verbose #108 > > | PitchAccentFeature │
00:00:32 verbose #212 > > │ 00:00:14 verbose #109 > > │
00:00:32 verbose #213 > > │ 00:00:14 verbose #110 > > and Stress = Primary | Secondary │
00:00:32 verbose #214 > > │ 00:00:14 verbose #111 > > and Length = Long | Short | HalfLong │
00:00:32 verbose #215 > > │ 00:00:14 verbose #112 > > │
00:00:32 verbose #216 > > │ 00:00:14 verbose #113 > > and Height = │
00:00:32 verbose #217 > > │ 00:00:14 verbose #114 > > | High | NearHigh | HighMid │
00:00:32 verbose #218 > > │ 00:00:14 verbose #115 > > | Mid | LowMid | NearLow │
00:00:32 verbose #219 > > │ 00:00:14 verbose #116 > > | Low │
00:00:32 verbose #220 > > │ 00:00:14 verbose #117 > > │
00:00:32 verbose #221 > > │ 00:00:14 verbose #118 > > and Backness = Front | Central | Back │
00:00:32 verbose #222 > > │ 00:00:14 verbose #119 > > │
00:00:32 verbose #223 > > │ 00:00:14 verbose #120 > > and Roundedness = Rounded | Unrounded │
00:00:32 verbose #224 > > │ 00:00:14 verbose #121 > > │
00:00:32 verbose #225 > > │ 00:00:14 verbose #122 > > and PlaceOfArticulation = │
00:00:32 verbose #226 > > │ 00:00:14 verbose #123 > > | Bilabial | Labiodental | Dental │
00:00:32 verbose #227 > > │ 00:00:14 verbose #124 > > | Alveolar | Postalveolar | Retroflex │
00:00:32 verbose #228 > > │ 00:00:14 verbose #125 > > | Palatal | Velar | Uvular │
00:00:32 verbose #229 > > │ 00:00:14 verbose #126 > > | Pharyngeal | Epiglottal | Glottal │
00:00:32 verbose #230 > > │ 00:00:14 verbose #127 > > │
00:00:32 verbose #231 > > │ 00:00:14 verbose #128 > > and MannerOfArticulation = │
00:00:32 verbose #232 > > │ 00:00:14 verbose #129 > > | Plosive | Nasal | Trill │
00:00:32 verbose #233 > > │ 00:00:14 verbose #130 > > | TapOrFlap | Fricative | LateralFricative │
00:00:32 verbose #234 > > │ 00:00:14 verbose #131 > > | Approximant | LateralApproximant │
00:00:32 verbose #235 > > │ 00:00:14 verbose #132 > > │
00:00:32 verbose #236 > > │ 00:00:14 verbose #133 > > and Voicing = Voiced | Voiceless │
00:00:32 verbose #237 > > │ 00:00:14 verbose #134 > > │
00:00:32 verbose #238 > > │ 00:00:14 verbose #135 > > and SecondaryArticulation = │
00:00:32 verbose #239 > > │ 00:00:14 verbose #136 > > | Labialization | Palatalization | │
00:00:32 verbose #240 > > │ Velarization │
00:00:32 verbose #241 > > │ 00:00:14 verbose #137 > > | Pharyngealization | Aspiration │
00:00:32 verbose #242 > > │ 00:00:14 verbose #138 > > │
00:00:32 verbose #243 > > │ 00:00:14 verbose #139 > > and Tone = │
00:00:32 verbose #244 > > │ 00:00:14 verbose #140 > > | LevelTone of int │
00:00:32 verbose #245 > > │ 00:00:14 verbose #141 > > | ContourTone of int list │
00:00:32 verbose #246 > > │ 00:00:14 verbose #142 > > │
00:00:32 verbose #247 > > │ 00:00:14 verbose #143 > > and MorphologicalFeature = │
00:00:32 verbose #248 > > │ 00:00:14 verbose #144 > > | RootFeature of string │
00:00:32 verbose #249 > > │ 00:00:14 verbose #145 > > | AffixFeature of AffixType * string │
00:00:32 verbose #250 > > │ 00:00:14 verbose #146 > > | IncorporationFeature of string * │
00:00:32 verbose #251 > > │ MorphologicalFeature │
00:00:32 verbose #252 > > │ 00:00:14 verbose #147 > > | NonConcatenativePattern of string * string │
00:00:32 verbose #253 > > │ 00:00:14 verbose #148 > > | AgglutinativeAffixFeature of │
00:00:32 verbose #254 > > │ AgglutinativeAffixType * string │
00:00:32 verbose #255 > > │ 00:00:14 verbose #149 > > | HonorificFeature of HonorificType * string │
00:00:32 verbose #256 > > │ 00:00:14 verbose #150 > > │
00:00:32 verbose #257 > > │ 00:00:14 verbose #151 > > and AgglutinativeAffixType = Suffix | Prefix │
00:00:32 verbose #258 > > │ 00:00:14 verbose #152 > > │
00:00:32 verbose #259 > > │ 00:00:14 verbose #153 > > and HonorificType = VerbHonorific | NounHonorific │
00:00:32 verbose #260 > > │ 00:00:14 verbose #154 > > │
00:00:32 verbose #261 > > │ 00:00:14 verbose #155 > > and AffixType = │
00:00:32 verbose #262 > > │ 00:00:14 verbose #156 > > | Prefix | Suffix | Infix │
00:00:32 verbose #263 > > │ 00:00:14 verbose #157 > > | Circumfix │
00:00:32 verbose #264 > > │ 00:00:14 verbose #158 > > │
00:00:32 verbose #265 > > │ 00:00:14 verbose #159 > > type SyntacticFeature = │
00:00:32 verbose #266 > > │ 00:00:14 verbose #160 > > | WordFeature of MorphologicalFeature list * │
00:00:32 verbose #267 > > │ LexicalCategory │
00:00:32 verbose #268 > > │ 00:00:14 verbose #161 > > | PhraseFeature of PhraseType * │
00:00:32 verbose #269 > > │ SyntacticFeature list │
00:00:32 verbose #270 > > │ 00:00:14 verbose #162 > > | GrammaticalRelation of │
00:00:32 verbose #271 > > │ GrammaticalRelationType * SyntacticFeature list │
00:00:32 verbose #272 > > │ 00:00:14 verbose #163 > > | SOVOrderFeature │
00:00:32 verbose #273 > > │ 00:00:14 verbose #164 > > | TopicCommentFeature │
00:00:32 verbose #274 > > │ 00:00:14 verbose #165 > > │
00:00:32 verbose #275 > > │ 00:00:14 verbose #166 > > and GrammaticalRelationType = │
00:00:32 verbose #276 > > │ 00:00:14 verbose #167 > > | Ergative | Absolutive | Nominative │
00:00:32 verbose #277 > > │ 00:00:14 verbose #168 > > | Accusative │
00:00:32 verbose #278 > > │ 00:00:14 verbose #169 > > │
00:00:32 verbose #279 > > │ 00:00:14 verbose #170 > > and LexicalCategory = │
00:00:32 verbose #280 > > │ 00:00:14 verbose #171 > > | Noun | Verb | Adjective │
00:00:32 verbose #281 > > │ 00:00:14 verbose #172 > > | Adverb | Pronoun | Preposition │
00:00:32 verbose #282 > > │ 00:00:14 verbose #173 > > | Conjunction | Determiner | Interjection │
00:00:32 verbose #283 > > │ 00:00:14 verbose #174 > > │
00:00:32 verbose #284 > > │ 00:00:14 verbose #175 > > and PhraseType = │
00:00:32 verbose #285 > > │ 00:00:14 verbose #176 > > | NP | VP | AP │
00:00:32 verbose #286 > > │ 00:00:14 verbose #177 > > | PP | CP │
00:00:32 verbose #287 > > │ 00:00:14 verbose #178 > > │
00:00:32 verbose #288 > > │ 00:00:14 verbose #179 > > and SemanticFeature = │
00:00:32 verbose #289 > > │ 00:00:14 verbose #180 > > | Meaning of string │
00:00:32 verbose #290 > > │ 00:00:14 verbose #181 > > | SemanticRole of SemanticRoleType * │
00:00:32 verbose #291 > > │ SemanticFeature │
00:00:32 verbose #292 > > │ 00:00:14 verbose #182 > > │
00:00:32 verbose #293 > > │ 00:00:14 verbose #183 > > and SemanticRoleType = │
00:00:32 verbose #294 > > │ 00:00:14 verbose #184 > > | Agent | Patient | Instrument │
00:00:32 verbose #295 > > │ 00:00:14 verbose #185 > > | Location | Time | Cause │
00:00:32 verbose #296 > > │ 00:00:14 verbose #186 > > │
00:00:32 verbose #297 > > │ 00:00:14 verbose #187 > > and PragmaticFeature = │
00:00:32 verbose #298 > > │ 00:00:14 verbose #188 > > | UseContext of string │
00:00:32 verbose #299 > > │ 00:00:14 verbose #189 > > | PolitenessLevel of Politeness │
00:00:32 verbose #300 > > │ 00:00:14 verbose #190 > > | SpeechAct of SpeechActType │
00:00:32 verbose #301 > > │ 00:00:14 verbose #191 > > | SpeechLevel of SpeechLevelType │
00:00:32 verbose #302 > > │ 00:00:14 verbose #192 > > │
00:00:32 verbose #303 > > │ 00:00:14 verbose #193 > > and Politeness = Formal | Informal | Neutral │
00:00:32 verbose #304 > > │ 00:00:14 verbose #194 > > │
00:00:32 verbose #305 > > │ 00:00:14 verbose #195 > > and SpeechActType = │
00:00:32 verbose #306 > > │ 00:00:14 verbose #196 > > | Assertive | Directive | Commissive │
00:00:32 verbose #307 > > │ 00:00:14 verbose #197 > > | Expressive | Declarative │
00:00:32 verbose #308 > > │ 00:00:14 verbose #198 > > │
00:00:32 verbose #309 > > │ 00:00:14 verbose #199 > > and SpeechLevelType = │
00:00:32 verbose #310 > > │ 00:00:14 verbose #200 > > | FormalHigh | FormalLow | InformalHigh │
00:00:32 verbose #311 > > │ 00:00:14 verbose #201 > > | InformalLow | Neutral │
00:00:32 verbose #312 > > │ 00:00:14 verbose #202 > > │
00:00:32 verbose #313 > > │ 00:00:14 verbose #203 > > type LinguisticFeature = │
00:00:32 verbose #314 > > │ 00:00:14 verbose #204 > > | Phonological of PhonologicalFeature │
00:00:32 verbose #315 > > │ 00:00:14 verbose #205 > > | Morphological of MorphologicalFeature │
00:00:32 verbose #316 > > │ 00:00:14 verbose #206 > > | Syntactic of SyntacticFeature │
00:00:32 verbose #317 > > │ 00:00:14 verbose #207 > > | Semantic of SemanticFeature │
00:00:32 verbose #318 > > │ 00:00:14 verbose #208 > > | Pragmatic of PragmaticFeature │
00:00:32 verbose #319 > > │ 00:00:14 verbose #209 > > │
00:00:32 verbose #320 > > │ 00:00:14 verbose #210 > > type LanguageConstruct = │
00:00:32 verbose #321 > > │ 00:00:14 verbose #211 > > | LanguageElement of LinguisticFeature │
00:00:32 verbose #322 > > │ 00:00:14 verbose #212 > > | LanguageStructure of LanguageConstruct list │
00:00:32 verbose #323 > > │ 00:00:14 verbose #213 > > | TranslationElement of TranslationFeature │
00:00:32 verbose #324 > > │ 00:00:14 verbose #214 > > │
00:00:32 verbose #325 > > │ 00:00:14 verbose #215 > > and TranslationFeature = │
00:00:32 verbose #326 > > │ 00:00:14 verbose #216 > > | LinkedPhonological of PhonologicalFeature * │
00:00:32 verbose #327 > > │ PhonologicalFeature │
00:00:32 verbose #328 > > │ 00:00:14 verbose #217 > > | LinkedMorphological of MorphologicalFeature │
00:00:32 verbose #329 > > │ * MorphologicalFeature │
00:00:32 verbose #330 > > │ 00:00:14 verbose #218 > > | LinkedSyntactic of SyntacticFeature * │
00:00:32 verbose #331 > > │ SyntacticFeature │
00:00:32 verbose #332 > > │ 00:00:14 verbose #219 > > | LinkedSemantic of SemanticFeature * │
00:00:32 verbose #333 > > │ SemanticFeature │
00:00:32 verbose #334 > > │ 00:00:14 verbose #220 > > │
00:00:32 verbose #335 > > │ 00:00:14 verbose #221 > > type Discourse = DiscourseUnit of │
00:00:32 verbose #336 > > │ LanguageConstruct list │
00:00:32 verbose #337 > > │ 00:00:14 verbose #222 > > │
00:00:32 verbose #338 > > │ 00:00:14 verbose #223 > > type LanguageModel = │
00:00:32 verbose #339 > > │ 00:00:14 verbose #224 > > | Model of discourse: Discourse │
00:00:32 verbose #340 > > │ 00:00:14 verbose #225 > > │
00:00:32 verbose #341 > > │ 00:00:14 verbose #226 > > ── fsharp - import │
00:00:32 verbose #342 > > │ ───────────────────────────────────────────────────────────── │
00:00:32 verbose #343 > > │ 00:00:14 verbose #227 > > #r │
00:00:32 verbose #344 > > │ 00:00:14 verbose #228 > > │
00:00:32 verbose #345 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #346 > > │ ft.A │
00:00:32 verbose #347 > > │ 00:00:14 verbose #229 > > spNetCore.Html.Abstractions.dll" │
00:00:32 verbose #348 > > │ 00:00:14 verbose #230 > > #r │
00:00:32 verbose #349 > > │ 00:00:14 verbose #231 > > │
00:00:32 verbose #350 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #351 > > │ ft.D │
00:00:32 verbose #352 > > │ 00:00:14 verbose #232 > > otNet.Interactive.dll" │
00:00:32 verbose #353 > > │ 00:00:14 verbose #233 > > #r │
00:00:32 verbose #354 > > │ 00:00:14 verbose #234 > > │
00:00:32 verbose #355 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #356 > > │ ft.D │
00:00:32 verbose #357 > > │ 00:00:14 verbose #235 > > otNet.Interactive.FSharp.dll" │
00:00:32 verbose #358 > > │ 00:00:14 verbose #236 > > #r │
00:00:32 verbose #359 > > │ 00:00:14 verbose #237 > > │
00:00:32 verbose #360 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #361 > > │ ft.D │
00:00:32 verbose #362 > > │ 00:00:14 verbose #238 > > otNet.Interactive.Formatting.dll" │
00:00:32 verbose #363 > > │ 00:00:14 verbose #239 > > open System │
00:00:32 verbose #364 > > │ 00:00:14 verbose #240 > > open System.IO │
00:00:32 verbose #365 > > │ 00:00:14 verbose #241 > > open System.Text │
00:00:32 verbose #366 > > │ 00:00:14 verbose #242 > > open Microsoft.DotNet.Interactive.Formatting │
00:00:32 verbose #367 > > │ 00:00:16 verbose #243 > > │
00:00:32 verbose #368 > > │ 00:00:16 verbose #244 > > ── fsharp - import │
00:00:32 verbose #369 > > │ ───────────────────────────────────────────────────────────── │
00:00:32 verbose #370 > > │ 00:00:16 verbose #245 > > #r │
00:00:32 verbose #371 > > │ 00:00:16 verbose #246 > > │
00:00:32 verbose #372 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #373 > > │ ft.D │
00:00:32 verbose #374 > > │ 00:00:16 verbose #247 > > otNet.Interactive.FSharp.dll" │
00:00:32 verbose #375 > > │ 00:00:16 verbose #248 > > open │
00:00:32 verbose #376 > > │ Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers │
00:00:32 verbose #377 > > │ 00:00:16 verbose #249 > > #r │
00:00:32 verbose #378 > > │ 00:00:16 verbose #250 > > │
00:00:32 verbose #379 > > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:00:32 verbose #380 > > │ ft.D │
00:00:32 verbose #381 > > │ 00:00:16 verbose #251 > > otNet.Interactive.dll" │
00:00:32 verbose #382 > > │ 00:00:16 verbose #252 > > open type Microsoft.DotNet.Interactive.Kernel │
00:00:32 verbose #383 > > │ 00:00:16 verbose #253 > > │
00:00:32 verbose #384 > > │ 00:00:16 verbose #254 > > ── fsharp - import │
00:00:32 verbose #385 > > │ ───────────────────────────────────────────────────────────── │
00:00:32 verbose #386 > > │ 00:00:16 verbose #255 > > Formatter.Register(fun(x: obj)(writer: │
00:00:32 verbose #387 > > │ TextWriter)->fprintfn writer "%120A" x) │
00:00:32 verbose #388 > > │ 00:00:16 verbose #256 > > │
00:00:32 verbose #389 > > │ 00:00:16 verbose #257 > > ── fsharp - import │
00:00:32 verbose #390 > > │ ───────────────────────────────────────────────────────────── │
00:00:32 verbose #391 > > │ 00:00:16 verbose #258 > > Formatter.Register(fun(x: │
00:00:32 verbose #392 > > │ System.Collections.IEnumerable)(writer: │
00:00:32 verbose #393 > > │ 00:00:16 verbose #259 > > TextWriter)->fprintfn writer "%120A" x) │
00:00:32 verbose #394 > > │ 00:00:16 verbose #260 > > │
00:00:32 verbose #395 > > │ 00:00:16 verbose #261 > > ── fsharp - import │
00:00:32 verbose #396 > > │ ───────────────────────────────────────────────────────────── │
00:00:32 verbose #397 > > │ 00:00:16 verbose #262 > > type PhonologicalFeature = │
00:00:32 verbose #398 > > │ 00:00:16 verbose #263 > > | VowelFeature of │
00:00:32 verbose #399 > > │ 00:00:16 verbose #264 > > height: Height │
00:00:32 verbose #400 > > │ 00:00:16 verbose #265 > > * backness: Backness │
00:00:32 verbose #401 > > │ 00:00:16 verbose #266 > > * roundedness: Roundedness │
00:00:32 verbose #402 > > │ 00:00:16 verbose #267 > > * tone: Option<Tone> │
00:00:32 verbose #403 > > │ 00:00:16 verbose #268 > > * stress: Option<Stress> │
00:00:32 verbose #404 > > │ 00:00:16 verbose #269 > > * length: Option<Length> │
00:00:32 verbose #405 > > │ 00:00:16 verbose #270 > > | ConsonantFeature of │
00:00:32 verbose #406 > > │ 00:00:16 verbose #271 > > place: PlaceOfArticulation │
00:00:32 verbose #407 > > │ 00:00:16 verbose #272 > > * manner: MannerOfArticulation │
00:00:32 verbose #408 > > │ 00:00:16 verbose #273 > > * voicing: Voicing │
00:00:32 verbose #409 > > │ 00:00:16 verbose #274 > > * length: Option<Length> │
00:00:32 verbose #410 > > │ 00:00:16 verbose #275 > > | VowelHarmonyFeature │
00:00:32 verbose #411 > > │ 00:00:16 verbose #276 > > | PitchAccentFeature │
00:00:32 verbose #412 > > │ 00:00:16 verbose #277 > > │
00:00:32 verbose #413 > > │ 00:00:16 verbose #278 > > and Stress = Primary | Secondary │
00:00:32 verbose #414 > > │ 00:00:16 verbose #279 > > and Length = Long | Short | HalfLong │
00:00:32 verbose #415 > > │ 00:00:16 verbose #280 > > │
00:00:32 verbose #416 > > │ 00:00:16 verbose #281 > > and Height = │
00:00:32 verbose #417 > > │ 00:00:16 verbose #282 > > | High | NearHigh | HighMid │
00:00:32 verbose #418 > > │ 00:00:16 verbose #283 > > | Mid | LowMid | NearLow │
00:00:32 verbose #419 > > │ 00:00:16 verbose #284 > > | Low │
00:00:32 verbose #420 > > │ 00:00:16 verbose #285 > > │
00:00:32 verbose #421 > > │ 00:00:16 verbose #286 > > and Backness = Front | Central | Back │
00:00:32 verbose #422 > > │ 00:00:16 verbose #287 > > │
00:00:32 verbose #423 > > │ 00:00:16 verbose #288 > > and Roundedness = Rounded | Unrounded │
00:00:32 verbose #424 > > │ 00:00:16 verbose #289 > > │
00:00:32 verbose #425 > > │ 00:00:16 verbose #290 > > and PlaceOfArticulation = │
00:00:32 verbose #426 > > │ 00:00:16 verbose #291 > > | Bilabial | Labiodental | Dental │
00:00:32 verbose #427 > > │ 00:00:16 verbose #292 > > | Alveolar | Postalveolar | Retroflex │
00:00:32 verbose #428 > > │ 00:00:16 verbose #293 > > | Palatal | Velar | Uvular │
00:00:32 verbose #429 > > │ 00:00:16 verbose #294 > > | Pharyngeal | Epiglottal | Glottal │
00:00:32 verbose #430 > > │ 00:00:16 verbose #295 > > │
00:00:32 verbose #431 > > │ 00:00:16 verbose #296 > > and MannerOfArticulation = │
00:00:32 verbose #432 > > │ 00:00:16 verbose #297 > > | Plosive | Nasal | Trill │
00:00:32 verbose #433 > > │ 00:00:16 verbose #298 > > | TapOrFlap | Fricative | LateralFricative │
00:00:32 verbose #434 > > │ 00:00:16 verbose #299 > > | Approximant | LateralApproximant │
00:00:32 verbose #435 > > │ 00:00:16 verbose #300 > > │
00:00:32 verbose #436 > > │ 00:00:16 verbose #301 > > and Voicing = Voiced | Voiceless │
00:00:32 verbose #437 > > │ 00:00:16 verbose #302 > > │
00:00:32 verbose #438 > > │ 00:00:16 verbose #303 > > and SecondaryArticulation = │
00:00:32 verbose #439 > > │ 00:00:16 verbose #304 > > | Labialization | Palatalization | │
00:00:32 verbose #440 > > │ Velarization │
00:00:32 verbose #441 > > │ 00:00:16 verbose #305 > > | Pharyngealization | Aspiration │
00:00:32 verbose #442 > > │ 00:00:16 verbose #306 > > │
00:00:32 verbose #443 > > │ 00:00:16 verbose #307 > > and Tone = │
00:00:32 verbose #444 > > │ 00:00:16 verbose #308 > > | LevelTone of int │
00:00:32 verbose #445 > > │ 00:00:16 verbose #309 > > | ContourTone of int list │
00:00:32 verbose #446 > > │ 00:00:16 verbose #310 > > │
00:00:32 verbose #447 > > │ 00:00:16 verbose #311 > > and MorphologicalFeature = │
00:00:32 verbose #448 > > │ 00:00:16 verbose #312 > > | RootFeature of string │
00:00:32 verbose #449 > > │ 00:00:16 verbose #313 > > | AffixFeature of AffixType * string │
00:00:32 verbose #450 > > │ 00:00:16 verbose #314 > > | IncorporationFeature of string * │
00:00:32 verbose #451 > > │ MorphologicalFeature │
00:00:32 verbose #452 > > │ 00:00:16 verbose #315 > > | NonConcatenativePattern of string * string │
00:00:32 verbose #453 > > │ 00:00:16 verbose #316 > > | AgglutinativeAffixFeature of │
00:00:32 verbose #454 > > │ AgglutinativeAffixType * string │
00:00:32 verbose #455 > > │ 00:00:16 verbose #317 > > | Honori... │
00:00:32 verbose #456 > > │ 00:00:17 verbose #318 > > │
00:00:32 verbose #457 > > │ 00:00:17 verbose #319 > > ── fsharp │
00:00:32 verbose #458 > > │ ────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #459 > > │ 00:00:17 verbose #320 > > let testEnglish = │
00:00:32 verbose #460 > > │ 00:00:17 verbose #321 > > Model( │
00:00:32 verbose #461 > > │ 00:00:17 verbose #322 > > DiscourseUnit [[ │
00:00:32 verbose #462 > > │ 00:00:17 verbose #323 > > LanguageElement (Phonological │
00:00:32 verbose #463 > > │ (ConsonantFeature (Alveolar, Nasal, │
00:00:32 verbose #464 > > │ 00:00:17 verbose #324 > > Voiced, Some(HalfLong)))); │
00:00:32 verbose #465 > > │ 00:00:17 verbose #325 > > LanguageElement (Phonological │
00:00:32 verbose #466 > > │ (VowelFeature (High, Front, Unrounded, │
00:00:32 verbose #467 > > │ 00:00:17 verbose #326 > > Some(LevelTone 1), Some(Primary), Some(Short)))); │
00:00:32 verbose #468 > > │ 00:00:17 verbose #327 > > LanguageElement (Phonological │
00:00:32 verbose #469 > > │ (VowelFeature (Low, Front, Unrounded, │
00:00:32 verbose #470 > > │ 00:00:17 verbose #328 > > Some(LevelTone 2), Some(Secondary), Some(Long)))); │
00:00:32 verbose #471 > > │ 00:00:17 verbose #329 > > LanguageElement (Phonological │
00:00:32 verbose #472 > > │ (ConsonantFeature (Velar, Plosive, │
00:00:32 verbose #473 > > │ 00:00:17 verbose #330 > > Voiceless, Some(HalfLong)))); │
00:00:32 verbose #474 > > │ 00:00:17 verbose #331 > > LanguageElement (Morphological │
00:00:32 verbose #475 > > │ (RootFeature "I")); │
00:00:32 verbose #476 > > │ 00:00:17 verbose #332 > > LanguageElement (Morphological │
00:00:32 verbose #477 > > │ (RootFeature "see")); │
00:00:32 verbose #478 > > │ 00:00:17 verbose #333 > > LanguageElement (Morphological │
00:00:32 verbose #479 > > │ (RootFeature "a")); │
00:00:32 verbose #480 > > │ 00:00:17 verbose #334 > > LanguageElement (Morphological │
00:00:32 verbose #481 > > │ (RootFeature "cat")); │
00:00:32 verbose #482 > > │ 00:00:17 verbose #335 > > LanguageElement (Syntactic │
00:00:32 verbose #483 > > │ (PhraseFeature (NP, [[WordFeature │
00:00:32 verbose #484 > > │ 00:00:17 verbose #336 > > ([[RootFeature "I"]], Pronoun)]]))); │
00:00:32 verbose #485 > > │ 00:00:17 verbose #337 > > LanguageElement (Syntactic │
00:00:32 verbose #486 > > │ (PhraseFeature (VP, [[WordFeature │
00:00:32 verbose #487 > > │ 00:00:17 verbose #338 > > ([[RootFeature "see"]], Verb)]]))); │
00:00:32 verbose #488 > > │ 00:00:17 verbose #339 > > LanguageElement (Syntactic │
00:00:32 verbose #489 > > │ (PhraseFeature (NP, [[WordFeature │
00:00:32 verbose #490 > > │ 00:00:17 verbose #340 > > ([[RootFeature "a"; RootFeature "cat"]], │
00:00:32 verbose #491 > > │ Noun)]]))); │
00:00:32 verbose #492 > > │ 00:00:17 verbose #341 > > LanguageElement (Semantic (Meaning │
00:00:32 verbose #493 > > │ "Perception act of a feline by │
00:00:32 verbose #494 > > │ 00:00:17 verbose #342 > > the speaker")); │
00:00:32 verbose #495 > > │ 00:00:17 verbose #343 > > LanguageElement (Pragmatic (UseContext │
00:00:32 verbose #496 > > │ "Statement of an action being │
00:00:32 verbose #497 > > │ 00:00:17 verbose #344 > > observed")) │
00:00:32 verbose #498 > > │ 00:00:17 verbose #345 > > ]] │
00:00:32 verbose #499 > > │ 00:00:17 verbose #346 > > ) │
00:00:32 verbose #500 > > │ 00:00:17 verbose #347 > > │
00:00:32 verbose #501 > > │ 00:00:17 verbose #348 > > let testPortuguese = │
00:00:32 verbose #502 > > │ 00:00:17 verbose #349 > > Model( │
00:00:32 verbose #503 > > │ 00:00:17 verbose #350 > > DiscourseUnit [[ │
00:00:32 verbose #504 > > │ 00:00:17 verbose #351 > > LanguageElement (Phonological │
00:00:32 verbose #505 > > │ (VowelFeature (High, Front, Unrounded, │
00:00:32 verbose #506 > > │ 00:00:17 verbose #352 > > Some(LevelTone 1), Some(Primary), Some(Short)))); │
00:00:32 verbose #507 > > │ 00:00:17 verbose #353 > > LanguageElement (Phonological │
00:00:32 verbose #508 > > │ (VowelFeature (Low, Front, Unrounded, │
00:00:32 verbose #509 > > │ 00:00:17 verbose #354 > > Some(LevelTone 2), Some(Secondary), Some(Long)))); │
00:00:32 verbose #510 > > │ 00:00:17 verbose #355 > > LanguageElement (Phonological │
00:00:32 verbose #511 > > │ (VowelFeature (Mid, Back, Rounded, │
00:00:32 verbose #512 > > │ 00:00:17 verbose #356 > > Some(LevelTone 3), Some(Primary), Some(Short)))); │
00:00:32 verbose #513 > > │ 00:00:17 verbose #357 > > LanguageElement (Phonological │
00:00:32 verbose #514 > > │ (ConsonantFeature (Velar, Plosive, │
00:00:32 verbose #515 > > │ 00:00:17 verbose #358 > > Voiceless, Some(HalfLong)))); │
00:00:32 verbose #516 > > │ 00:00:17 verbose #359 > > LanguageElement (Morphological │
00:00:32 verbose #517 > > │ (RootFeature "Eu")); │
00:00:32 verbose #518 > > │ 00:00:17 verbose #360 > > LanguageElement (Morphological │
00:00:32 verbose #519 > > │ (RootFeature "ver" |> ignore; │
00:00:32 verbose #520 > > │ 00:00:17 verbose #361 > > AffixFeature (Suffix, "o"))); │
00:00:32 verbose #521 > > │ 00:00:17 verbose #362 > > LanguageElement (Morphological │
00:00:32 verbose #522 > > │ (RootFeature "um")); │
00:00:32 verbose #523 > > │ 00:00:17 verbose #363 > > LanguageElement (Morphological │
00:00:32 verbose #524 > > │ (RootFeature "gato")); │
00:00:32 verbose #525 > > │ 00:00:17 verbose #364 > > LanguageElement (Syntactic │
00:00:32 verbose #526 > > │ (PhraseFeature (NP, [[WordFeature │
00:00:32 verbose #527 > > │ 00:00:17 verbose #365 > > ([[RootFeature "Eu"]], Pronoun)]]))); │
00:00:32 verbose #528 > > │ 00:00:17 verbose #366 > > LanguageElement (Syntactic │
00:00:32 verbose #529 > > │ (PhraseFeature (VP, [[WordFeature │
00:00:32 verbose #530 > > │ 00:00:17 verbose #367 > > ([[RootFeature "vejo"]], Verb)]]))); │
00:00:32 verbose #531 > > │ 00:00:17 verbose #368 > > LanguageElement (Syntactic │
00:00:32 verbose #532 > > │ (PhraseFeature (NP, [[WordFeature │
00:00:32 verbose #533 > > │ 00:00:17 verbose #369 > > ([[RootFeature "um"; RootFeature "gato"]], │
00:00:32 verbose #534 > > │ Noun)]]))); │
00:00:32 verbose #535 > > │ 00:00:17 verbose #370 > > LanguageElement (Semantic (Meaning │
00:00:32 verbose #536 > > │ "Ação de percepção de um felino │
00:00:32 verbose #537 > > │ 00:00:17 verbose #371 > > pelo falante")); │
00:00:32 verbose #538 > > │ 00:00:17 verbose #372 > > LanguageElement (Pragmatic (UseContext │
00:00:32 verbose #539 > > │ "Declaração de uma ação sendo │
00:00:32 verbose #540 > > │ 00:00:17 verbose #373 > > observada")) │
00:00:32 verbose #541 > > │ 00:00:17 verbose #374 > > ]] │
00:00:32 verbose #542 > > │ 00:00:17 verbose #375 > > ) │
00:00:32 verbose #543 > > │ 00:00:17 verbose #376 > > │
00:00:32 verbose #544 > > │ 00:00:17 verbose #377 > > let testKorean = │
00:00:32 verbose #545 > > │ 00:00:17 verbose #378 > > Model( │
00:00:32 verbose #546 > > │ 00:00:17 verbose #379 > > DiscourseUnit [[ │
00:00:32 verbose #547 > > │ 00:00:17 verbose #380 > > LanguageElement (Phonological │
00:00:32 verbose #548 > > │ (ConsonantFeature (Alveolar, Nasal, │
00:00:32 verbose #549 > > │ 00:00:17 verbose #381 > > Voiced, Some(Short)))); │
00:00:32 verbose #550 > > │ 00:00:17 verbose #382 > > LanguageElement (Phonological │
00:00:32 verbose #551 > > │ (VowelFeature (High, Back, Rounded, │
00:00:32 verbose #552 > > │ 00:00:17 verbose #383 > > None, None, Some(Short)))); │
00:00:32 verbose #553 > > │ 00:00:17 verbose #384 > > LanguageElement (Phonological │
00:00:32 verbose #554 > > │ (VowelFeature (Mid, Front, Unrounded, │
00:00:32 verbose #555 > > │ 00:00:17 verbose #385 > > None, None, Some(Long)))); │
00:00:32 verbose #556 > > │ 00:00:17 verbose #386 > > LanguageElement (Phonological │
00:00:32 verbose #557 > > │ (ConsonantFeature (Bilabial, Plosive, │
00:00:32 verbose #558 > > │ 00:00:17 verbose #387 > > Voiceless, Some(Short)))); │
00:00:32 verbose #559 > > │ 00:00:17 verbose #388 > > LanguageElement (Morphological │
00:00:32 verbose #560 > > │ (RootFeature "나")); │
00:00:32 verbose #561 > > │ 00:00:17 verbose #389 > > LanguageElement (Morphological │
00:00:32 verbose #562 > > │ (RootFeature "보다")); │
00:00:32 verbose #563 > > │ 00:00:17 verbose #390 > > LanguageElement (Morphological │
00:00:32 verbose #564 > > │ (AffixFeature (Suffix, "아"))); │
00:00:32 verbose #565 > > │ 00:00:17 verbose #391 > > LanguageElement (Morphological │
00:00:32 verbose #566 > > │ (RootFeature "고양이")); │
00:00:32 verbose #567 > > │ 00:00:17 verbose #392 > > LanguageElement (Syntactic │
00:00:32 verbose #568 > > │ (PhraseFeature (NP, [[WordFeature │
00:00:32 verbose #569 > > │ 00:00:17 verbose #393 > > ([[RootFeature "나"]], Pronoun)]]))); │
00:00:32 verbose #570 > > │ 00:00:17 verbose #394 > > LanguageElement (Syntactic │
00:00:32 verbose #571 > > │ (PhraseFeature (VP, [[WordFeature │
00:00:32 verbose #572 > > │ 00:00:17 verbose #395 > > ([[RootFeature "보다"; AffixFeature (Suffix, │
00:00:32 verbose #573 > > │ "아")]], Verb)]]))); │
00:00:32 verbose #574 > > │ 00:00:17 verbose #396 > > LanguageElement (Syntactic │
00:00:32 verbose #575 > > │ (PhraseFeature (NP, [[WordFeature │
00:00:32 verbose #576 > > │ 00:00:17 verbose #397 > > ([[RootFeature "고양이"]], Noun)]]))); │
00:00:32 verbose #577 > > │ 00:00:17 verbose #398 > > LanguageElement (Semantic (Meaning │
00:00:32 verbose #578 > > │ "화자에 의한 고양이의 관찰 │
00:00:32 verbose #579 > > │ 00:00:17 verbose #399 > > 행위")); │
00:00:32 verbose #580 > > │ 00:00:17 verbose #400 > > LanguageElement (Pragmatic (UseContext │
00:00:32 verbose #581 > > │ "관찰되고 있는 행동의 진술")) │
00:00:32 verbose #582 > > │ 00:00:17 verbose #401 > > ]] │
00:00:32 verbose #583 > > │ 00:00:17 verbose #402 > > ) │
00:00:32 verbose #584 > > │ 00:00:17 verbose #403 > > │
00:00:32 verbose #585 > > │ 00:00:17 verbose #404 > > ── markdown │
00:00:32 verbose #586 > > │ ──────────────────────────────────────────────────────────────────── │
00:00:32 verbose #587 > > │ 00:00:17 verbose #405 > > │
00:00:32 verbose #588 > > │ ╭─────────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #589 > > │ ───╮ │
00:00:32 verbose #590 > > │ 00:00:17 verbose #406 > > │ ## main │
00:00:32 verbose #591 > > │ │ │
00:00:32 verbose #592 > > │ 00:00:17 verbose #407 > > │
00:00:32 verbose #593 > > │ ╰─────────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #594 > > │ ───╯ │
00:00:32 verbose #595 > > │ 00:00:17 verbose #408 > > │
00:00:32 verbose #596 > > │ 00:00:17 verbose #409 > > ── spiral │
00:00:32 verbose #597 > > │ ────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #598 > > │ 00:00:17 verbose #410 > > inl main (_args : array_base string) = │
00:00:32 verbose #599 > > │ 00:00:17 verbose #411 > > 0i32 │
00:00:32 verbose #600 > > │ 00:00:17 verbose #412 > > │
00:00:32 verbose #601 > > │ 00:00:17 verbose #413 > > inl main () = │
00:00:32 verbose #602 > > │ 00:00:17 verbose #414 > > $'let main args = !main args' : () │
00:00:32 verbose #603 > > │ 00:00:18 verbose #415 > > │
00:00:32 verbose #604 > > │ 00:00:18 verbose #416 > > ── spiral │
00:00:32 verbose #605 > > │ ────────────────────────────────────────────────────────────────────── │
00:00:32 verbose #606 > > │ 00:00:18 verbose #417 > > inl app () = │
00:00:32 verbose #607 > > │ 00:00:18 verbose #418 > > "test" |> console.write_line │
00:00:32 verbose #608 > > │ 00:00:18 verbose #419 > > 0i32 │
00:00:32 verbose #609 > > │ 00:00:18 verbose #420 > > │
00:00:32 verbose #610 > > │ 00:00:18 verbose #421 > > inl main () = │
00:00:32 verbose #611 > > │ 00:00:18 verbose #422 > > print_static "<test>" │
00:00:32 verbose #612 > > │ 00:00:18 verbose #423 > > │
00:00:32 verbose #613 > > │ 00:00:18 verbose #424 > > app │
00:00:32 verbose #614 > > │ 00:00:18 verbose #425 > > |> dyn │
00:00:32 verbose #615 > > │ 00:00:18 verbose #426 > > |> ignore │
00:00:32 verbose #616 > > │ 00:00:18 verbose #427 > > │
00:00:32 verbose #617 > > │ 00:00:18 verbose #428 > > print_static "</test>" │
00:00:32 verbose #618 > > │ 00:00:19 verbose #429 > 00:00:17 verbose #3 │
00:00:32 verbose #619 > > │ runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: │
00:00:32 verbose #620 > > │ 14336 │
00:00:32 verbose #621 > > │ 00:00:19 verbose #430 > 00:00:17 debug #4 │
00:00:32 verbose #622 > > │ runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", │
00:00:32 verbose #623 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb", "--to", "html", │
00:00:32 verbose #624 > > │ "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert │
00:00:32 verbose #625 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb" --to html │
00:00:32 verbose #626 > > │ --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) │
00:00:32 verbose #627 > > │ 00:00:21 verbose #431 > 00:00:19 verbose #5 ! [NbConvertApp] │
00:00:32 verbose #628 > > │ Converting notebook │
00:00:32 verbose #629 > > │ c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb to html │
00:00:32 verbose #630 > > │ 00:00:21 verbose #432 > 00:00:19 verbose #6 ! │
00:00:32 verbose #631 > > │ C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__ │
00:00:32 verbose #632 > > │ .py:93: MissingIDFieldWarning: Code cell is missing an id field, this will │
00:00:32 verbose #633 > > │ become a hard error in future nbformat versions. You may want to use │
00:00:32 verbose #634 > > │ `normalize()` on your notebooks before validations (available since nbformat │
00:00:32 verbose #635 > > │ 5.1.4). Previous versions of nbformat are fixing this issue transparently, │
00:00:32 verbose #636 > > │ and will stop doing so in the future. │
00:00:32 verbose #637 > > │ 00:00:21 verbose #433 > 00:00:19 verbose #7 ! validate(nb) │
00:00:32 verbose #638 > > │ 00:00:23 verbose #434 > 00:00:21 verbose #8 ! [NbConvertApp] Writing │
00:00:32 verbose #639 > > │ 318992 bytes to c:\home\git\polyglot\apps\spiral\temp\test\test.dib.html │
00:00:32 verbose #640 > > │ 00:00:23 verbose #435 > 00:00:21 verbose #9 │
00:00:32 verbose #641 > > │ runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 661 │
00:00:32 verbose #642 > > │ 00:00:23 verbose #436 > 00:00:21 debug #10 spiral_builder.run / dib │
00:00:32 verbose #643 > > │ / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 661 │
00:00:32 verbose #644 > > │ 00:00:23 verbose #437 > 00:00:21 debug #11 │
00:00:32 verbose #645 > > │ runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter │
00:00:32 verbose #646 > > │ = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/test.dib.html'; │
00:00:32 verbose #647 > > │ (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { │
00:00:32 verbose #648 > > │ $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, │
00:00:32 verbose #649 > > │ "pwsh -c "$counter = 1; $path = │
00:00:32 verbose #650 > > │ 'c:/home/git/polyglot/apps/spiral/temp/test/test.dib.html'; (Get-Content │
00:00:32 verbose #651 > > │ $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + │
00:00:32 verbose #652 > > │ $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, │
00:00:32 verbose #653 > > │ None) │
00:00:32 verbose #654 > > │ 00:00:24 verbose #438 > 00:00:22 verbose #12 │
00:00:32 verbose #655 > > │ runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 │
00:00:32 verbose #656 > > │ 00:00:24 verbose #439 > 00:00:22 debug #13 spiral_builder.run / dib │
00:00:32 verbose #657 > > │ / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 │
00:00:32 verbose #658 > > │ 00:00:24 verbose #440 > 00:00:23 debug #14 spiral_builder.run / dib │
00:00:32 verbose #659 > > │ / exit_code: 0 / result.Length: 15056 │
00:00:32 verbose #660 > > │ 00:00:24 debug #441 execute_with_options_async / exit_code: 0 / │
00:00:32 verbose #661 > > │ output.Length: 18205 │
00:00:32 verbose #662 > > │ 00:00:24 debug #1 main / executeCommand / exitCode: 0 / command: │
00:00:32 verbose #663 > > │ ../../../../workspace/target/release/spiral_builder.exe dib --path test.dib │
00:00:32 verbose #664 > > │ --retries 3 │
00:00:32 verbose #665 > > │ │
00:00:32 verbose #666 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 verbose #667 > >
00:00:32 verbose #668 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:32 verbose #669 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:32 verbose #670 > > │ ### parse the .dib file into .spi format with dibparser │
00:00:32 verbose #671 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 verbose #672 > >
00:00:32 verbose #673 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:32 verbose #674 > > { . ../../../../apps/parser/dist/DibParser$(_exe) test.dib spi } | Invoke-Block
00:00:33 verbose #675 > >
00:00:33 verbose #676 > > ╭─[ 791.13ms - stdout ]────────────────────────────────────────────────────────╮
00:00:33 verbose #677 > > │ 00:00:00 debug #1 writeDibCode / output: Spi / path: test.dib │
00:00:33 verbose #678 > > │ 00:00:00 debug #2 parseDibCode / output: Spi / file: test.dib │
00:00:33 verbose #679 > > │ │
00:00:33 verbose #680 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:33 verbose #681 > >
00:00:33 verbose #682 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:33 verbose #683 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:33 verbose #684 > > │ ### build .fsx file from .spi using supervisor │
00:00:33 verbose #685 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:33 verbose #686 > >
00:00:33 verbose #687 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:33 verbose #688 > > { . ../../../../apps/spiral/dist/Supervisor$(_exe) --build-file test.spi
00:00:33 verbose #689 > > test.fsx } | Invoke-Block
00:00:35 verbose #690 > 00:00:34 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/apps/spiral/temp/test/test.spi
00:00:35 verbose #691 > <test>
00:00:35 verbose #692 > </test>
00:00:35 verbose #693 > >
00:00:35 verbose #694 > > ╭─[ 2.50s - stdout ]───────────────────────────────────────────────────────────╮
00:00:35 verbose #695 > > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 500 │
00:00:35 verbose #696 > > │ 00:00:01 debug #2 run_with_timeout_async / timeout: 500 │
00:00:35 verbose #697 > > │ 00:00:01 debug #1 buildFile / takeWhileInclusive / path: test.spi / │
00:00:35 verbose #698 > > │ fsxContent: / errors: [] / typeErrorCount: 0 │
00:00:35 verbose #699 > > │ 00:00:01 debug #2 buildFile / takeWhileInclusive / path: test.spi / │
00:00:35 verbose #700 > > │ fsxContent: / errors: [] / typeErrorCount: 0 │
00:00:35 verbose #701 > > │ 00:00:01 verbose #3 Supervisor.sendJson / port: 13805 / json: │
00:00:35 verbose #702 > > │ {"FileOpen":{"spiText":"/// # test (Polyglot)\nnominal i = ()\nnominal e = │
00:00:35 verbose #703 > > │ ()\nnominal s = │
00:00:35 verbose #704 > > │ ()\nnomin...0022\u003C/test\u003E\u0022\n","uri":"file:///c:/home/git/polygl │
00:00:35 verbose #705 > > │ ot/apps/spiral/temp/test/test.spi"}} / result: │
00:00:35 verbose #706 > > │ 00:00:01 verbose #4 Supervisor.sendJson / port: 13805 / json: │
00:00:35 verbose #707 > > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/sp │
00:00:35 verbose #708 > > │ iral/temp/test/test.spi"}} / result: │
00:00:35 verbose #709 > > │ 00:00:02 debug #5 buildFile / takeWhileInclusive / path: test.spi / │
00:00:35 verbose #710 > > │ fsxContent: let rec closure0 () () : int32 = │
00:00:35 verbose #711 > > │ let v0 : (string -> unit) = System.Console.WriteLine │
00:00:35 verbose #712 > > │ let v1 : string = "test" │
00:00:35 verbose #713 > > │ v0 v1 │
00:00:35 verbose #714 > > │ 0 │
00:00:35 verbose #715 > > │ let v0 : (unit -> int32) = closure0() │
00:00:35 verbose #716 > > │ () │
00:00:35 verbose #717 > > │ / errors: [] / typeErrorCount: 0 │
00:00:35 verbose #718 > > │ 00:00:02 debug #6 watchWithFilter / Disposing watch stream / filter: │
00:00:35 verbose #719 > > │ FileName, LastWrite │
00:00:35 verbose #720 > > │ │
00:00:35 verbose #721 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #722 > >
00:00:35 verbose #723 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:35 verbose #724 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:35 verbose #725 > > │ ## compile and format the project │
00:00:35 verbose #726 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #727 > >
00:00:35 verbose #728 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:35 verbose #729 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:35 verbose #730 > > │ ### compile project with fable targeting optimized rust │
00:00:35 verbose #731 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 verbose #732 > >
00:00:35 verbose #733 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:35 verbose #734 > > dotnet fable --optimize --lang rs --extension .rs
00:00:39 verbose #735 > >
00:00:39 verbose #736 > > ╭─[ 3.94s - stdout ]───────────────────────────────────────────────────────────╮
00:00:39 verbose #737 > > │ Fable 4.17.0: F# to Rust compiler (status: alpha) │
00:00:39 verbose #738 > > │ │
00:00:39 verbose #739 > > │ Thanks to the contributor! @davidpodhola │
00:00:39 verbose #740 > > │ Stand with Ukraine! https://standwithukraine.com.ua/ │
00:00:39 verbose #741 > > │ │
00:00:39 verbose #742 > > │ Parsing test.fsproj... │
00:00:39 verbose #743 > > │ Retrieving project options from cache, in case of issues run `dotnet fable │
00:00:39 verbose #744 > > │ clean` or try `--noCache` option. │
00:00:39 verbose #745 > > │ Project and references (1 source files) parsed in 294ms │
00:00:39 verbose #746 > > │ │
00:00:39 verbose #747 > > │ Started Fable compilation... │
00:00:39 verbose #748 > > │ │
00:00:39 verbose #749 > > │ Fable compilation finished in 1651ms │
00:00:39 verbose #750 > > │ │
00:00:39 verbose #751 > > │ .\test.fsx(7,0): (7,2) warning FABLE: For Rust, support for F# static and │
00:00:39 verbose #752 > > │ module do bindings is disabled by default. It can be enabled with the │
00:00:39 verbose #753 > > │ 'static_do_bindings' feature. Use at your own risk! │
00:00:39 verbose #754 > > │ │
00:00:39 verbose #755 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:39 verbose #756 > >
00:00:39 verbose #757 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:39 verbose #758 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:39 verbose #759 > > │ ### fix formatting issues in the .rs file using regex and set-content │
00:00:39 verbose #760 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:39 verbose #761 > >
00:00:39 verbose #762 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:39 verbose #763 > > (Get-Content test.rs) `
00:00:39 verbose #764 > > -replace [[regex]]::Escape("),);"), "));" `
00:00:39 verbose #765 > > | FixRust `
00:00:39 verbose #766 > > | Set-Content test.rs
00:00:39 verbose #767 > >
00:00:39 verbose #768 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:39 verbose #769 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:39 verbose #770 > > │ ### format the rust code using cargo fmt │
00:00:39 verbose #771 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:39 verbose #772 > >
00:00:39 verbose #773 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:39 verbose #774 > > cargo fmt --
00:00:40 verbose #775 > >
00:00:40 verbose #776 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:40 verbose #777 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:40 verbose #778 > > │ ## build and test the project │
00:00:40 verbose #779 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:40 verbose #780 > >
00:00:40 verbose #781 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:40 verbose #782 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:40 verbose #783 > > │ ### build the project in release mode using nightly rust compiler │
00:00:40 verbose #784 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:40 verbose #785 > >
00:00:40 verbose #786 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:40 verbose #787 > > cargo +nightly build --release
00:00:51 verbose #788 > >
00:00:51 verbose #789 > > ╭─[ 11.13s - stdout ]──────────────────────────────────────────────────────────╮
00:00:51 verbose #790 > > │ Compiling fable_library_rust v0.1.0 │
00:00:51 verbose #791 > > │ (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) │
00:00:51 verbose #792 > > │ Compiling spiral_temp_test v0.0.1 │
00:00:51 verbose #793 > > │ (C:\home\git\polyglot\apps\spiral\temp\test) │
00:00:51 verbose #794 > > │ warning: struct `Cart` is never constructed │
00:00:51 verbose #795 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:41:8 │
00:00:51 verbose #796 > > │ | │
00:00:51 verbose #797 > > │ 41 | struct Cart { │
00:00:51 verbose #798 > > │ | ^^^^ │
00:00:51 verbose #799 > > │ | │
00:00:51 verbose #800 > > │ = note: `#[warn(dead_code)]` on by default │
00:00:51 verbose #801 > > │ │
00:00:51 verbose #802 > > │ warning: associated items `new`, `add_item`, and `remove_item` are │
00:00:51 verbose #803 > > │ never used │
00:00:51 verbose #804 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:46:8 │
00:00:51 verbose #805 > > │ | │
00:00:51 verbose #806 > > │ 45 | impl Cart { │
00:00:51 verbose #807 > > │ | --------- associated items in this implementation │
00:00:51 verbose #808 > > │ 46 | fn new() -> Cart { │
00:00:51 verbose #809 > > │ | ^^^ │
00:00:51 verbose #810 > > │ ... │
00:00:51 verbose #811 > > │ 50 | fn add_item(&mut self, item: Item) { │
00:00:51 verbose #812 > > │ | ^^^^^^^^ │
00:00:51 verbose #813 > > │ ... │
00:00:51 verbose #814 > > │ 56 | fn remove_item(&mut self, item: &Item) { │
00:00:51 verbose #815 > > │ | ^^^^^^^^^^^ │
00:00:51 verbose #816 > > │ │
00:00:51 verbose #817 > > │ warning: function `parse_comment` is never used │
00:00:51 verbose #818 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:124:4 │
00:00:51 verbose #819 > > │ | │
00:00:51 verbose #820 > > │ 124 | fn parse_comment(input: &str) -> IResult<&str, SpiralToken> { │
00:00:51 verbose #821 > > │ | ^^^^^^^^^^^^^ │
00:00:51 verbose #822 > > │ │
00:00:51 verbose #823 > > │ warning: function `parse_string` is never used │
00:00:51 verbose #824 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:130:4 │
00:00:51 verbose #825 > > │ | │
00:00:51 verbose #826 > > │ 130 | fn parse_string(input: &str) -> IResult<&str, SpiralToken> { │
00:00:51 verbose #827 > > │ | ^^^^^^^^^^^^ │
00:00:51 verbose #828 > > │ │
00:00:51 verbose #829 > > │ warning: function `parse_identifier` is never used │
00:00:51 verbose #830 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:145:4 │
00:00:51 verbose #831 > > │ | │
00:00:51 verbose #832 > > │ 145 | fn parse_identifier(input: &str) -> IResult<&str, SpiralToken> {[ │
00:00:51 verbose #833 > > │ 0m │
00:00:51 verbose #834 > > │ | ^^^^^^^^^^^^^^^^ │
00:00:51 verbose #835 > > │ │
00:00:51 verbose #836 > > │ warning: function `parse_integer` is never used │
00:00:51 verbose #837 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:157:4 │
00:00:51 verbose #838 > > │ | │
00:00:51 verbose #839 > > │ 157 | fn parse_integer(input: &str) -> IResult<&str, SpiralToken> { │
00:00:51 verbose #840 > > │ | ^^^^^^^^^^^^^ │
00:00:51 verbose #841 > > │ │
00:00:51 verbose #842 > > │ warning: function `parse_operator` is never used │
00:00:51 verbose #843 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:165:4 │
00:00:51 verbose #844 > > │ | │
00:00:51 verbose #845 > > │ 165 | fn parse_operator(input: &str) -> IResult<&str, SpiralToken> { │
00:00:51 verbose #846 > > │ | ^^^^^^^^^^^^^^ │
00:00:51 verbose #847 > > │ │
00:00:51 verbose #848 > > │ warning: function `parse_token` is never used │
00:00:51 verbose #849 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:170:4 │
00:00:51 verbose #850 > > │ | │
00:00:51 verbose #851 > > │ 170 | fn parse_token(input: &str) -> IResult<&str, SpiralToken> { │
00:00:51 verbose #852 > > │ | ^^^^^^^^^^^ │
00:00:51 verbose #853 > > │ │
00:00:51 verbose #854 > > │ warning: function `format_token` is never used │
00:00:51 verbose #855 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:180:4 │
00:00:51 verbose #856 > > │ | │
00:00:51 verbose #857 > > │ 180 | fn format_token(token: &SpiralToken) -> String { │
00:00:51 verbose #858 > > │ | ^^^^^^^^^^^^ │
00:00:51 verbose #859 > > │ │
00:00:51 verbose #860 > > │ warning: function `parse_expression` is never used │
00:00:51 verbose #861 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:201:4 │
00:00:51 verbose #862 > > │ | │
00:00:51 verbose #863 > > │ 201 | fn parse_expression(input: &str) -> IResult<&str, SpiralToken> {[ │
00:00:51 verbose #864 > > │ 0m │
00:00:51 verbose #865 > > │ | ^^^^^^^^^^^^^^^^ │
00:00:51 verbose #866 > > │ │
00:00:51 verbose #867 > > │ warning: `spiral_temp_test` (bin "spiral_temp_test") generated 10 │
00:00:51 verbose #868 > > │ warnings │
00:00:51 verbose #869 > > │ Finished `release` profile [optimized] target(s) in 10.97s │
00:00:51 verbose #870 > > │ │
00:00:51 verbose #871 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:51 verbose #872 > >
00:00:51 verbose #873 > > ── markdown ────────────────────────────────────────────────────────────────────
00:00:51 verbose #874 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:51 verbose #875 > > │ ### run release tests with output enabled │
00:00:51 verbose #876 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:51 verbose #877 > >
00:00:51 verbose #878 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:00:51 verbose #879 > > { cargo +nightly test --release -- --show-output } | Invoke-Block
00:01:18 verbose #880 > >
00:01:18 verbose #881 > > ╭─[ 27.23s - stdout ]──────────────────────────────────────────────────────────╮
00:01:18 verbose #882 > > │ Compiling fable_library_rust v0.1.0 │
00:01:18 verbose #883 > > │ (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) │
00:01:18 verbose #884 > > │ Compiling spiral_temp_test v0.0.1 │
00:01:18 verbose #885 > > │ (C:\home\git\polyglot\apps\spiral\temp\test) │
00:01:18 verbose #886 > > │ Finished `release` profile [optimized] target(s) in 26.84s │
00:01:18 verbose #887 > > │ Running unittests main.rs │
00:01:18 verbose #888 > > │ (C:\home\git\polyglot\workspace\target\release\deps\spiral_temp_test-19bf3cc │
00:01:18 verbose #889 > > │ 4c88f036d.exe) │
00:01:18 verbose #890 > > │ │
00:01:18 verbose #891 > > │ running 3 tests │
00:01:18 verbose #892 > > │ test test_parse_number ... ok │
00:01:18 verbose #893 > > │ test prop_parse_format_idempotent ... ok │
00:01:18 verbose #894 > > │ test │
00:01:18 verbose #895 > > │ adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged ... │
00:01:18 verbose #896 > > │ ok │
00:01:18 verbose #897 > > │ │
00:01:18 verbose #898 > > │ successes: │
00:01:18 verbose #899 > > │ │
00:01:18 verbose #900 > > │ ---- prop_parse_format_idempotent stdout ---- │
00:01:18 verbose #901 > > │ input=Identifier("Mt8YTpECA838Ly") │
00:01:18 verbose #902 > > │ input=StringLiteral("q6OCb1Vf=Y4<??=qq@<jF*G-V;`q") │
00:01:18 verbose #903 > > │ input=Identifier("SR") │
00:01:18 verbose #904 > > │ input=StringLiteral("Vq=/rb'/3:UKc`jX/?`") │
00:01:18 verbose #905 > > │ input=Integer(-8304438944488586498) │
00:01:18 verbose #906 > > │ input=Operator("(") │
00:01:18 verbose #907 > > │ input=Identifier("d5hQDDk9v96zk5ie8Lf7Y8fysOfVh") │
00:01:18 verbose #908 > > │ input=StringLiteral("R*$72-8 :%k]P=d3%.f1:e.@") │
00:01:18 verbose #909 > > │ input=Identifier("bV8Q") │
00:01:18 verbose #910 > > │ input=Comment("9={JsS]bk<-$`b<t$") │
00:01:18 verbose #911 > > │ input=Identifier("Pc") │
00:01:18 verbose #912 > > │ input=Identifier("BcwdErX4mYxFsaYX") │
00:01:18 verbose #913 > > │ input=Identifier("M3UcRS2BH9AgKNAUuNWsXc") │
00:01:18 verbose #914 > > │ input=Identifier("v5mFml7n1Cq07oo0QfhnZEVEGAm") │
00:01:18 verbose #915 > > │ input=Integer(-4216214899276345043) │
00:01:18 verbose #916 > > │ input=Comment("I") │
00:01:18 verbose #917 > > │ input=Comment("'_ZV.N p?'EE[^K<qbv:") │
00:01:18 verbose #918 > > │ input=Integer(-4227118860611657869) │
00:01:18 verbose #919 > > │ input=Integer(-3149506732044824134) │
00:01:18 verbose #920 > > │ input=Integer(-7210715486079698201) │
00:01:18 verbose #921 > > │ input=Comment("tsQ96$J!e,`mP6e@+Gha[nf=%?Zb%F") │
00:01:18 verbose #922 > > │ input=Comment("%<l`,pu") │
00:01:18 verbose #923 > > │ input=StringLiteral("wkIH:4yuj 's)q") │
00:01:18 verbose #924 > > │ input=Integer(-2446430243692220003) │
00:01:18 verbose #925 > > │ input=Operator("-") │
00:01:18 verbose #926 > > │ input=Operator("(") │
00:01:18 verbose #927 > > │ input=StringLiteral("lFd&!`?/dq$a-?0%mVo:+x:Q7!") │
00:01:18 verbose #928 > > │ input=StringLiteral("ME{J%/L})ckF[") │
00:01:18 verbose #929 > > │ input=Comment("KA}V*kTk#\"z35DC\"\\a/\"y!i|OP*Ei-\\") │
00:01:18 verbose #930 > > │ input=Identifier("YSal5Cb7a4Ecl") │
00:01:18 verbose #931 > > │ input=Operator("=") │
00:01:18 verbose #932 > > │ input=Integer(-8517152862531310038) │
00:01:18 verbose #933 > > │ input=Identifier("B5sqpYBNs8k3cBu5nYs7m2htAM") │
00:01:18 verbose #934 > > │ input=Comment("<G:R$ hQ>&e\"?\\62\\'gIH|n<j") │
00:01:18 verbose #935 > > │ input=Integer(4361913325857448513) │
00:01:18 verbose #936 > > │ input=Integer(-7201169080690218685) │
00:01:18 verbose #937 > > │ input=Operator("=") │
00:01:18 verbose #938 > > │ input=Identifier("GGj") │
00:01:18 verbose #939 > > │ input=Identifier("KMd72") │
00:01:18 verbose #940 > > │ input=Integer(233193684237714646) │
00:01:18 verbose #941 > > │ input=StringLiteral("/.9Jfj%?-7{-j4=]1^$(,)Dxmo&") │
00:01:18 verbose #942 > > │ input=Operator("(") │
00:01:18 verbose #943 > > │ input=Comment("[vw)~") │
00:01:18 verbose #944 > > │ input=Identifier("JDx3G8sk54Qe68wDOue7pRAlS5282FoC") │
00:01:18 verbose #945 > > │ input=Identifier("S") │
00:01:18 verbose #946 > > │ input=Identifier("jIZB") │
00:01:18 verbose #947 > > │ input=Comment(":].sJ%7\"3j::ZBw:k") │
00:01:18 verbose #948 > > │ input=Integer(1824266814911588117) │
00:01:18 verbose #949 > > │ input=Identifier("Yvt5VO3DWlIx1j67Hp") │
00:01:18 verbose #950 > > │ input=Comment(")hOK[.?Y#[.AGwF'&u}nlXyI%YXi") │
00:01:18 verbose #951 > > │ input=Identifier("UdqpsS1A2IDoR5H7Y24lmdq") │
00:01:18 verbose #952 > > │ input=Comment("&\"Q[`_T/Km@g%O:fbG") │
00:01:18 verbose #953 > > │ input=StringLiteral("W=#x~M3TaZA3|C{/,{:3") │
00:01:18 verbose #954 > > │ input=Integer(-3337306108739207809) │
00:01:18 verbose #955 > > │ input=StringLiteral("QD4S^<=r/*") │
00:01:18 verbose #956 > > │ input=StringLiteral("mW{Dk50z=`$.Us7`{!{==") │
00:01:18 verbose #957 > > │ input=Comment("y#%4x'&.>%J|&+54u6,p?RM\"") │
00:01:18 verbose #958 > > │ input=Integer(-7254330868522219014) │
00:01:18 verbose #959 > > │ input=Comment("4g$$>1s(2;0]`$cZh8&=Uy,") │
00:01:18 verbose #960 > > │ input=Identifier("G7ZB1xm0J91nJojUQ") │
00:01:18 verbose #961 > > │ input=Comment("=+`I.?*I*?Q") │
00:01:18 verbose #962 > > │ input=Operator("*") │
00:01:18 verbose #963 > > │ input=Identifier("R3wUwK") │
00:01:18 verbose #964 > > │ input=Integer(-2189000603229973672) │
00:01:18 verbose #965 > > │ input=Comment("m_Hg`S}*\\m}Ph--*") │
00:01:18 verbose #966 > > │ input=StringLiteral(">&8=`v]/`eV=/{{q'6j0,*YxNZ$O") │
00:01:18 verbose #967 > > │ input=Identifier("goq5dEe07WI8lf01A4ZSx") │
00:01:18 verbose #968 > > │ input=StringLiteral("Qn{.7j*bPz`=)S$n-<,'SOm/`QBy") │
00:01:18 verbose #969 > > │ input=Comment("(N^/&:\"3D=J/-8`@") │
00:01:18 verbose #970 > > │ input=StringLiteral("|b0%`qZ:%*rQr*]X5<I") │
00:01:18 verbose #971 > > │ input=Comment("\\j,,:Ol>cI=P$=tAPFU:") │
00:01:18 verbose #972 > > │ input=Comment("X=GzX&,\\.<e;p?PMN?<('{m<0^=I/^/X") │
00:01:18 verbose #973 > > │ input=Operator("/") │
00:01:18 verbose #974 > > │ input=Identifier("c0LzzFPkLA7C90cH") │
00:01:18 verbose #975 > > │ input=Integer(312438787680137482) │
00:01:18 verbose #976 > > │ input=Integer(-6058610381283348092) │
00:01:18 verbose #977 > > │ input=StringLiteral("$$?Cu{C") │
00:01:18 verbose #978 > > │ input=Comment("EV*g9*?S+") │
00:01:18 verbose #979 > > │ input=StringLiteral("$|:0%RWb%C^r1X1P^") │
00:01:18 verbose #980 > > │ input=Comment(".Sfgb\"t*'\\EK") │
00:01:18 verbose #981 > > │ input=Identifier("jSA34q7Ykj64C0397N2433") │
00:01:18 verbose #982 > > │ input=Identifier("wXvvtN1jf39bNc") │
00:01:18 verbose #983 > > │ input=Operator("(") │
00:01:18 verbose #984 > > │ input=Identifier("GBITB3536Z9") │
00:01:18 verbose #985 > > │ input=StringLiteral(":eaRQyS4.") │
00:01:18 verbose #986 > > │ input=Integer(4670273350527068873) │
00:01:18 verbose #987 > > │ input=Integer(-5562931382541044682) │
00:01:18 verbose #988 > > │ input=Identifier("gWI5BopaasYV") │
00:01:18 verbose #989 > > │ input=Identifier("oL7fmga2JNPEla2w3lMWKL5ZCBBGecybl") │
00:01:18 verbose #990 > > │ input=Operator(")") │
00:01:18 verbose #991 > > │ input=Identifier("fJeR8SUR3eIu8lmiKvi3Cblk0") │
00:01:18 verbose #992 > > │ input=Operator("+") │
00:01:18 verbose #993 > > │ input=Comment("';_&%Jxrla=?{vd{J&gi?Z*[e2.W") │
00:01:18 verbose #994 > > │ input=StringLiteral("@'*#'$Mk.)*&j1unx2R*S=]") │
00:01:18 verbose #995 > > │ input=Integer(5571636602585599638) │
00:01:18 verbose #996 > > │ input=StringLiteral("lyhu4n$?'6:?5k= ]Q.4&2") │
00:01:18 verbose #997 > > │ input=Operator("*") │
00:01:18 verbose #998 > > │ input=Operator("*") │
00:01:18 verbose #999 > > │ input=Integer(-7037792924034121299) │
00:01:18 verbose #1000 > > │ input=Comment("T!\"*Sc$B") │
00:01:18 verbose #1001 > > │ input=Identifier("f") │
00:01:18 verbose #1002 > > │ input=Identifier("oIypSLHXV8") │
00:01:18 verbose #1003 > > │ input=Integer(-2026861130730111717) │
00:01:18 verbose #1004 > > │ input=Comment("&l&*fR&&\\C") │
00:01:18 verbose #1005 > > │ input=Comment("=w/Go`67") │
00:01:18 verbose #1006 > > │ input=Integer(-9015060893142364771) │
00:01:18 verbose #1007 > > │ input=Integer(7889464685249704769) │
00:01:18 verbose #1008 > > │ input=Integer(476190906286219678) │
00:01:18 verbose #1009 > > │ input=Operator("/") │
00:01:18 verbose #1010 > > │ input=Comment("_1c:[<8 [\\6G!'H96Q<#]G20s1") │
00:01:18 verbose #1011 > > │ input=Operator("*") │
00:01:18 verbose #1012 > > │ input=StringLiteral("=CcZx&oWi,:R<U-") │
00:01:18 verbose #1013 > > │ input=Integer(1014772387029372586) │
00:01:18 verbose #1014 > > │ input=Identifier("Hj07iYvUrls7l238cu21") │
00:01:18 verbose #1015 > > │ input=Integer(-6413151286844063056) │
00:01:18 verbose #1016 > > │ input=Integer(7363119592908433137) │
00:01:18 verbose #1017 > > │ input=Operator(")") │
00:01:18 verbose #1018 > > │ input=Identifier("dCrqUK6iTY3HL5PL7Rzfl36b4") │
00:01:18 verbose #1019 > > │ input=Identifier("xqrx8N") │
00:01:18 verbose #1020 > > │ input=StringLiteral("$K02=/Le%*To^o$<N<&$K-3^") │
00:01:18 verbose #1021 > > │ input=Identifier("QgOvl3L8s") │
00:01:18 verbose #1022 > > │ input=Integer(8659495077824228232) │
00:01:18 verbose #1023 > > │ input=Integer(2395792578311176684) │
00:01:18 verbose #1024 > > │ input=Integer(-5185561767376825662) │
00:01:18 verbose #1025 > > │ input=Identifier("KR5baSu1egX") │
00:01:18 verbose #1026 > > │ input=Comment("\\`i") │
00:01:18 verbose #1027 > > │ input=Operator("*") │
00:01:18 verbose #1028 > > │ input=Integer(-6286486053253494476) │
00:01:18 verbose #1029 > > │ input=Operator("(") │
00:01:18 verbose #1030 > > │ input=Operator("=") │
00:01:18 verbose #1031 > > │ input=Comment("}OK:q/\"~($/p?NF%J") │
00:01:18 verbose #1032 > > │ input=Operator("(") │
00:01:18 verbose #1033 > > │ input=StringLiteral("YI'S") │
00:01:18 verbose #1034 > > │ input=Integer(491972642946922433) │
00:01:18 verbose #1035 > > │ input=StringLiteral("SF_CBWR@{:1w?") │
00:01:18 verbose #1036 > > │ input=StringLiteral("gFU") │
00:01:18 verbose #1037 > > │ input=Identifier("W825w9n8901r5vd6j422cMk2su0Ah48fg") │
00:01:18 verbose #1038 > > │ input=Comment("*&nG?J*\\=?>*") │
00:01:18 verbose #1039 > > │ input=Comment("x'C_+'qU[UG'I\"I&") │
00:01:18 verbose #1040 > > │ input=StringLiteral("Hm/_.:&&o{I{8Vd-.%YI&*/>") │
00:01:18 verbose #1041 > > │ input=Identifier("BjmJX1M20VjEH1xgFW5yWXg74Z") │
00:01:18 verbose #1042 > > │ input=Identifier("a") │
00:01:18 verbose #1043 > > │ input=Operator("+") │
00:01:18 verbose #1044 > > │ input=Integer(-8173831923103101527) │
00:01:18 verbose #1045 > > │ input=StringLiteral("%p<k@/J=?H}:_cqF*S1!w?u>Gj") │
00:01:18 verbose #1046 > > │ input=Operator("=") │
00:01:18 verbose #1047 > > │ input=Operator("*") │
00:01:18 verbose #1048 > > │ input=Operator("=") │
00:01:18 verbose #1049 > > │ input=Operator("-") │
00:01:18 verbose #1050 > > │ input=Integer(-2674406431817052145) │
00:01:18 verbose #1051 > > │ input=Comment("<$z<&zM&*=") │
00:01:18 verbose #1052 > > │ input=Operator("=") │
00:01:18 verbose #1053 > > │ input=Identifier("hWnr54N5MXysCSm8eP") │
00:01:18 verbose #1054 > > │ input=Comment("ZJj{}c{n<*!=&o{Wu\\sT$uDhKkL/=M'") │
00:01:18 verbose #1055 > > │ input=Integer(9061783222557806631) │
00:01:18 verbose #1056 > > │ input=StringLiteral("&>`&") │
00:01:18 verbose #1057 > > │ input=StringLiteral("`o<(Aka9:%x[Rm<]fxk&Yd:=*!(?(my") │
00:01:18 verbose #1058 > > │ input=StringLiteral("7$P:un:F!/{VBWJ&/gP/") │
00:01:18 verbose #1059 > > │ input=Integer(6260630569978636058) │
00:01:18 verbose #1060 > > │ input=Integer(2766122769610000489) │
00:01:18 verbose #1061 > > │ input=StringLiteral("N&=uI~S,{rU+L0t<:") │
00:01:18 verbose #1062 > > │ input=Operator("(") │
00:01:18 verbose #1063 > > │ input=Operator("/") │
00:01:18 verbose #1064 > > │ input=Operator("/") │
00:01:18 verbose #1065 > > │ input=Operator(")") │
00:01:18 verbose #1066 > > │ input=StringLiteral("pT54L+4*$Cc$U=%*?%") │
00:01:18 verbose #1067 > > │ input=Operator("*") │
00:01:18 verbose #1068 > > │ input=Comment(";{$u)i$v%i\\:a!\\\\{=d6at") │
00:01:18 verbose #1069 > > │ input=StringLiteral("H={gBzz:jQr'L[.$^") │
00:01:18 verbose #1070 > > │ input=Identifier("ILeQlzQhGJlQu4I") │
00:01:18 verbose #1071 > > │ input=Identifier("ekK1U24TkmCgo11") │
00:01:18 verbose #1072 > > │ input=Comment("($*h#M^\"Ghu*]}{\\rSUQS/R{H-tES2") │
00:01:18 verbose #1073 > > │ input=Operator(")") │
00:01:18 verbose #1074 > > │ input=Operator(")") │
00:01:18 verbose #1075 > > │ input=StringLiteral("W<GF78") │
00:01:18 verbose #1076 > > │ input=StringLiteral(";-0[.zm'E={K{R3cs") │
00:01:18 verbose #1077 > > │ input=Identifier("Q") │
00:01:18 verbose #1078 > > │ input=StringLiteral("&Q_]1{sk?;@(J") │
00:01:18 verbose #1079 > > │ input=Integer(-3591532124223239124) │
00:01:18 verbose #1080 > > │ input=Identifier("bsFJ1D3kjeh3R43cyUTZnS9ug8J") │
00:01:18 verbose #1081 > > │ input=Comment("l-<YS%WM!+#") │
00:01:18 verbose #1082 > > │ input=Identifier("p1rrGqh3og0sSTOV1BB4rEpc0iT4d") │
00:01:18 verbose #1083 > > │ input=Comment("K:^$Jb>\\V") │
00:01:18 verbose #1084 > > │ input=Integer(-2335209074922858630) │
00:01:18 verbose #1085 > > │ input=StringLiteral("/8A*.5HVW.8") │
00:01:18 verbose #1086 > > │ input=Comment("$(u\\x*1\\;Rs*\\\"%8fE`8") │
00:01:18 verbose #1087 > > │ input=Identifier("M745YIT9XJ7cr0TR") │
00:01:18 verbose #1088 > > │ input=Operator("*") │
00:01:18 verbose #1089 > > │ input=Comment("Z\\)YV=='1P';|>=I/!nae}<\"&'+7s") │
00:01:18 verbose #1090 > > │ input=Comment("=dFA#T%42=0=;<") │
00:01:18 verbose #1091 > > │ input=Identifier("rlY2C0127G") │
00:01:18 verbose #1092 > > │ input=Integer(4269273201579850045) │
00:01:18 verbose #1093 > > │ input=Comment("_'4") │
00:01:18 verbose #1094 > > │ input=StringLiteral("b:'3<VQlI`?IESTZ") │
00:01:18 verbose #1095 > > │ input=StringLiteral("8*:3MZAm*wnmg?l j:=Eo9H=^&//c=") │
00:01:18 verbose #1096 > > │ input=Operator("-") │
00:01:18 verbose #1097 > > │ input=Identifier("HB9nAhL252HPJ") │
00:01:18 verbose #1098 > > │ input=Comment("\"?2P&%[<::uhhh$h{4+:k2<u") │
00:01:18 verbose #1099 > > │ input=StringLiteral("D<d*`xDF'S2KZ%%~A") │
00:01:18 verbose #1100 > > │ input=Identifier("zHqs74kZ1uT32YyXOL8Y23j") │
00:01:18 verbose #1101 > > │ input=StringLiteral("{*=:L /RgU;/s{3<f`(g~^$2:") │
00:01:18 verbose #1102 > > │ input=StringLiteral("}`xA.$U`dRl]=%cAf*&'") │
00:01:18 verbose #1103 > > │ input=StringLiteral("<Rzqc") │
00:01:18 verbose #1104 > > │ input=Comment(")!E5j|") │
00:01:18 verbose #1105 > > │ input=StringLiteral("<?/%y&hbYh]I`kK:THb*f7:I*Ra:/ ") │
00:01:18 verbose #1106 > > │ input=Integer(9165667840620507837) │
00:01:18 verbose #1107 > > │ input=Integer(-7091434836509021415) │
00:01:18 verbose #1108 > > │ input=Comment("zh%.4`9M4)D&f=O?i![/)=P/%/>JI") │
00:01:18 verbose #1109 > > │ input=Identifier("Gw") │
00:01:18 verbose #1110 > > │ input=Identifier("qwiZbl1noVjX81AJek") │
00:01:18 verbose #1111 > > │ input=Operator(")") │
00:01:18 verbose #1112 > > │ input=Integer(3421587107826153963) │
00:01:18 verbose #1113 > > │ input=StringLiteral("`=?3[uj{4'-/_chW") │
00:01:18 verbose #1114 > > │ input=StringLiteral(">") │
00:01:18 verbose #1115 > > │ input=Identifier("hR99") │
00:01:18 verbose #1116 > > │ input=Integer(-5744138435263612577) │
00:01:18 verbose #1117 > > │ input=StringLiteral("5X&q^$`IQKZf&&m=NvI:w/KK:{?Hh") │
00:01:18 verbose #1118 > > │ input=Operator("=") │
00:01:18 verbose #1119 > > │ input=Integer(577470402748530684) │
00:01:18 verbose #1120 > > │ input=Operator("(") │
00:01:18 verbose #1121 > > │ input=Identifier("yMMMryGX02lE0s18Av3exU") │
00:01:18 verbose #1122 > > │ input=Integer(6993572002395387145) │
00:01:18 verbose #1123 > > │ input=Identifier("KIR7g") │
00:01:18 verbose #1124 > > │ input=Operator("-") │
00:01:18 verbose #1125 > > │ input=Integer(-6352760151385492908) │
00:01:18 verbose #1126 > > │ input=StringLiteral("NpQP.{'@J#}z}&d{_g ") │
00:01:18 verbose #1127 > > │ input=Integer(1004787432758639203) │
00:01:18 verbose #1128 > > │ input=Comment("]fx") │
00:01:18 verbose #1129 > > │ input=Integer(-2840617822074813109) │
00:01:18 verbose #1130 > > │ input=StringLiteral("yDh?d?,bDcE$s") │
00:01:18 verbose #1131 > > │ input=StringLiteral("$I?(uS&bZ%Ivae$wm&a{0f;Q2;$(") │
00:01:18 verbose #1132 > > │ input=Identifier("CxjSOx4v") │
00:01:18 verbose #1133 > > │ input=Comment("H]vBn<?") │
00:01:18 verbose #1134 > > │ input=Operator("(") │
00:01:18 verbose #1135 > > │ input=StringLiteral("'$G$!$") │
00:01:18 verbose #1136 > > │ input=Integer(2501675912530251743) │
00:01:18 verbose #1137 > > │ input=Comment("5\\mz;Blhx?o1j{Op.L`*=*V") │
00:01:18 verbose #1138 > > │ input=Comment("b*36[U/7xK") │
00:01:18 verbose #1139 > > │ input=Comment("P/d=<CRL!c$zr%\\TM-H`") │
00:01:18 verbose #1140 > > │ input=Identifier("xUXjzItCOB3k7f3it25h3JKW6DGW") │
00:01:18 verbose #1141 > > │ input=Comment("?i_k.D&.d?]<Sb=P") │
00:01:18 verbose #1142 > > │ input=StringLiteral("&5`C*cF/<L$/g].6e{sH{`R)m''") │
00:01:18 verbose #1143 > > │ input=Comment("eB2*Aw>&,@.E\\d$8*n/We@3,[OtEd&") │
00:01:18 verbose #1144 > > │ input=Identifier("aIvyttzrR3Qqf4gva4CC97CemZ20") │
00:01:18 verbose #1145 > > │ input=Identifier("uSKi") │
00:01:18 verbose #1146 > > │ input=Integer(486351465779220824) │
00:01:18 verbose #1147 > > │ input=StringLiteral("@(-zf=1") │
00:01:18 verbose #1148 > > │ input=Comment("W/sZ:XW:x`>:\\L\\12q\"e") │
00:01:18 verbose #1149 > > │ input=Identifier("BA5sY3Hk3tTQVRlfPdJ") │
00:01:18 verbose #1150 > > │ input=Identifier("Gpkqtjv5db94cPBPQD9A42pDo88") │
00:01:18 verbose #1151 > > │ input=Comment("gSC?gg62*axeX=$") │
00:01:18 verbose #1152 > > │ input=Operator("-") │
00:01:18 verbose #1153 > > │ input=Operator(")") │
00:01:18 verbose #1154 > > │ input=Comment("_=+CM`,&") │
00:01:18 verbose #1155 > > │ input=Operator("+") │
00:01:18 verbose #1156 > > │ input=StringLiteral("n;ZJ&&]KmAF$N=,/{'<vf!^fHGT'") │
00:01:18 verbose #1157 > > │ │
00:01:18 verbose #1158 > > │ │
00:01:18 verbose #1159 > > │ successes: │
00:01:18 verbose #1160 > > │ adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged │
00:01:18 verbose #1161 > > │ prop_parse_format_idempotent │
00:01:18 verbose #1162 > > │ test_parse_number │
00:01:18 verbose #1163 > > │ │
00:01:18 verbose #1164 > > │ test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; │
00:01:18 verbose #1165 > > │ finished in 0.15s │
00:01:18 verbose #1166 > > │ │
00:01:18 verbose #1167 > > │ │
00:01:18 verbose #1168 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:18 verbose #1169 > >
00:01:18 verbose #1170 > > ── markdown ────────────────────────────────────────────────────────────────────
00:01:18 verbose #1171 > > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:18 verbose #1172 > > │ ### execute the binary in release mode │
00:01:18 verbose #1173 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:18 verbose #1174 > >
00:01:18 verbose #1175 > > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:18 verbose #1176 > > { . $ScriptDir/../../../../workspace/target/release/spiral_temp_test$(_exe) } |
00:01:18 verbose #1177 > > Invoke-Block
00:01:18 verbose #1178 > >
00:01:18 verbose #1179 > > ╭─[ 73.93ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:18 verbose #1180 > > │ app=test │
00:01:18 verbose #1181 > > │ │
00:01:18 verbose #1182 > > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:18 verbose #1183 > 00:01:16 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 91101
00:01:18 verbose #1184 > 00:01:16 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:20 verbose #1185 > 00:01:18 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb to html
00:01:20 verbose #1186 > 00:01:18 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:20 verbose #1187 > 00:01:18 verbose #7 ! validate(nb)
00:01:22 verbose #1188 > 00:01:19 verbose #8 ! [NbConvertApp] Writing 345443 bytes to c:\home\git\polyglot\apps\spiral\temp\test\build.dib.html
00:01:22 verbose #1189 > 00:01:19 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 663
00:01:22 verbose #1190 > 00:01:19 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 663
00:01:22 verbose #1191 > 00:01:19 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/build.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/build.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:23 verbose #1192 > 00:01:20 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:23 verbose #1193 > 00:01:20 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:23 verbose #1194 > 00:01:21 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 91823
00:01:23 debug #1195 execute_with_options_async / exit_code: 0 / output.Length: 96443
00:01:23 debug #3 main / executeCommand / exitCode: 0 / command: ../../../../workspace/target/release/spiral_builder.exe dib --path build.dib
00:01:23 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:01:23 debug #8 run_with_timeout_async / timeout: 100
In [ ]:
{ pwsh ../apps/spiral/vscode/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c) Checked 203 installs across 191 packages (no changes) [1.55s] Symlink already exists: C:\home\git\polyglot\apps\spiral\vscode\LICENSE -> C:\home\git\polyglot\LICENSE out\src\extension.js 2.4kb out\media\cellOutputScrollButtons.js 1.9kb ⚡ Done in 23ms (node:2472) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) DONE Packaged: out\spiral-vscode-0.0.1.vsix (26 files, 98.42KB)
In [ ]:
{ pwsh ../apps/ipfs/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c)
Done! Checked 220 packages (no changes) [1.75s]
In [ ]:
{ pwsh ./outdated.ps1 } | Invoke-Block
Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
Resolving dependency graph...
Outdated packages found:
Group: Main
* Argu 6.2.2 -> 6.2.3
* Expecto.FsCheck 10.2.1-fscheck3 -> 10.2.1
* FsCheck 3.0.0-rc3 -> 2.16.6
* FSharp.Core 8.0.300-beta.24080.5 -> 8.0.300
* Microsoft.AspNetCore.Connections.Abstractions 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.Http.Connections.Client 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.Http.Connections.Common 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Client 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Client.Core 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Common 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Protocols.Json 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.Extensions.DependencyInjection 8.0 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.DependencyInjection.Abstractions 8.0.1 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Features 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.Extensions.Logging 8.0 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Logging.Abstractions 8.0.1 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Options 8.0.2 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Primitives 8.0 -> 9.0.0-preview.3.24172.9
* System.CodeDom 8.0 -> 9.0.0-preview.3.24172.9
* System.IO.Pipelines 8.0 -> 9.0.0-preview.3.24172.9
* System.Management 7.0 -> 9.0.0-preview.3.24172.9
* System.Threading.Channels 8.0 -> 9.0.0-preview.3.24172.9
Total time taken: 53 seconds
CheckToml / toml: C:\home\git\polyglot\workspace\Cargo.toml
chat_contract_tests
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
autocfg 1.3.0 --- Removed Build ---
equivalent 1.0.1 Removed --- Normal ---
hashbrown 0.12.3 --- 0.14.5 Normal ---
hashbrown 0.14.5 0.12.3 --- Normal ---
indexmap 1.9.3 --- 2.2.6 Normal ---
indexmap 2.2.6 1.9.3 --- Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\Cargo.toml
All dependencies are up to date, yay!
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\tests\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
flate2->crc32fast 1.4.0 1.4.2 1.4.2 Normal ---
indexmap->autocfg 1.3.0 --- Removed Build ---
indexmap->equivalent 1.0.1 Removed --- Normal ---
indexmap->hashbrown 0.12.3 --- 0.14.5 Normal ---
indexmap->hashbrown 0.14.5 0.12.3 --- Normal ---
serde_with->indexmap 1.9.3 --- 2.2.6 Normal ---
serde_with->indexmap 2.2.6 1.9.3 --- Normal ---
zip->crc32fast 1.4.0 1.4.2 1.4.2 Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\plot\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
plotters 0.3.5 0.3.6 0.3.6 Normal ---
plotters->plotters-backend 0.3.5 0.3.6 0.3.6 Normal ---
plotters->plotters-svg 0.3.5 0.3.6 0.3.6 Normal ---
plotters-svg->plotters-backend 0.3.5 0.3.6 0.3.6 Normal ---
CheckJson / json: C:/home/git/polyglot
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\package.json
All dependencies match the greatest package versions :)
CheckJson / json: C:/home/git/polyglot/apps/ipfs
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\ipfs\package.json
All dependencies match the greatest package versions :)
CheckJson / json: C:/home/git/polyglot/apps/spiral/temp/extension
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\spiral\temp\extension\package.json
@playwright/test 1.44.0 → 1.45.0-alpha-2024-05-21
Run ncu --target greatest -u to upgrade package.json
CheckJson / json: C:/home/git/polyglot/apps/spiral/vscode
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\spiral\vscode\package.json
All dependencies match the greatest package versions :)